Lens / Rishit Music — Private Audio Streaming Platform

Engineering decisions

Decision

NestJS/Mongoose decorator metadata failed in the media worker

Proposed

Decision

S3 upload failed but the UI could not explain where

Proposed

Decision

CloudFront signed cookies do not cross unrelated registrable domains

Proposed

Decision

Serverless FFmpeg is the wrong runtime abstraction

Proposed

Decision

External apps need browser playback without secret leakage

Proposed

Decision

Prevent duplicate media processing without introducing a queue service yet

Proposed

Decision

A worker can die after claiming a track

Proposed

Decision

Retries need a budget once processing volume grows

Proposed

Decision

Keep Vercel out of the audio byte path

Proposed

Decision

Preserve privacy without pretending signed delivery is DRM

Proposed

Decision

Avoid path traversal becoming a signing oracle

Proposed

Decision

Revoke integration access before old browser tokens naturally expire

Proposed

Decision

Support zero-downtime service-key rotation

Proposed

Decision

Allow admin key reveal without making the authentication database reversible

Proposed

Decision

Large-catalog administration will outgrow client-heavy listing

Proposed

Decision

Catalog deletion and media-object deletion have different failure semantics

Proposed

Decision

Playback events are analytics, not an exactly-once financial ledger

Proposed

Engineering practices

• Keep application compute off the byte path — Reliability improves when heavy media delivery does not depend on the request-serving control plane.

• Make asynchronous work observable — Long-running work needs explicit lifecycle state, retry semantics and failure visibility.

• Use bounded playback capabilities — A leaked browser credential should have limited scope, lifetime and blast radius.

• Operational telemetry — Latency, failure rate, worker backlog and playback errors should be visible before users become the monitoring system.

• Shared contracts in a monorepo — Keep web, API and worker changes reviewable together while preserving runtime boundaries.

• Treat media derivatives as build artifacts — Generated artifacts should be reproducible, replaceable and separate from source masters.

• Automated delivery checks — Build, type, lint and deployment verification should gate releases consistently.