Sytime is p2p chat Dapp which is built on IPFS pubsub, Web3.Storage and Ceramic to work with all data.
Sytime is decentralised chat application. Users can connect to our DApp with their Ethereum wallet, with an extension like Metamask. Sytime allows users to create and edit personal accounts on the Ceramic platform leveraging decentralized identity and user data sovereignty to interact with other users in a chat. Users can also chat with others in different rooms and view the history of each room as well as send pictures to chat. The list of rooms is also stored as part of the ceramic profile so users can keep their chat history handy in different browser sessions.
How it's made
We use Discordian's Web-RTC star node to be able connect to IPFS pubsub. We use pubsub to subscribe to the specific room and send messages there. Personal account info is stored in Ceramic user model, we also store all rooms that the user is connected to in this model. The message history is fetched from Web3.Storage and we make new snapshot of history every time someone sends a message. When someone sends a picture to chat - the picture is sent to IPFS first, and then fetched to be displayed in chat. All users are subscribed on themselves by default - we did this so that people could create rooms for two. In terms of two peers, let's say that we are peer2 and we want to connect with peer1. By default all users are subscribed to a big "example_topic" room. And also, as I said, by default each user will be subscribed to the room with the name of their peer-id. After that if peer2 want to connect with peer1, peer2 can subscribe to peer1.id room. In this room peer2 can send invite only to peer1 for room with only two of them. The name of this room will be very big, it will include your peer2.id and peer1.id, so effectively this is a direct message. Then peer2 will be unsubscribed from peer-1.id room. We create a hash table to display only names of peers as names of rooms. We create the same mechanism with peers: we don't display peer ids, but instead we display their names from Ceramic user model. For the front-end we use React. And with it we use Material-UI to do what you can see on the screens. We also host Sytime on Fleek :)