How gaurav-patil-13/quick-chat works
QuickChat is a one-to-one messaging application. A user authenticates, opens the directory, selects a person, loads chat history, and sends text or an image; the server persists messages and dispatches them to an online recipient, while tracking presence and seen state. The graph reflects documented profile and media features as well as sampled API, context, and socket wiring. Some UI and route internals are not sampled, so their detailed connections are omitted.
Main entry points: messageController.js Message operations · ChatContext.jsx Chat state · server.js Socket and presence · App.jsx App routing
Components 21
Client experience
- App routing
Client/src/App.jsx - Authentication state
Client/context/AuthContext.jsx - Chat state
Client/context/ChatContext.jsx - Chat workspace
Client/src/Pages/HomePage.jsx - Login and signup
Client/src/Pages/LoginPage.jsx - Profile management
Client/src/Pages/ProfilePage.jsx - User directory
Client/src/Components/SideBar.jsx - Conversation view
Client/src/Components/ChatContainer.jsx - Chat details
Client/src/Components/RightSideBar.jsx
API and messaging
- User API routes
Server/Routes/userRoutes.js - Message API routes
Server/Routes/messageRoutes.js - User operations
Server/controllers/userController.js - Message operations
Server/controllers/messageController.js - JWT protection
Server/middleware/auth.js - Socket and presence
Server/server.js
Persistence and media
- User records
Server/models/User.js - Message records
Server/models/message.js - MongoDB connection
Server/lib/db.js - Cloudinary media
Server/lib/cloudinary.js
Other components
- Chat user
- Cloudinary service
Connections 28
- Chat user → App routing: uses
- App routing → Login and signup: routes unauthenticated
- App routing → Chat workspace: routes authenticated
- App routing → Profile management: routes profile
- Login and signup → Authentication state: submits credentials
- Profile management → Authentication state: updates profile
- Chat workspace → User directory: renders
- Chat workspace → Conversation view: renders
- Chat workspace → Chat details: renders
- User directory → Chat state: loads users
- Conversation view → Chat state: loads and sends
- Authentication state → User API routes: requests auth
- Authentication state → Socket and presence: connects socket
- Chat state → Message API routes: requests chats
- Chat state → Socket and presence: receives events
- User API routes → User operations: dispatches
- Message API routes → JWT protection: protects requests
- JWT protection → User records: loads user
- Message API routes → Message operations: dispatches
- User operations → User records: reads and writes
- Message operations → User records: queries directory
- Message operations → Message records: reads and writes
- Message operations → Cloudinary media: uploads media
- User operations → Cloudinary media: uploads profile image
- Cloudinary media → Cloudinary service: stores media
- Message operations → Socket and presence: dispatches message
- Socket and presence → Chat state: emits message and presence
- Socket and presence → MongoDB connection: connects