How lodilorenzo/teatro works
Teatro is a self-hosted game-library server: users sign in, browse/search a catalog, inspect game details and download files; administrators manage users and tokens, add or scan games, edit metadata, verify integrity, and run optional integrations. The graph preserves these stages and the storage, session, and job layers, plus the player and admin interfaces. Several backend feature modules are present in the tree and documented in the README but were not excerpted, so their internal call relationships are omitted; dashed links mark documented but unsampled feature paths.
Main entry points: admin Admin endpoints · mod.rs HTTP router · library Library operations · main.js Player browser
Components 29
Web interfaces
- Player browser
web/public/main.js - Admin browser
web/admin/main.js - Catalog views
web/public/views.js - Admin features
web/admin/features - Admin state
web/admin/state.js
HTTP API
- HTTP router
src/api/mod.rs - Player endpoints
src/api/romm.rs - Admin endpoints
src/api/admin - Session endpoints
src/api/sessions.rs
Library workflows
- Library operations
src/services/library - Ingest planning
src/services/library/ingest - Integrity checks
src/services/integrity.rs - GOG extraction
src/services/gog_import - Remote RomM
src/services/romm_source
Identity and jobs
- Session service
src/services/auth.rs - Job registry
src/services/job_registry.rs - Application state
src/state.rs
Persistence and integrations
- Catalog repository
src/repositories/roms/read.rs - Session repository
src/repositories/browser_sessions.rs - Game file store
src/storage/file_store.rs - SQLite catalog
- IGDB client
src/services/igdb/client.rs - IGDB metadata
src/services/igdb - LAN discovery
src/services/lan_discovery.rs
Other components
- Library user
- Administrator
- IGDB service
- RomM server
- Game files
Connections 28
- Library user → Player browser: browses
README.md - Player browser → HTTP router: requests
web/public/main.js - Player browser → Catalog views: renders
web/public/main.js - Admin browser → HTTP router: requests
web/admin/main.js - Admin browser → Admin features: dispatches
web/admin/main.js - Admin features → Admin state: updates
web/admin/features/romm-source.js - HTTP router → Player endpoints: routes to
src/api/mod.rs - HTTP router → Admin endpoints: routes to
src/api/mod.rs - HTTP router → Session endpoints: routes to
src/api/mod.rs - Player endpoints → Catalog repository: reads catalog
- Player endpoints → Game file store: streams downloads
- Admin endpoints → Library operations: manages library
- Admin endpoints → Integrity checks: checks files
- Admin endpoints → GOG extraction: starts imports
- Admin endpoints → Remote RomM: browses and imports
- Admin endpoints → IGDB metadata: matches metadata
- Admin endpoints → Job registry: tracks jobs
- Session endpoints → Session service: authenticates
- Session service → Session repository: stores sessions
- Library operations → Ingest planning: plans ingest
- Library operations → Catalog repository: updates catalog
- Library operations → Game file store: manages files
- Catalog repository → SQLite catalog: persists catalog
- Game file store → Game files: reads and writes
src/storage/file_store.rs - IGDB metadata → IGDB client: uses client
src/services/igdb/client.rs - IGDB client → IGDB service: queries
src/services/igdb/client.rs - Remote RomM → RomM server: connects
- Application state → LAN discovery: starts discovery