How harsha12a/justus works
JustUs is a web chat application. Users can register or log in, then access protected chat and profile views; the server supports creating chats and retrieving messages, while Socket.IO handles live message delivery and deletion. The sampled source confirms signup’s HTTP request and the realtime server’s message persistence and dispatch. Other client request wiring and router-to-controller mappings were not sampled, so those links are omitted.
Main entry points: index.js HTTP entry · App.tsx App router · prisma.config.js Prisma client · ProtectedRoute.tsx Protected routes
Components 21
Web client
- App router
client/src/App.tsx - Signup
client/src/components/SignUp.tsx - Login
client/src/components/Login.tsx - Protected routes
client/src/components/ProtectedRoute.tsx - Chat view
client/src/components/Chat.tsx - Profile view
client/src/components/Profile.tsx - Persisted state
client/src/redux/store.ts
HTTP service
- Chat API
server/src/routers/chat.route.js - User API
server/src/routers/user.route.js - Message API
server/src/routers/message.route.js - HTTP entry
server/src/index.js - User operations
server/src/controllers/user.controller.js - Chat operations
server/src/controllers/chat.controller.js - Message operations
server/src/controllers/message.controller.js - Token verification
server/src/middlewares/tokenVerify.js
Realtime messaging
- Socket handlers
server/socket/socket.js - Socket.IO server
server/src/index.js
Data persistence
- Prisma client
server/src/utils/prisma.config.js - Application database
server/prisma/schema.prisma
Other components
- User
- Browser HTTP client
Connections 20
- User → App router: uses
- App router → Signup: routes
- App router → Login: routes
- App router → Protected routes: guards
- Protected routes → Chat view: allows
- Protected routes → Profile view: allows
- App router → Persisted state: renders within
- Signup → Browser HTTP client: posts signup
- HTTP entry → User API: mounts
- HTTP entry → Chat API: mounts
- HTTP entry → Message API: mounts
- HTTP entry → Socket.IO server: creates
- HTTP entry → Socket handlers: initializes
- Socket handlers → Message operations: calls save/delete
- User operations → Prisma client: reads/writes
- Chat operations → Prisma client: reads/writes
- Message operations → Prisma client: reads/writes
- Prisma client → Application database: accesses
- Browser HTTP client → HTTP entry: HTTP requests
- Socket.IO server → Socket handlers: dispatches events