How talha-ai-spec/nexusmind works
NexusMind is a local-first, multimodal AI workspace: people use its web UI for streaming chat, image tasks, document RAG, and voice conversations. The principal chat flow runs from the web chat through the API’s chat route and service, which selects local or cloud models and streams results back. Other product branches cover image generation, voice, the document library, and observability. Edges reflect README workflow statements and shown wiring; unsampled implementation details are not asserted.
Main entry points: main.py API application · routes.py Voice API · registry.py Provider selection · base.py Model providers
Components 28
Web workspace
- Chat interface
copilot-app/web/components/chat/chat-app.tsx - Chat state
copilot-app/web/hooks/use-chat.ts - Web API client
copilot-app/web/lib/api.ts
API and chat
- API application
copilot-app/api/app/main.py - Chat route
copilot-app/api/app/routes/chat.py - Chat streaming
copilot-app/api/app/services/chat.py - Provider selection
copilot-app/api/app/providers/registry.py - Model providers
copilot-app/api/app/providers/base.py
Media features
- Vision capability
copilot-app/api/app/vision.py - Image tools
copilot-app/web/components/chat/image-gen-dialog.tsx - Image routes
copilot-app/api/app/routes/images.py - Image generation
copilot-app/api/app/services/image_gen.py
Voice conversations
- Voice session UI
copilot-app/web/components/voice/voice-session.tsx - Voice API
copilot-app/api/app/voice/routes.py - LiveKit agent
copilot-app/agent/voice_agent.py - API-backed LLM
copilot-app/agent/app_llm.py
Document library
- Library workspace
copilot-app/web/components/library/documents.tsx - Library routes
copilot-app/api/app/library/routes.py - Library service
copilot-app/api/app/library/service.py - Document records
copilot-app/api/app/library/db.py - RAG engine contract
copilot-app/api/app/library/engine.py - Offline RAG
copilot-app/api/app/library/offline.py - Gemini File Search
copilot-app/api/app/library/gemini.py
Other components
- User
- Ollama
- Cloud models
- Image engines
- LiveKit
Connections 31
- User → Chat interface: uses
README.md - Chat interface → Chat state: updates
README.md - Chat state → Web API client: requests
README.md - Web API client → Chat route: calls
README.md - API application → Chat route: mounts
copilot-app/api/app/main.py - Chat route → Chat streaming: handles chat
copilot-app/api/app/routes/chat.py - Chat streaming → Provider selection: selects models
copilot-app/api/app/providers/registry.py - Provider selection → Model providers: dispatches
copilot-app/api/app/providers/registry.py - Model providers → Ollama: serves locally
README.md - Model providers → Cloud models: falls back
README.md - Provider selection → Vision capability: checks capability
copilot-app/api/app/providers/registry.py - User → Image tools: requests images
README.md - Image tools → Image routes: submits
README.md - API application → Image routes: mounts
copilot-app/api/app/main.py - Image routes → Image generation: invokes
copilot-app/api/app/routes/images.py - Image generation → Image engines: generates with
README.md - User → Voice session UI: starts voice
README.md - Voice session UI → Voice API: creates session
README.md - API application → Voice API: mounts
copilot-app/api/app/main.py - Voice API → LiveKit: dispatches agent
- LiveKit → LiveKit agent: connects agent
README.md - LiveKit agent → API-backed LLM: uses
copilot-app/agent/voice_agent.py - API-backed LLM → Voice API: streams chat
copilot-app/agent/app_llm.py - User → Library workspace: manages documents
README.md - Library workspace → Library routes: uses library API
README.md - API application → Library routes: mounts
copilot-app/api/app/main.py - Library routes → Library service: delegates
copilot-app/api/app/library/routes.py - Library service → Document records: reads and writes
copilot-app/api/app/library/service.py - Library service → RAG engine contract: indexes and answers
copilot-app/api/app/library/service.py - RAG engine contract → Offline RAG: implemented by
README.md - RAG engine contract → Gemini File Search: implemented by
README.md