free4.chat is an instant audio conferencing service.
It is designed by the local first and privacy first
principle, and is very easy to use.
⚠️ This project is just using for technical test purpose, use at all your risk!
⚠️ There is freedom of speech, but I cannot guarantee freedom after speech. (- Idi Amin)
Features
- Common
- Use WebSocket to replace http protocol of JSON-RPC
- Compatibility
- Make Safari(WebKit) compatibility better
- Room
- Text chat, can sent text or emoji
- Persist text messages to browser localStorage
- Can send arbitrary data by WebRTC datachannel
🚩 - Room permission setting, like public/private type setting
- private room can't been seen on room discovery, and it needs password to enter. The password is End-to-End Encryption, server only need check the answer which given by the client like the
PoW
in blockchain. - Public rooms discovery, like hot room list or filter rooms by type/tag
- private room can't been seen on room discovery, and it needs password to enter. The password is End-to-End Encryption, server only need check the answer which given by the client like the
- Text chat, can sent text or emoji
- User
- User real-time collaboration, like whiteboard, you draw I guess, etc.
- Use CRDT to impelement real-time collaboration
- Whiteboard
- Robot user, like game robot who can play or facilitate game
- robot use Web Speech API to play with user in room
- robot can play some voice games like language learning, technical interview, etc.
- User real-time collaboration, like whiteboard, you draw I guess, etc.
Architecture
- Tech Stack
- Use Elixir/Phoenix to rewrite the backend code
- Use Recat/Next.js to rewrite the frontend code
- Infra
-
Use docker to deploy to PaaS platform like Railway or Fly - Use GitHub Actions + AWS Lightsail to deploy backend server
- Backend service cluster, auto scaling, load balancing, etc.
- Backend service use Elixir libcluster to build cluster
- Frontend app use the client load balance strategy
- TURN cluster scale
- Fix by start turn before the libcluster, still wait the upstream library to fix it normally
- Security enhancement, like coturn TLS setup, end-to-end encryption, etc.
- TURN enable TLS
- Privacy enhancement.
- IPV6 support.
-
Contribution
If you are interested in webRTC
, peer-to-peer(P2P)
, real-time collaboration(CRDT)
, distributed system
or robot design
, you can join this project and contact with me by twitter.
Thanks
- free4.chat Elixir version is build on the top of Membrane Framework, thanks for their heart of open source.
- free4.chat Golang version is build on the top of Kraken, Mornin, coturn and Pion, thanks for their heart of open source.
- These websites also inspired me: