How harshwardhan-1/whatsapp-clone works
This is a WhatsApp-style real-time messaging app. Users enter through login/signup or the home screen, then use chat and related screens for direct, group, and channel conversations; the client also exposes stories, nearby chat, documents, and AI chat. The server provides authentication, chat routes, uploads, and stories, alongside Socket.IO and MongoDB startup. Sampled controllers confirm persistent group-message and channel-message workflows, including chat-list updates and live delivery. Several listed product areas were not sampled, so their internal wiring is not inferred.
Main entry points: App.tsx App router · app.ts HTTP app · server.ts Server startup · group.message.model.ts Group messages store
Components 25
Client app
- App router
client/src/App.tsx - Login and signup
client/src/pages/Auth/login.tsx - Home screen
client/src/pages/HomePage/HomePage.tsx
Messaging features
- Direct chat
client/src/pages/Chat/chatPage.tsx - Group chat
client/src/pages/Chat/groupChatPage.tsx - Channel chat
client/src/pages/Chat/channelChat.tsx - Stories
client/src/components/Stories/stories.tsx - Nearby chat
client/src/pages/Chat/NearByChat.tsx - Documents
client/src/pages/Chat/Docs.tsx - AI chat
client/src/components/ChatWithAi/ChatWithAi.tsx - Channel management
server/src/controllers/channels.management.controller.ts - Channel messages
server/src/controllers/channels.message.controller.ts - Group management
server/src/controllers/group.management.controller.ts - Group messages
server/src/controllers/group.message.controller.ts
Server runtime
- HTTP app
server/src/app.ts - Auth routes
server/src/routes/auth.routes.ts - Chat routes
server/src/routes/chat.routes.ts - Story routes
server/src/routes/stories.routes.ts - Upload routes
server/src/routes/file.upload.routes.ts - Socket runtime
server/src/Socket/socket.ts - Server startup
server/src/server.ts
Persistence
- MongoDB connection
server/src/Database/connectDB.ts - Channel messages store
server/src/models/channels.message.model.ts - Group messages store
server/src/models/group.message.model.ts
Other components
- User
Connections 20
- User → App router: opens
- App router → Login and signup: routes to
- App router → Home screen: routes to
- App router → Direct chat: routes to
- App router → Group chat: routes to
- App router → Channel chat: routes to
- App router → Stories: routes to
- App router → Nearby chat: routes to
- App router → Documents: routes to
- App router → AI chat: routes to
- Server startup → HTTP app: serves
- Server startup → Socket runtime: starts
- Server startup → MongoDB connection: connects
- HTTP app → Auth routes: mounts
- HTTP app → Chat routes: mounts
- HTTP app → Story routes: mounts
- HTTP app → Upload routes: mounts
- Channel messages → Channel messages store: reads and writes
- Group messages → Group messages store: reads and writes
- Group management → Group messages store: creates messages