Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guillempuche/simple_text_chat_powered_by_waku
A simple text chat in React (Typescript) powered by Waku (a P2P protocol)
https://github.com/guillempuche/simple_text_chat_powered_by_waku
chat p2p peer-to-peer react typescript waku waku-connect web3
Last synced: 10 days ago
JSON representation
A simple text chat in React (Typescript) powered by Waku (a P2P protocol)
- Host: GitHub
- URL: https://github.com/guillempuche/simple_text_chat_powered_by_waku
- Owner: guillempuche
- Created: 2022-08-18T19:02:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-18T19:00:31.000Z (about 2 years ago)
- Last Synced: 2024-10-20T07:46:27.174Z (19 days ago)
- Topics: chat, p2p, peer-to-peer, react, typescript, waku, waku-connect, web3
- Homepage:
- Size: 1.52 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple chat using Waku protocol
Elementary chat sends and receives messages from the other peers connected to the same **topic** and you who is online in real time.
![Screenshot of the chat: first user is typing something](screenshot_1.png)
![Screenshot of the chat: second receive message and reply](screenshot_2.png)## Steps to run the chat
1. Install the packages running the following command on the terminal `npm i`.
2. Open two terminals.
3. From the root of the project, run `npm start` on each of the two terminals.
4. Open two tabs on the browser:
1. The first one opening `http://localhost:3000`
2. The second one opening `http://localhost:3001`
5. You can chat.## To-do
- Save messages in the local storage only during the session of the user.
- After some time (15 minutes), delete the oldest online users.## Resources
- Waku's specifications https://rfc.vac.dev/spec/10/
- The code is an improvement of https://github.com/status-im/js-waku/blob/master/examples/relay-reactjs-chat/ (also in [Waku Connect's docs](https://docs.wakuconnect.dev/docs/guides/02_relay_receive_send_messages/)). We improve the methods for sending different kind of data (e.g. messages, online users...) in the Waku protocol.