How engrtarun/chitraai works
Lobe Chat is a self-hostable chatbot framework. Users interact with chat workspaces and configure models, agents, and plugins; the server routes chat requests into an agent runtime and exposes related marketplace, plugin, speech, and image-generation APIs. The tree also shows session, topic, profile, and settings areas. Source excerpts establish several API dispatches, but the README is empty and most UI-to-API wiring and storage behavior were not sampled; those relationships are therefore omitted or marked unverified.
Main entry points: [provider]/route.ts Chat API Route · gateway/route.ts Plugin Gateway API · page.tsx Chat Workspace · agentRuntime.ts Agent Runtime
Components 22
Chat Experience
- Chat Workspace
video-generator-ui/src/app/(main)/chat/(workspace)/page.tsx - Session History
video-generator-ui/src/app/(main)/chat/@session/features/SessionListContent/index.tsx - Topics
video-generator-ui/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx - Agent Market UI
video-generator-ui/src/app/(main)/market/page.tsx
User Configuration
- Settings UI
video-generator-ui/src/app/(main)/settings/llm/page.tsx
Chat Runtime
- Chat API Route
video-generator-ui/src/app/api/chat/[provider]/route.ts - Agent Runtime
video-generator-ui/src/app/api/chat/agentRuntime.ts - API Key Manager
video-generator-ui/src/app/api/chat/apiKeyManager.ts - Provider Routes
video-generator-ui/src/app/api/chat/anthropic/route.ts
Extended Capabilities
- Market API
video-generator-ui/src/app/api/market/route.ts - Agent Market
video-generator-ui/src/app/api/market/AgentMarket.ts - Plugin Gateway API
video-generator-ui/src/app/api/plugin/gateway/route.ts - Plugin Settings Parser
video-generator-ui/src/app/api/plugin/gateway/settings.ts - Plugin Store API
video-generator-ui/src/app/api/plugin/store/route.ts - Plugin Store
video-generator-ui/src/app/api/plugin/store/Store.ts - Speech APIs
video-generator-ui/src/app/api/openai/tts/route.ts - Text-to-Image API
video-generator-ui/src/app/api/text-to-image/[provider]/route.ts - Clerk Webhook
video-generator-ui/src/app/api/webhooks/clerk/route.ts - Webhook Validation
video-generator-ui/src/app/api/webhooks/clerk/validateRequest.ts
Other components
- User
- LLM Provider
- Plugin Gateway Service
Connections 12
- User → Chat Workspace: uses
- Chat Workspace → Chat API Route: submits chat
- Chat API Route → Agent Runtime: initializes runtime
video-generator-ui/src/app/api/chat/[provider]/route.ts - Agent Runtime → API Key Manager: uses keys
video-generator-ui/src/app/api/chat/agentRuntime.ts - Provider Routes → Chat API Route: dispatches to
video-generator-ui/src/app/api/chat/anthropic/route.ts - Chat API Route → LLM Provider: requests completion
- Market API → Agent Market: resolves index
video-generator-ui/src/app/api/market/route.ts - Agent Market UI → Market API: browses agents
- Plugin Gateway API → Plugin Settings Parser: parses settings
video-generator-ui/src/app/api/plugin/gateway/route.ts - Plugin Gateway API → Plugin Gateway Service: forwards request
video-generator-ui/src/app/api/plugin/gateway/route.ts - Plugin Store API → Plugin Store: gets index URL
video-generator-ui/src/app/api/plugin/store/route.ts - Clerk Webhook → Webhook Validation: validates request
video-generator-ui/src/app/api/webhooks/clerk/route.ts