How rabithua/rote works
Rote is a self-hostable note-taking and social publishing application with a separate web frontend and backend. The main workflow is recording or importing notes, attaching media, storing and synchronizing content, then browsing or sharing it; optional AI adds indexing, retrieval, and chat over notes and articles. The graph also preserves documented articles, open APIs, administration, and integrations. Some feature directories were not sampled, so their internal call paths are omitted rather than inferred.
Main entry points: drizzle.ts Database client · src Web application · importService.ts Import service · routes.ts Note sharing
Components 22
Web client
- Web application
web/src - Notes and feed
web/src/pages/rote - Articles
web/src/pages/article - Import tools
web/src/features/import - AI conversations
web/src/features/ai-conversations
Backend API
- HTTP server
server/server.ts - REST routes
server/route/v2 - Authentication
server/middleware/jwtAuth.ts - MCP interface
server/mcp
Content services
- Media uploads
server/attachments - Import service
server/imports/importService.ts - Change sync
server/sync/routes.ts - Note sharing
server/noteShares/routes.ts
AI Memory
- Embedding worker
server/utils/dbMethods/ai/embeddingWorker.ts - Semantic retrieval
server/embeddings/query.ts - AI runtime
server/utils/ai
Platform services
- PostgreSQL data
server/drizzle/schema.ts - Database client
server/utils/drizzle.ts - Resource storage
server/resources/service.ts - Admin controls
web/src/pages/admin - Billing
server/billing/publicRoutes.ts
Other components
- User
Connections 21
- User → Web application: records and browses
- Web application → HTTP server: uses backend API
- HTTP server → REST routes: mounts routes
server/server.ts - REST routes → Authentication: authenticates requests
- Database client → PostgreSQL data: queries and persists
server/utils/drizzle.ts - Import service → Database client: persists imported data
server/imports/importService.ts - Import service → Resource storage: uses resource service
server/imports/importService.ts - Import service → Change sync: journals changes
server/imports/importService.ts - Change sync → Database client: reads sync state
server/sync/routes.ts - Note sharing → Authentication: requires authentication
server/noteShares/routes.ts - Note sharing → Database client: uses shared-note repository
- Embedding worker → Database client: processes indexing jobs
- Semantic retrieval → Database client: checks index state
server/embeddings/query.ts - Semantic retrieval → AI runtime: provides retrieval
- Admin controls → AI runtime: configures optional AI
- Web application → Media uploads: uploads media
- Web application → Import service: starts imports
- Web application → Note sharing: manages shared notes
- MCP interface → REST routes: exposes open interface
- Billing → PostgreSQL data: reads billing grants
server/billing/publicRoutes.ts - Resource storage → PostgreSQL data: stores resource state
server/resources/service.ts