How voodoos/ocamix works
Main Components
a) Frontend Layer:
• UI Components (found in bin/ui*.ml files)
• Player Component (bin/player.ml)
• Menu System (bin/menu.ml)
• Application State Management (bin/app_state.ml)
b) Data Management Layer:
• Local Database (IndexedDB)
• Database Worker (bin/db_worker)
• Database Stores and Schema (lib/db/*)
• Sync System (lib/db/sync.ml)
c) Data Source Layer:
• Jellyfin Integration (lib/data_source/jellyfin.ml)
• Data Source Interface (lib/data_source/data_source_intf.ml)
d) Worker Architecture:
• Worker Client (bin/worker_client.ml)
• Worker API (lib/worker_api/*)
[Frontend Layer]
• ↕
[Data Management Layer]
• ↕
[External Services Layer]
Component Relationships
• Frontend components communicating with the local database through the worker architecture
• Database sync operations with external services (Jellyfin)
• State management flow between UI components
• Data flow between the worker client and worker API
Technical Details
• IndexedDB as the local storage solution
• Jellyfin API integration points
• Worker-based architecture for database operations
• Reactive programming patterns using brr-lwd
Implementation Notes
• The separation between the main thread and database worker
• The data source abstraction layer (allowing for future additional sources beyond Jellyfin)
• The local database's role in enabling fast sorting and filtering
• The reactive UI update mechanism