How yangshun2005/utopia-cn works
Utopia is an enterprise knowledge platform: users connect or upload sources, ingest documents, extract and govern time-aware facts, then explore the graph or ask questions through search and chat. The repository separates a React application, Rust API and workflow services, domain crates, and PostgreSQL-backed persistence. README-described capabilities include ontology editing, reasoning, entity resolution, conflict review, database querying, and audit history. Some subsystem links below are documented rather than verified in sampled source; those edges are marked dashed where appropriate.
Main entry points: pipeline.rs Document pipeline · db.rs PostgreSQL knowledge store · router.tsx Product screens · ingest_sources.rs Source synchronization
Components 27
User experience
- Web application
web/src/main.tsx - Product screens
web/src/router.tsx - Search and chat
web/src/pages/Chat.tsx - Graph explorer
web/src/pages/Graph.tsx - Ontology workbench
web/src/pages/Ontology.tsx - Review console
web/src/pages/Review.tsx
API and orchestration
- Rust application server
crates/utopia-server/src/main.rs - Authentication
crates/utopia-server/src/auth.rs - Source and document APIs
crates/utopia-server/src/api/sources_routes.rs - Graph API
crates/utopia-server/src/api/graph_routes.rs - Ontology API
crates/utopia-server/src/api/ontology_routes.rs - Review API
crates/utopia-server/src/api/review_routes.rs
Knowledge processing
- Source synchronization
crates/utopia-server/src/ingest_sources.rs - Document parsing
crates/utopia-ingest/src/parsers.rs - Fact extraction
crates/utopia-extract/src/lib.rs - Document pipeline
crates/utopia-server/src/pipeline.rs - Full-text search
crates/utopia-search/src/lib.rs - LLM integration
crates/utopia-llm/src/lib.rs
Knowledge governance
- Ontology and reasoning
crates/utopia-reason/src/derive.rs - Entity resolution
crates/utopia-server/src/type_resolution.rs - Temporal graph
crates/utopia-store/src/temporal.rs - Mounted database queries
crates/utopia-server/src/query_engine/mod.rs
Persistence and integrations
- PostgreSQL knowledge store
crates/utopia-store/src/db.rs - Document object storage
crates/utopia-server/src/object_storage.rs
Other components
- Workspace user
- Connected content sources
- Mounted enterprise database
Connections 29
- Workspace user → Web application: uses
README.md - Web application → Product screens: renders routes
web/src/main.tsx - Product screens → Search and chat: routes to
web/src/router.tsx - Product screens → Graph explorer: routes to
web/src/router.tsx - Product screens → Ontology workbench: routes to
web/src/router.tsx - Product screens → Review console: routes to
web/src/router.tsx - Web application → Rust application server: calls APIs
- Rust application server → Authentication: authenticates
- Source and document APIs → Source synchronization: schedules sync
crates/utopia-server/src/api/sources_routes.rs - Connected content sources → Source synchronization: provides content
README.md - Source synchronization → Document pipeline: submits documents
crates/utopia-server/src/ingest_sources.rs - Document pipeline → Document parsing: parses documents
README.md - Document pipeline → Fact extraction: extracts facts
README.md - Document pipeline → PostgreSQL knowledge store: persists results
README.md - Document pipeline → Full-text search: indexes documents
README.md - Document pipeline → LLM integration: requests models
crates/utopia-server/src/pipeline.rs - Search and chat → Full-text search: searches knowledge
README.md - Search and chat → Mounted database queries: queries mounted data
README.md - Mounted database queries → Mounted enterprise database: queries
README.md - Graph explorer → Graph API: requests graph
- Ontology workbench → Ontology API: edits ontology
- Review console → Review API: submits decisions
web/src/pages/Review.tsx - Graph API → PostgreSQL knowledge store: reads graph
crates/utopia-server/src/api/graph_routes.rs - Review API → PostgreSQL knowledge store: resolves decisions
crates/utopia-server/src/api/review_routes.rs - Ontology API → PostgreSQL knowledge store: saves ontology
crates/utopia-server/src/api/ontology_routes.rs - Ontology and reasoning → Temporal graph: derives facts
README.md - Entity resolution → PostgreSQL knowledge store: records merges
README.md - Temporal graph → PostgreSQL knowledge store: stores fact history
README.md - Document object storage → Source synchronization: supplies objects
crates/utopia-server/src/ingest_sources.rs