How jitendragaurgkv/drm-now works
This repository is a demo DRM video platform with a React operations/player console and an Express API. Its central workflow is content ingestion and encryption, followed by catalog browsing, playback authorization, licensed HLS delivery, and session monitoring. The sampled code supports the app/API, licensing, KMS, and session-store relationships; several console features are visible in the tree but their internal data flows were not sampled, so those links are left out.
Main entry points: App.tsx App Shell · server.ts HTTP API · licenseServer.ts License Service · kms.ts Key Vault
Components 14
Web Console
- App Shell
src/App.tsx - Ingestion Studio
src/components/IngestionTab.tsx - DRM Player
src/components/PlayerTab.tsx - Session Monitor
src/components/SessionsTab.tsx - Analytics View
src/components/AnalyticsTab.tsx - KMS Vault View
src/components/KmsVaultTab.tsx - Architecture View
src/components/ArchitectureTab.tsx
Content Pipeline
- HLS Transcoder
src/server/transcoder.ts - Encrypted HLS Assets
src/server/transcoder.ts
Playback Security
- License Service
src/server/licenseServer.ts
API And State
- HTTP API
server.ts - Key Vault
src/server/kms.ts - Accounts And Sessions
src/server/sessionStore.ts
Other components
- Operator / Viewer
Connections 19
- Operator / Viewer → App Shell: uses
- App Shell → HTTP API: loads catalog
- App Shell → DRM Player: selects playback
- App Shell → Session Monitor: opens monitor
- App Shell → Ingestion Studio: opens ingestion
- App Shell → Analytics View: opens analytics
- App Shell → KMS Vault View: opens vault
- App Shell → Architecture View: opens overview
- Ingestion Studio → HTTP API: submits transcode
- HTTP API → Key Vault: registers asset
- HTTP API → HLS Transcoder: generates manifest
- HLS Transcoder → Encrypted HLS Assets: packages streams
- Key Vault → Encrypted HLS Assets: stores asset metadata
- DRM Player → HTTP API: requests license and media
- HTTP API → License Service: processes license request
- License Service → Accounts And Sessions: checks account and sessions
- License Service → Key Vault: retrieves content key
- HTTP API → Accounts And Sessions: handles OTP and session routes
- Session Monitor → HTTP API: reads and terminates sessions