How ohlesl1e/unfriendly-chat works
Unfriendly Chat is a browser-based private messaging application. Users register or log in, create Signal-protocol key material, find or open a room, establish an encrypted session, and exchange ciphertext over Socket.IO; room and account data are served through REST endpoints. The map separates browser flows, cryptographic state, server routes, and persistence. Home and some client behavior are represented from the documented frontend structure and source index; their detailed interactions were not sampled, so no unverified calls are asserted.
Main entry points: Room.jsx Chat room · auth.js Authentication routes · App.jsx App and routing · Login.jsx Login
Components 18
Browser application
- Client bootstrap
application/client/src/main.jsx - App and routing
application/client/src/App.jsx - Home and rooms
application/client/src/pages/Home.jsx - Login
application/client/src/pages/Login.jsx - Signup
application/client/src/pages/Signup.jsx - Chat room
application/client/src/pages/Room.jsx - Message view
application/client/src/components/Message.jsx - Window sizing
application/client/src/components/resize.js
Encryption and session state
- Signal key store
application/client/src/signal/store.js - Signal store instance
application/client/src/signal/state.js - Signal protocol library
Backend services
- Express gateway
application/server/index.js - Authentication routes
application/server/routes/auth.js - Input sanitization
application/server/util/input_validation.js - Room REST and sockets
application/server/routes/message.js
Persistence
- MongoDB
- Session store
application/server/index.js
Other components
- Chat user
Connections 29
- Chat user → Client bootstrap: uses
application/client/src/main.jsx - Client bootstrap → App and routing: renders
application/client/src/main.jsx - App and routing → Home and rooms: routes to
application/client/src/App.jsx - App and routing → Login: routes to
application/client/src/App.jsx - App and routing → Signup: routes to
application/client/src/App.jsx - App and routing → Chat room: routes to
application/client/src/App.jsx - Login → Authentication routes: posts credentials
application/client/src/pages/Login.jsx - Signup → Authentication routes: registers account
application/client/src/pages/Signup.jsx - Login → Signal protocol library: generates keys
application/client/src/pages/Login.jsx - Signup → Signal protocol library: generates keys
application/client/src/pages/Signup.jsx - Login → Signal key store: stores key material
application/client/src/pages/Login.jsx - App and routing → Signal store instance: loads persisted keys
application/client/src/App.jsx - Signal store instance → Signal key store: exports instance
application/client/src/signal/state.js - Chat room → Signal protocol library: encrypts and decrypts
application/client/src/pages/Room.jsx - Chat room → Signal key store: uses session state
application/client/src/pages/Room.jsx - Chat room → Room REST and sockets: requests room data
application/client/src/pages/Room.jsx - Chat room → Room REST and sockets: emits ciphertext
application/client/src/pages/Room.jsx - Room REST and sockets → Chat room: broadcasts ciphertext
application/server/routes/message.js - Chat room → Window sizing: reads window size
application/client/src/pages/Room.jsx - Chat room → Message view: renders messages
application/client/src/pages/Room.jsx - Express gateway → Authentication routes: mounts routes
application/server/index.js - Express gateway → Room REST and sockets: mounts routes
application/server/index.js - Authentication routes → Input sanitization: sanitizes username
application/server/routes/auth.js - Authentication routes → MongoDB: reads and writes users
application/server/routes/auth.js - Room REST and sockets → MongoDB: reads and writes rooms
application/server/routes/message.js - Express gateway → Session store: configures sessions
application/server/index.js - Session store → MongoDB: stores sessions
application/server/index.js - Authentication routes → Login: returns account session
application/client/src/pages/Login.jsx - Authentication routes → Signup: returns account session
application/client/src/pages/Signup.jsx