How rohit0265/covo-ai-assistant works
Covo AI is a multi-model assistant with a React chat interface backed by an Express gateway and separate authentication, conversation, agent, and billing services. A user signs in, works with conversations, submits prompts for routed agent responses, and can purchase credits. The README documents the gateway-to-service architecture; sampled controller and UI excerpts show key calls and persistence. Several feature implementations were not sampled, so their internal relationships are shown only where documented or evidenced by the source index.
Main entry points: index.js API gateway · Home.jsx Home and login · auth.controllers.js Authentication · billing.controller.js Billing service
Components 23
Chat interface
- Home and login
frontend/src/pages/Home.jsx - Chat interface
frontend/src/components/chatArea.jsx - Conversation sidebar
frontend/src/components/sideBar.jsx - Artifact viewer
frontend/src/components/artifacts.jsx - User state
frontend/src/redux/userSlice.js
API gateway
- API gateway
backend/gateway/index.js - Session guard
backend/gateway/middleware/auth.middleware.js
Identity and sessions
- Session cache
backend/shared/redis/redis.js - Authentication
backend/services/auth/controllers/auth.controllers.js - User records
backend/services/auth/models/users.model.js
AI and conversations
- Conversation service
backend/services/chat/controllers/chat.controller.js - Conversation records
backend/services/chat/model/conversation.models.js - Message records
backend/services/chat/model/message.model.js - Agent endpoint
backend/services/agent/controllers/agent.controller.js - LangGraph workflow
backend/services/agent/graph/graph.js - Intent router
backend/services/agent/graph/router.js - Agent capabilities
backend/services/agent/agents
Billing
- Billing service
backend/services/billing/controllers/billing.controller.js - Payment records
backend/services/billing/models/payment.models.js
Other components
- User
- Firebase Auth
- LLM providers
- Razorpay
Connections 27
- User → Home and login: uses
README.md - Home and login → Chat interface: renders
frontend/src/pages/Home.jsx - Home and login → Conversation sidebar: renders
frontend/src/pages/Home.jsx - Home and login → Artifact viewer: renders
frontend/src/pages/Home.jsx - Home and login → API gateway: authenticates via
frontend/src/pages/Home.jsx - Home and login → User state: updates
frontend/src/pages/Home.jsx - Chat interface → API gateway: requests chat
frontend/src/components/chatArea.jsx - Chat interface → Artifact viewer: updates artifacts
frontend/src/components/chatArea.jsx - API gateway → Session guard: checks sessions
README.md - Session guard → Session cache: reads session
backend/gateway/middleware/auth.middleware.js - API gateway → Authentication: proxies auth
README.md - API gateway → Conversation service: proxies chat
README.md - API gateway → Agent endpoint: proxies agent
README.md - API gateway → Billing service: proxies billing
README.md - Authentication → Firebase Auth: verifies token
backend/services/auth/controllers/auth.controllers.js - Authentication → User records: reads and writes
backend/services/auth/controllers/auth.controllers.js - Authentication → Session cache: stores session
backend/services/auth/controllers/auth.controllers.js - Conversation service → Conversation records: reads and writes
backend/services/chat/controllers/chat.controller.js - Conversation service → Message records: reads and writes
backend/services/chat/controllers/chat.controller.js - Agent endpoint → Conversation service: saves messages
backend/services/agent/controllers/agent.controller.js - Agent endpoint → LangGraph workflow: invokes graph
backend/services/agent/controllers/agent.controller.js - LangGraph workflow → Intent router: routes intent
backend/services/agent/graph/graph.js - LangGraph workflow → Agent capabilities: dispatches agents
backend/services/agent/graph/graph.js - Intent router → LLM providers: classifies prompt
backend/services/agent/graph/router.js - Billing service → Razorpay: creates orders
backend/services/billing/controllers/billing.controller.js - Billing service → Payment records: records payment
backend/services/billing/controllers/billing.controller.js - Billing service → Authentication: updates account
backend/services/billing/controllers/billing.controller.js