How maelmoreau21/jellytrack works
JellyTrack is a self-hosted Jellyfin analytics and monitoring application. A browser reaches its embedded Go HTTP application; users authenticate, then explore playback, media, user, and analytics views. Jellyfin API data and plugin events supply the underlying activity, which the application stores and serves from SQLite or PostgreSQL. Administration adds server/settings management, backups, cleanup, and scheduled work. The README documents several capabilities beyond the sampled implementation excerpts, so those branches are included at subsystem level; their internal wiring is not asserted where source evidence is unavailable.
Main entry points: open.go SQL database · handlers.go HTTP API · static.go HTTP application · sync.go Server sync
Components 21
Application runtime
- HTTP application
web/static.go - HTTP API
internal/api/handlers.go - SQL database
internal/database/open.go
Jellyfin ingestion
- Plugin events
internal/plugin/events.go - Server sync
internal/jellyfin/sync.go - Media catalogue
internal/jellyfin/catalog_reconcile.go
Analytics and activity
- Playback history
internal/history/history.go - History endpoints
internal/api/history_handlers.go - Analytics
internal/stats/dashboard.go - Insights parity
internal/stats/parity.go - Media browsing
internal/media/media.go - User profiles
internal/users/users.go
Access and configuration
- Authentication
internal/auth/auth.go - Login policy
internal/auth/login_policy.go - Settings and servers
internal/settings/settings.go
Administration
- Administration API
internal/api/admin_handlers.go - Backup and restore
internal/backup/backup.go - Data cleanup
internal/cleanup/cleanup.go - Background scheduler
internal/scheduler/scheduler.go
Other components
- Browser
- Jellyfin server
Connections 26
- Browser → HTTP application: requests
- HTTP application → HTTP API: routes
web/static.go - Jellyfin server → Plugin events: sends events
- Plugin events → SQL database: records events
internal/plugin/events.go - HTTP API → Server sync: starts sync
internal/api/handlers.go - Server sync → SQL database: updates records
internal/jellyfin/sync.go - Server sync → Media catalogue: reconciles catalogue
- HTTP API → Playback history: queries history
internal/api/handlers.go - History endpoints → Playback history: queries sessions
internal/api/history_handlers.go - History endpoints → SQL database: reads sessions
internal/api/history_handlers.go - HTTP API → Analytics: serves insights
internal/api/handlers.go - Analytics → SQL database: reads activity
internal/stats/dashboard.go - Insights parity → SQL database: reads activity
internal/stats/parity.go - HTTP API → Media browsing: serves media
- HTTP API → User profiles: serves profiles
internal/api/handlers.go - HTTP application → Authentication: uses authentication
web/static.go - Authentication → Login policy: checks policy
internal/auth/auth.go - Authentication → SQL database: reads sessions
internal/auth/auth.go - Administration API → Settings and servers: manages settings
- Administration API → Backup and restore: handles backups
- Administration API → Data cleanup: runs cleanup
- Background scheduler → Backup and restore: schedules backups
internal/scheduler/scheduler.go - Background scheduler → Data cleanup: schedules cleanup
internal/scheduler/scheduler.go - Background scheduler → Server sync: schedules sync
internal/scheduler/scheduler.go - HTTP application → Jellyfin server: uses Jellyfin API
- SQL database → Jellyfin server: stores server data