How bryceliu17/private-chat works
Private Chat is a React client with an Express and Socket.IO backend for authenticated, real-time chat among known users. The main workflow is login, choose a preset room, exchange text or media messages, and see room presence; the app also supports voice/video calls, administration, support payments, and Tetris game records. The server entry point wires route and socket modules. README capabilities and filenames inform unsampled branches; their internal implementation details are not inferred.
Main entry points: index.js HTTP and socket entry · App.jsx App coordinator · db.js PostgreSQL · messages.js Room messaging
Components 24
Client experience
- App coordinator
client/src/App.jsx - Login view
client/src/components/LoginView.jsx - Room list
client/src/components/RoomListView.jsx - Chat room view
client/src/components/ChatRoomView.jsx - User admin
client/src/components/AdminUsersPanel.jsx - Tetris game
client/src/components/TetrisGame.jsx - Game records
client/src/components/RecordsPage.jsx - Android shell
android/app/src/main/java/com/bryceliu/privatechat/MainActivity.java
Server features
- HTTP and socket entry
server/index.js - Authentication
server/auth.js - Room messaging
server/messages.js - Socket events
server/sockets.js - Room presence
server/presence.js - Support payments
server/payments.js - Record routes
server/gameRecords.js - Push notifications
server/pushNotifications.js - Media storage
server/storage.js - Message encryption
server/encryption.js
State and storage
- PostgreSQL
server/db.js - Uploaded media
server/storage.js
External services
- Stripe
- Firebase messaging
- Email service
Other components
- Chat user
Connections 32
- Chat user → App coordinator: uses
- App coordinator → Login view: renders
- App coordinator → Room list: renders
- App coordinator → Chat room view: renders
- App coordinator → User admin: renders
- Chat user → Login view: signs in
- App coordinator → HTTP and socket entry: HTTP requests
- App coordinator → Socket events: Socket.IO events
- HTTP and socket entry → Authentication: registers routes
- HTTP and socket entry → Room messaging: registers routes
- HTTP and socket entry → Support payments: registers routes
- HTTP and socket entry → Record routes: registers routes
- HTTP and socket entry → Push notifications: registers routes
- HTTP and socket entry → Media storage: registers routes
- HTTP and socket entry → Socket events: registers handlers
- HTTP and socket entry → Room presence: creates
- Authentication → PostgreSQL: reads and writes
- Room messaging → PostgreSQL: reads and writes
- Room messaging → Media storage: stores media
- Socket events → Room presence: uses
- Socket events → PostgreSQL: persists chat
- Room presence → PostgreSQL: reads and writes
- Media storage → Uploaded media: reads and writes
- Media storage → Message encryption: encrypts files
- Room messaging → Message encryption: encrypts text
- Support payments → Stripe: creates payments
- Push notifications → Firebase messaging: sends notifications
- Authentication → Email service: sends MFA codes
- Tetris game → HTTP and socket entry: submits records
- Game records → HTTP and socket entry: loads and deletes
- Record routes → PostgreSQL: reads and writes
- Android shell → App coordinator: hosts client