How nassih-yassine/mediamanager works
MediaManager is a self-hosted, account-scoped media library: users add or upload media, workers process downloads, and the web UI organizes and plays the resulting library. The web and Tauri desktop share the same frontend; the Rust API owns persistence, authorization, media files, and background jobs. The README documents key capabilities and proxying; sampled API excerpts confirm routing, startup, and worker behavior. Several frontend and API modules were not sampled, so their internal links are omitted where evidence is unavailable.
Main entry points: layout.tsx Web application · routes.rs HTTP routes · worker.rs Download worker · media.rs Media management
Components 23
Client applications
- Desktop shell
apps/desktop/src-tauri/src/main.rs - Web application
apps/web/src/app/layout.tsx
Library experience
- Library and galleries
apps/web/src/components/Library.tsx - Add media
apps/web/src/components/AddForm.tsx - Persistent player
apps/web/src/lib/player.tsx - Playlists
apps/web/src/components/PlaylistView.tsx - Media viewers
apps/web/src/components/ReadView.tsx - Account and admin
apps/web/src/app/(app)/profile/page.tsx - Notifications UI
apps/web/src/lib/notifications.tsx - API client
apps/web/src/lib/api.ts - Live updates
apps/web/src/app/api/events/route.ts
API and domain
- HTTP routes
crates/api/src/routes.rs - Accounts and sessions
crates/api/src/auth.rs - Application state
crates/api/src/state.rs - Media and job models
crates/api/src/models.rs - Notification service
crates/api/src/notifications.rs - Runtime configuration
crates/api/src/config.rs
Media processing
- Download worker
crates/api/src/worker.rs - Media management
crates/api/src/media.rs
Persistent storage
- SQLite database
crates/api/src/db.rs - Media files
crates/api/src/media.rs
Other components
- Library user
- yt-dlp and ffmpeg
Connections 29
- Library user → Web application: uses
README.md - Desktop shell → Web application: loads shared UI
README.md - Web application → Library and galleries: renders
- Web application → Add media: offers
- Web application → Persistent player: hosts
README.md - Web application → Playlists: offers
README.md - Web application → Media viewers: offers
README.md - Web application → Account and admin: offers
README.md - Web application → Notifications UI: offers
README.md - Library and galleries → API client: requests data
- Add media → API client: submits media
- API client → HTTP routes: proxies API requests
README.md - Live updates → HTTP routes: proxies events
- HTTP routes → Accounts and sessions: authenticates
crates/api/src/routes.rs - HTTP routes → SQLite database: queries
crates/api/src/routes.rs - HTTP routes → Media management: manages media
crates/api/src/routes.rs - HTTP routes → Notification service: serves notifications
crates/api/src/routes.rs - HTTP routes → Application state: uses
crates/api/src/routes.rs - Download worker → SQLite database: claims jobs
crates/api/src/worker.rs - Download worker → Media management: finalizes media
crates/api/src/worker.rs - Download worker → Notification service: notifies completion
crates/api/src/worker.rs - Download worker → yt-dlp and ffmpeg: runs download tools
crates/api/src/worker.rs - Media management → SQLite database: stores metadata
crates/api/src/media.rs - Media management → Media files: writes media files
README.md - Notification service → SQLite database: persists notices
crates/api/src/notifications.rs - Application state → Runtime configuration: holds settings
crates/api/src/state.rs - HTTP routes → Media and job models: serializes results
crates/api/src/main.rs - Download worker → Media and job models: uses job and item types
crates/api/src/worker.rs - Library user → Desktop shell: opens