All Projects → 1amageek → Muni

1amageek / Muni

Licence: MIT license
Chat with Cloud Firestore

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to Muni

nodemessage
interact with your local iMessage database
Stars: ✭ 39 (+77.27%)
Mutual labels:  messaging
generator-jhipster-spring-cloud-stream
📪 JHipster module for messaging microservices with Spring Cloud Stream
Stars: ✭ 22 (+0%)
Mutual labels:  messaging
dispersy
The elastic database system. A database designed for P2P-like scenarios, where potentially millions of computers send database updates around.
Stars: ✭ 81 (+268.18%)
Mutual labels:  messaging
mq-nynja
💠 EMQ: N2O over MQTT for NYNJA 1.0
Stars: ✭ 15 (-31.82%)
Mutual labels:  messaging
SimpleSockets
Asynchronous TCP .NET library with reliable transmission and receipt of data, with an ssl implementation.
Stars: ✭ 74 (+236.36%)
Mutual labels:  messaging
aop
AMQP on Pulsar protocol handler
Stars: ✭ 93 (+322.73%)
Mutual labels:  messaging
paypal-messaging-components
PayPal JavaScript SDK - messaging components
Stars: ✭ 24 (+9.09%)
Mutual labels:  messaging
awesome-integration
A curated list of awesome system integration software and resources.
Stars: ✭ 117 (+431.82%)
Mutual labels:  messaging
dotnetcqs
Command/Query separation for .NET
Stars: ✭ 14 (-36.36%)
Mutual labels:  messaging
azure-service-bus-java
☁️ Java client library for Azure Service Bus
Stars: ✭ 61 (+177.27%)
Mutual labels:  messaging
scion-microfrontend-platform
SCION Microfrontend Platform is a TypeScript-based open-source library that helps to implement a microfrontend architecture using iframes.
Stars: ✭ 51 (+131.82%)
Mutual labels:  messaging
conceal-desktop
Conceal Desktop (GUI)
Stars: ✭ 65 (+195.45%)
Mutual labels:  messaging
tgip
TGIP (TGI Pulsar) is a weekly live video streaming about Apache Pulsar and its ecosystem.
Stars: ✭ 17 (-22.73%)
Mutual labels:  messaging
RebelChat
Rebel Chat 💬 - is a modern way to keep in touch with any team, and keep your messaging under control right in your editor.
Stars: ✭ 19 (-13.64%)
Mutual labels:  messaging
streamsx.kafka
Repository for integration with Apache Kafka
Stars: ✭ 13 (-40.91%)
Mutual labels:  messaging
extension-springcloud
Axon Framework extension for Spring Cloud's Discovery mechanism integration to distribute Command messages.
Stars: ✭ 22 (+0%)
Mutual labels:  messaging
WatsonCluster
A simple C# class using Watson TCP to enable a one-to-one high availability cluster.
Stars: ✭ 18 (-18.18%)
Mutual labels:  messaging
qpid-broker-j
Mirror of Apache Qpid Broker-J
Stars: ✭ 52 (+136.36%)
Mutual labels:  messaging
qpid-cpp
Mirror of Apache Qpid C++
Stars: ✭ 77 (+250%)
Mutual labels:  messaging
iGap-iOS
iGap Client for iOS Source Code
Stars: ✭ 18 (-18.18%)
Mutual labels:  messaging

Muni

Chat framework

Feature 🎊

☑️ Serverless - Firebase Cloud Firestore
☑️ Realtime
☑️ Customizable
☑️ Type Safe
☑️ Multi Media

Media

  • Text
  • Image
  • Video
  • Audio
  • Location
  • Sticker
  • ImageMap

Installation

pod 'Muni' add to your Podfile

pod install

GoogleService-Info.plist add to your Project

Usage

Prepare three documents for cloud firestore.

UserProtocol RoomProtocol TranscriptProtocol create document conforming to each protocol.

@objcMembers
class User: Object, UserProtocol {
    var name: String?
    var thumbnailImage: File?
}
@objcMembers
class Room: Object, RoomProtocol {
    typealias TranscriptType = Transcript
    dynamic var name: String?
    dynamic var thumbnailImage: File?
    dynamic var viewers: [String] = []
    dynamic var members: [String] = []
    dynamic var recentTranscript: [String: Any] = [:]
    dynamic var transcripts: NestedCollection<TranscriptType> = []
    dynamic var config: [String: Any] = [:]
    dynamic var isMessagingEnabled: Bool = true
    dynamic var isHidden: Bool = false
    dynamic var lastViewedTimestamps: [String : Timestamp] = [:]
}
@objcMembers
class Transcript: Object, TranscriptProtocol {
    dynamic var to: Relation<Room> = .init()
    dynamic var from: Relation<User> = .init()
    dynamic var text: String?
    dynamic var image: File?
    dynamic var video: File?
    dynamic var audio: File?
    dynamic var location: GeoPoint?
    dynamic var sticker: String?
    dynamic var imageMap: [File] = []
}

Override two ViewControllers

class MessageViewController: Muni<User, Room, Transcript>.MessagesViewController {

    var sendBarItem: ToolbarItem!

    override var senderID: String? {
        return Auth.auth().currentUser!.uid
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        self.sendBarItem = ToolbarItem(title: "Send", target: self, action: #selector(send))
        self.toolBar.setItems([ToolbarItem(customView: self.textView), self.sendBarItem], animated: false)
        
        // Start
        self.listen()
    }

    override func transcript(willSend transcript: Transcript) -> Bool {
        guard let text: String = self.textView.text else { return false }
        if text.isEmpty { return false }
        transcript.text = text
        self.textView.text = nil
        return true
    }
}
class BoxViewController: Muni<User, Room, Transcript>.InboxViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Start
        self.listen()
    }

    override func messageViewController(with room: Room) -> Muni<User, Room, Transcript>.MessagesViewController {
        return MessageViewController(roomID: room.id)
    }
}

Build

Muni internally uses Firestore Query. An error occurs if there is no Index in Firestore. You can create an Index by accessing the URL on the console.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].