How ancientkingg/oculite works
High-Level Architecture Overview
First, represent the three main decoupled components:
• Frontend (Vue.js client)
• Backend (Rust/Rocket server)
• Monitors (Independent services)
Component Breakdown
a. Frontend Layer:
• Core Vue components (Dashboard, Category views)
• Services layer (categoryService, itemTrackerService, statsService)
• Layout components
• Router
• State management
b. Backend Layer:
• API Controllers (category.rs, itemtracker.rs, stats.rs)
• Services layer (services/*.rs)
• Persistence layer (persist/*.rs)
• Database connection (PostgreSQL)
c. Monitors Layer:
• AutoDoc monitor
• Example monitor
• Extension point for future monitors
Data Flow Representation
• Frontend → Backend API calls
• Backend → Monitor API calls
• Backend → Database interactions
• Monitor → External Services calls
Specific Implementation Details
Technical details in annotations:
Frontend:
• Vue.js 3
• PrimeVue components
• Vite build system
• TypeScript
Backend:
• Rust/Rocket framework
• SQLX for database operations
• REST API endpoints
• PostgreSQL database
Monitors:
• Standardized REST API interface
• Language-agnostic implementation
• JSON response schema
Key Interactions
Following flows:
User interaction flow
• User → Frontend → Backend → Database
Monitor data collection flow
• Backend → Monitors → External Sources
Data aggregation flow
• Monitors → Backend → Database → Frontend
Additional Elements
Include:
• API endpoint specifications
• Database schema representation
• Authentication flow (if implemented)
• Monitoring/scheduling mechanisms
Notes for Implementation Details
Annotations for:
• REST API endpoints
• Database tables
• Monitor API contract
• Configuration requirements
• Deployment considerations
The clear separation of concerns between components
Remember to include all critical environment variables and configuration points as noted in the README:
• DATABASE_URL
• VITE_API_BASE_URL
• API_BASE_URL
• API_TOKEN