How s30-3-0/chat-app-starter works
This is a small real-time chat application: users sign up or sign in, obtain a JWT, join a room, and exchange messages. The React client calls the HTTP auth service and opens a WebSocket; the WebSocket service verifies identity, checks the user record, and uses Redis pub/sub to fan messages out across server instances. The excerpts show these runtime paths, but the README is empty and the Prisma schemas were not sampled, so database details beyond user lookup and creation are omitted.
Main entry points: websocket/index.js Socket connections · App.jsx Chat interface · backend/index.js Signup and signin · schema.prisma User database
Components 9
Chat client
- Chat interface
frontend/src/App.jsx - React entry
frontend/src/main.jsx
Identity service
- Signup and signin
backend/index.js
Realtime service
- Socket connections
websocket/index.js - Room membership
websocket/index.js - Message fanout
websocket/index.js
User state
- User database
backend/prisma/schema.prisma
Other components
- Chat user
- Redis pub/sub
Connections 11
- Chat user → Chat interface: uses
frontend/src/App.jsx - React entry → Chat interface: renders
frontend/src/main.jsx - Chat interface → Signup and signin: requests auth
frontend/src/App.jsx - Signup and signin → User database: reads and writes
backend/index.js - Chat interface → Socket connections: opens socket
frontend/src/App.jsx - Socket connections → User database: checks user
websocket/index.js - Socket connections → Room membership: registers room
websocket/index.js - Socket connections → Message fanout: handles messages
websocket/index.js - Message fanout → Redis pub/sub: publishes
websocket/index.js - Redis pub/sub → Message fanout: delivers messages
websocket/index.js - Message fanout → Chat user: sends room messages
websocket/index.js