How weaiw/trove-ai works
Trove AI is a self-hosted personal knowledge-management agent. Users capture web content or files into a private library, then read, search, connect, and reuse it through AI answers, research, concepts, and learning paths. The web app and WeChat/Feishu bot interfaces share that library; review digests and Obsidian export extend the workflow. The graph emphasizes documented product capabilities and sampled service behavior; some feature wiring is represented at subsystem level because its implementation was not sampled.
Main entry points: main.py FastAPI app · database.py PostgreSQL library · app Web app · articles.py Article capture
Components 32
Web experience
- Web app
frontend/src/app - Auth context
frontend/src/contexts/AuthContext.tsx - API client
frontend/src/lib/api.ts - Capture and edit
frontend/src/components/AddContentModal.tsx - Reader and library
frontend/src/app/read/[id]/page.tsx - Knowledge views
frontend/src/app/graph/page.tsx - Review settings
frontend/src/components/ReviewSettings.tsx
Application API
- FastAPI app
backend/app/main.py - Article capture
backend/app/routers/articles.py - Assistant API
backend/app/routers/assistant.py - Research API
backend/app/routers/research.py - Concept API
backend/app/routers/concepts.py - Learning paths
backend/app/routers/learning.py - Review schedule
backend/app/routers/review.py - Auth and users
backend/app/routers/auth.py
Knowledge services
- Content extraction
backend/app/services/parser_service.py - AI processing
backend/app/services/ai_service.py - Search and RAG
backend/app/services/graph_retrieval.py - Knowledge graph
backend/app/services/graph_service.py - Concept synthesis
backend/app/services/concept_service.py - Research agent
backend/app/services/research_agent.py - Digest generation
backend/app/services/review_service.py
Channels and integrations
- Bot interfaces
backend/app/routers/wechat.py - MCP access
backend/app/routers/mcp.py - Obsidian export
backend/app/services/obsidian_writer.py - Feishu integration
backend/app/services/lark_service.py
Identity and data
- PostgreSQL library
backend/app/database.py - Domain models
backend/app/models - Runtime configuration
backend/app/config_manager.py
Other components
- Reader
- LLM provider
- WeChat service
Connections 43
- Reader → Web app: uses
- Web app → Capture and edit: captures content
- Web app → Reader and library: reads articles
- Web app → Knowledge views: explores knowledge
- Web app → Review settings: sets reviews
- Auth context → Auth and users: authenticates
- Capture and edit → API client: submits content
- Reader and library → API client: requests articles
- Knowledge views → API client: requests views
- Review settings → API client: manages schedule
- API client → FastAPI app: calls API
- FastAPI app → Article capture: dispatches
- FastAPI app → Assistant API: dispatches
- FastAPI app → Research API: dispatches
- FastAPI app → Concept API: dispatches
- FastAPI app → Learning paths: dispatches
- FastAPI app → Review schedule: dispatches
- FastAPI app → Auth and users: dispatches
- Article capture → Content extraction: extracts content
- Article capture → AI processing: analyzes content
- Article capture → PostgreSQL library: stores articles
- Assistant API → Search and RAG: retrieves context
- Assistant API → AI processing: generates answers
- Research API → Research agent: runs research
- Research agent → Search and RAG: finds sources
- Concept API → Concept synthesis: synthesizes pages
- Learning paths → AI processing: orders curriculum
- Review schedule → Digest generation: previews digest
- FastAPI app → Digest generation: starts scheduler
- Digest generation → PostgreSQL library: reads saved articles
- Digest generation → LLM provider: requests digest
- Digest generation → WeChat service: pushes digest
- Bot interfaces → Article capture: submits captures
- Bot interfaces → Assistant API: queries library
- MCP access → PostgreSQL library: accesses library
- Obsidian export → PostgreSQL library: reads library
- Feishu integration → PostgreSQL library: shares library
- Search and RAG → PostgreSQL library: searches articles
- Knowledge graph → PostgreSQL library: reads relationships
- Concept synthesis → PostgreSQL library: reads sources
- AI processing → LLM provider: calls model
- Domain models → PostgreSQL library: maps records
- Runtime configuration → AI processing: supplies settings