How hosutrungnguyen3105/ai_knowledge_hub_intelligent_document_assistant works
MindFlow AI is a multi-user AI workspace: users configure providers, then chat with models, compare responses, or create and run tool-using agents. Agent teams can coordinate workflows and produce downloadable website ZIPs; the product also includes projects, workforce resources, evaluations, approvals, and dashboards. The frontend is a Next.js client, the FastAPI backend exposes the product APIs, and MongoDB stores user-scoped state. The sampled source confirms app routing, authentication, MongoDB initialization, and agent execution entry points; other feature connections are based on README descriptions.
Main entry points: v1 Feature routes · main.py FastAPI app · agents.py Agent execution · api.js API client
Components 21
Workspace UI
- Sign-in forms
frontend/components/auth-form.jsx - Feature workspaces
frontend/components - API client
frontend/services/api.js
API and Identity
- Auth routes
backend/app/api/v1/auth.py - Feature routes
backend/app/api/v1 - FastAPI app
backend/app/main.py - Auth service
backend/app/services/auth.py - Agent routes
backend/app/api/v1/agents.py
AI Runtime
- Agent execution
backend/app/services/agents.py - Model adapters
backend/app/services/ai/chat.py - Provider base
backend/app/services/ai/base_provider.py - Agent tools
backend/app/services/ai/tools.py - Model comparison
backend/app/services/compare.py - Evaluation runs
backend/app/services/evaluation.py
Workflows and Work
- Agent collaboration
backend/app/services/collab.py - Agent workflows
backend/app/services/workflows.py - Projects and resources
backend/app/services/projects.py
Persistence
- MongoDB
- Database lifecycle
backend/app/core/database.py - Auth repository
backend/app/repositories/auth.py
Other components
- Workspace user
Connections 21
- Workspace user → Sign-in forms: signs in
- Sign-in forms → API client: submits via
- API client → Auth routes: sends requests
- Auth routes → Auth service: delegates to
backend/app/api/v1/auth.py - Auth service → Auth repository: uses
backend/app/services/auth.py - Auth repository → MongoDB: reads and writes
backend/app/repositories/auth.py - Workspace user → Feature workspaces: uses features
- Feature workspaces → API client: calls API
frontend/components/auth-guard.jsx - FastAPI app → Auth routes: registers routes
backend/app/main.py - FastAPI app → Feature routes: registers routes
backend/app/main.py - Agent routes → Agent execution: runs agents
backend/app/api/v1/agents.py - Agent execution → Model adapters: calls model
- Agent execution → Agent tools: executes tools
- Model adapters → Provider base: uses adapters
- Feature routes → Model comparison: routes comparisons
backend/app/api/v1/compare.py - Feature routes → Evaluation runs: routes evaluations
backend/app/api/v1/evaluations.py - Feature routes → Agent collaboration: routes collaboration
backend/app/api/v1/collab.py - Feature routes → Agent workflows: routes workflows
backend/app/api/v1/approvals.py - Feature routes → Projects and resources: routes projects
- FastAPI app → Database lifecycle: starts database
backend/app/main.py - Database lifecycle → MongoDB: initializes indexes
backend/app/core/database.py