How div641/hermes works
Hermes is a full-stack AI chat application. Users register and verify an account, log in, then create conversations, ask questions, and receive AI answers that can include current web information; they can revisit or delete chat history. The frontend also provides a public landing page and real-time client wiring. The graph follows sampled route, controller, and service calls; documented but unsampled UI and integrations are shown at their supported directory paths. Socket.IO is initialized, but its live event behavior is not established by the sampled server source.
Main entry points: app.js Express application · app.routes.jsx UI routes · chat.controller.js Chat controller · server.js HTTP and socket entry
Components 30
Frontend
- App shell
Frontend/src/app/App.jsx - UI routes
Frontend/src/app/app.routes.jsx - Landing experience
Frontend/src/features/landing/Landing.jsx
Authentication
- Auth pages and state
Frontend/src/features/auth - Auth actions
Frontend/src/features/auth/hook/useAuth.js - Auth API client
Frontend/src/features/auth/service/auth.api.js - Auth routes
Backend/src/routes/auth.routes.js - Auth controller
Backend/src/controllers/auth.controller.js - Session middleware
Backend/src/middlewares/auth.middleware.js - User records
Backend/src/models/user.model.js - Verification email
Backend/src/services/mail.service.js
Chat workflow
- Chat interface
Frontend/src/features/chat/pages/Dashboard.jsx - Chat state and hooks
Frontend/src/features/chat - Chat API client
Frontend/src/features/chat/service/chat.api.js - Socket client
Frontend/src/features/chat/service/chat.socket.js - Chat routes
Backend/src/routes/chat.routes.js - Chat controller
Backend/src/controllers/chat.controller.js - Chat records
Backend/src/models/chat.model.js - Message records
Backend/src/models/message.model.js
AI and search
- AI agent and titles
Backend/src/services/ai.service.js - Internet search tool
Backend/src/services/internet.service.js - Gemini and Mistral
- Tavily search
Runtime and state
- Express application
Backend/src/app.js - HTTP and socket entry
Backend/server.js - Database connection
Backend/src/config/database.js - MongoDB
- Socket.IO server
Backend/src/sockets/server.socket.js - Email service
Other components
- Visitor
Connections 35
- Visitor → App shell: opens app
- App shell → UI routes: renders routes
- UI routes → Landing experience: serves public page
- UI routes → Auth pages and state: serves auth pages
- UI routes → Chat interface: protects dashboard
- Auth pages and state → Auth actions: invokes actions
- Auth actions → Auth API client: calls endpoints
- Auth API client → Express application: HTTP requests
- Express application → Auth routes: mounts auth routes
- Auth routes → Auth controller: dispatches handlers
- Auth routes → Session middleware: guards session routes
- Auth controller → User records: reads and writes
- Auth controller → Verification email: sends verification
- Verification email → Email service: delivers email
- Chat interface → Chat state and hooks: uses chat state
- Chat state and hooks → Chat API client: requests chat data
- Chat API client → Express application: HTTP requests
- Chat interface → Socket client: uses live client
- Socket client → Socket.IO server: Socket.IO connection
- Express application → Chat routes: mounts chat routes
- Chat routes → Session middleware: guards chat routes
- Chat routes → Chat controller: dispatches handlers
- Chat controller → Chat records: creates and queries
- Chat controller → Message records: creates and queries
- Chat controller → AI agent and titles: generates title and answer
- AI agent and titles → Gemini and Mistral: invokes models
- AI agent and titles → Internet search tool: exposes search tool
- Internet search tool → Tavily search: searches web
- HTTP and socket entry → Express application: creates HTTP server
- HTTP and socket entry → Socket.IO server: initializes sockets
- HTTP and socket entry → Database connection: connects database
- Database connection → MongoDB: opens connection
- User records → MongoDB: persists users
- Chat records → MongoDB: persists chats
- Message records → MongoDB: persists messages