How robinthrift/belt works
Main Components Identification
a) Frontend Layer:
• UI Components (React-based, found in /ui/src/components)
• State Management (found in /ui/src/state)
• API Client Layer (found in /ui/src/storage/remote)
b) Backend Layer:
• HTTP Server (/internal/server)
• Authentication System (/internal/auth)
• API Controllers (/internal/control)
• Plugin System (/internal/plugins)
• Storage Layer (/internal/storage)
┌─ Client Layer ─────────────────────┐
• React UI │
• ┌─────────────┐ ┌────────────┐ │
• Components │ │ State │ │
• ┘ └────────────┘ │
• ┌─────────────────────────────────┐│
• API Client Layer ││
• ┴─────────────────────────────────┘│
• ▲ ▼
• HTTP/WebSocket
┌─ Server Layer ────────────────────────────────────┐
• ┌─────────────┐ ┌────────────┐ ┌───────────┐ │
• Ingress │───▶│ Controllers│ │ Plugins │ │
• ┘ └────────────┘ └───────────┘ │
• ┌─────────────┐ ┌────────────┐ │ │
• Auth │◀───│ Domain │◀──────┘ │
• ┘ └────────────┘ │
• ┌─────────────────────────────────────────────┐ │
• Storage Layer │ │
• ┌────────────┐ ┌─────────────┐ │ │
• Database │ │ Filesystem │ │ │
• ┘ └─────────────┘ │ │
• ┘ │
• ┘
Component Relationships
• User interactions flow from UI Components → State Management → API Client
• API requests flow from API Client → Server Ingress → Controllers
• Authentication checks flow between Controllers ↔ Auth
• Data operations flow from Controllers → Domain → Storage
• Plugin interactions flow from Plugins → Domain
Important Details
a) Frontend:
• Separation between UI components and state management
• API client interface
• Markdown processing system
b) Backend:
• Plugin architecture for extensibility
• Storage abstraction with both SQLite and filesystem
• Authentication and session management
• API versioning (v1)
Technical Stack Callouts
Labels for key technologies:
• React (Frontend)
• SQLite (Database)
• Go (Backend)
• OpenAPI (API Documentation)
• Markdown Processing
• Authentication System