How nishalkc/chatlify-app works
Chatlify is a browser-based messaging app with account access, conversations, and live chat features. A typical user opens the app, restores their session or signs in, then enters the chat view to browse conversations and send or read messages. The server exposes authenticated account, conversation, and message routes; message handling also emits live updates. The graph includes the major UI, HTTP, persistence, and socket responsibilities. Source excerpts show much of the wiring; conversation behavior and some UI details are represented only at the subsystem level based on the source index.
Main entry points: Chat.jsx Chat view · Api.jsx API client · App.jsx App routing · Chatmessages.jsx Message list
Components 23
Browser app
- App routing
client/src/App.jsx - Login and register
client/src/pages - Chat view
client/src/pages/Chat.jsx - Conversation sidebar
client/src/components/chat/ChatSideBar.jsx - Message list
client/src/components/chat/Chatmessages.jsx - Message display
client/src/components/chat/Messagebubble.jsx - Message composer
client/src/components/chat/ChatInput.jsx - User avatar
client/src/components/common/Avatar.jsx - API client
client/src/services/Api.jsx - Socket client
client/src/context/SocketContext.jsx
HTTP API
- HTTP routing
server/app.js - Account routes
server/routes/userRoutes.js - Account handling
server/controllers/authcontroller.js - Session protection
server/middleware/authMiddleware.js - Conversation routes
server/routes/conversationRoutes.js - Conversation handling
server/controllers/conversationcontroller.js - Message routes
server/routes/messageRoutes.js - Message handling
server/controllers/messagecontroller.js
Live messaging
- Socket events
server/socket/socket.js
Persistence
- User records
server/models/user.js - Conversation records
server/models/conversation.js - Message records
server/models/message.js
Other components
- Chat user
Connections 32
- Chat user → App routing: uses
- App routing → Login and register: routes to
client/src/App.jsx - App routing → Chat view: routes to
client/src/App.jsx - App routing → API client: loads session
client/src/App.jsx - Chat view → Conversation sidebar: renders
client/src/pages/Chat.jsx - Chat view → Message list: renders
client/src/pages/Chat.jsx - Chat view → Message composer: renders
client/src/pages/Chat.jsx - Chat view → API client: requests data
client/src/pages/Chat.jsx - Chat view → Socket client: uses
client/src/pages/Chat.jsx - Conversation sidebar → User avatar: renders
client/src/components/chat/ChatSideBar.jsx - Conversation sidebar → API client: requests data
client/src/components/chat/ChatSideBar.jsx - Message list → Message display: renders
client/src/components/chat/Chatmessages.jsx - Message list → API client: requests messages
client/src/components/chat/Chatmessages.jsx - Message list → Socket client: listens on
client/src/components/chat/Chatmessages.jsx - Message composer → API client: sends messages
client/src/components/chat/ChatInput.jsx - Message composer → Socket client: emits events
client/src/components/chat/ChatInput.jsx - Login and register → API client: login requests
client/src/pages/Login.jsx - HTTP routing → Account routes: mounts
server/app.js - HTTP routing → Conversation routes: mounts
server/app.js - HTTP routing → Message routes: mounts
server/app.js - Account routes → Account handling: dispatches to
server/routes/userRoutes.js - Account routes → Session protection: protects route
server/routes/userRoutes.js - Conversation routes → Conversation handling: dispatches to
server/routes/conversationRoutes.js - Conversation routes → Session protection: protects routes
server/routes/conversationRoutes.js - Message routes → Message handling: dispatches to
server/routes/messageRoutes.js - Message routes → Session protection: protects routes
server/routes/messageRoutes.js - Account handling → User records: reads and writes
server/controllers/authcontroller.js - Session protection → User records: looks up user
server/middleware/authMiddleware.js - Conversation handling → Conversation records: reads and writes
server/controllers/conversationcontroller.js - Message handling → Conversation records: updates conversation
server/controllers/messagecontroller.js - Message handling → Message records: reads and writes
server/controllers/messagecontroller.js - Message handling → Socket events: emits message
server/controllers/messagecontroller.js