How ritikkumar27/media-force works
MediaForce accepts authenticated requests to register/login, submit media URLs, inspect download status, and retrieve completed files. Its API persists download ownership and queues work for a background yt-dlp processor; progress is bridged to clients over WebSockets. The web tree shows login, registration, and dashboard surfaces, but the sampled Astro config and pages do not show API or socket calls. Queue, database, security, worker, and realtime links are drawn where README documentation or indexed source references support them; unshown web wiring is omitted.
Main entry points: downloads.controller.ts Download routes · downloads.service.ts Download service · app.module.ts App wiring · downloads.processor.ts Download worker
Components 23
Web application
- Web pages
apps/web/src/pages - Shared package
packages/shared/index.ts
Identity and access
- Auth routes
apps/api/src/auth/auth.controller.ts - JWT auth
apps/api/src/auth/auth.service.ts - Auth validation
apps/api/src/auth/dto/auth.dto.ts - User accounts
apps/api/src/users/users.service.ts - User records
apps/api/src/users/entities/user.entity.ts - HTTP guard
apps/api/src/auth/auth.guard.ts - Socket guard
apps/api/src/auth/ws.guard.ts
Download workflow
- Download routes
apps/api/src/downloads/downloads.controller.ts - Download service
apps/api/src/downloads/downloads.service.ts - Download records
apps/api/src/downloads/entities/download.entity.ts - Job queue
- Download worker
apps/api/src/downloads/downloads.processor.ts - yt-dlp runner
apps/api/src/downloads/yt-dlp/yt-dlp.service.ts - Progress gateway
apps/api/src/downloads/downloads/downloads.gateway.ts
API runtime
- API bootstrap
apps/api/src/main.ts - App wiring
apps/api/src/app.module.ts
Other components
- User
- Redis
- PostgreSQL
- Socket client
- Media source
Connections 24
- User → Web pages: uses
README.md - Web pages → Shared package: imports
- API bootstrap → App wiring: starts
apps/api/src/main.ts - App wiring → Auth routes: registers
apps/api/src/app.module.ts - App wiring → Download routes: registers
apps/api/src/app.module.ts - App wiring → User accounts: registers
apps/api/src/app.module.ts - Auth routes → JWT auth: delegates
apps/api/src/auth/auth.controller.ts - Auth routes → Auth validation: validates with
apps/api/src/auth/auth.controller.ts - JWT auth → User accounts: looks up / creates
apps/api/src/auth/auth.service.ts - User accounts → User records: persists
apps/api/src/users/users.service.ts - Download routes → HTTP guard: guards requests
apps/api/src/downloads/downloads.controller.ts - Download routes → Download service: delegates
apps/api/src/downloads/downloads.controller.ts - Download service → Download records: reads / writes
apps/api/src/downloads/downloads.service.ts - Download service → Job queue: enqueues jobs
apps/api/src/downloads/downloads.service.ts - Job queue → Redis: stores jobs
README.md - Download worker → yt-dlp runner: runs downloads
apps/api/src/downloads/downloads.processor.ts - Download worker → Download records: updates status
apps/api/src/downloads/downloads.processor.ts - Download worker → Progress gateway: publishes progress
- Progress gateway → Socket guard: secures handshake
apps/api/src/downloads/downloads/downloads.gateway.ts - Progress gateway → Socket client: broadcasts progress
README.md - Download service → yt-dlp runner: fetches metadata
apps/api/src/downloads/downloads.service.ts - Download routes → User: streams completed file
apps/api/src/downloads/downloads.controller.ts - yt-dlp runner → Media source: downloads from
apps/api/src/downloads/yt-dlp/yt-dlp.service.ts - Download records → PostgreSQL: persists records
README.md