A ticket-gated HTML5 video streaming platform with two independently deployable services sharing JWT-based playback authentication.
- GETTING_STARTED.md — Start here! Complete step-by-step guide to set up and run the system locally
- PDR.md — Full product specification, data model, API contracts, and deployment topologies
- IMPLEMENTATION_PLAN.md — Development task breakdown and work streams
- DEPLOYMENT.md — Production deployment guide (Docker, cloud platforms)
| Service | Framework | Directory | Port |
|---|---|---|---|
| Platform App | Next.js 14+ (TypeScript) | platform/ |
3000 |
| HLS Media Server | Express.js (TypeScript) | hls-server/ |
4000 |
| Shared | TypeScript types/constants | shared/ |
— |
- Node.js 20+ (see
.nvmrc) - npm 10+
👉 For detailed setup instructions, see GETTING_STARTED.md
# 1. Install dependencies
npm install
# 2. Generate secrets and admin password
npm run hash-password
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
# 3. Configure environment
cp .env.example .env
# Edit .env with generated secrets
# 4. Initialize database
cd platform
npx prisma migrate dev
npx prisma db seed # Optional: sample data
# 5. Start services (in separate terminals)
cd platform && npm run dev # Terminal 1: Port 3000
cd hls-server && npm run dev # Terminal 2: Port 4000Access the application:
- Viewer Portal: http://localhost:3000
- Admin Console: http://localhost:3000/admin
- HLS Server Health: http://localhost:4000/health
├── shared/ # Shared types, constants, and utilities
│ └── src/
│ ├── types.ts # Domain types (JWT claims, API responses)
│ ├── constants.ts # Shared constants (rate limits, timeouts)
│ ├── jwt.ts # JWT utility functions
│ └── validation.ts # Input validation helpers
├── platform/ # Next.js Platform App
│ ├── prisma/ # Database schema and migrations
│ └── src/
│ ├── app/ # Next.js App Router (pages + API routes)
│ ├── components/ # React components (UI, player, admin, viewer)
│ ├── hooks/ # Custom React hooks
│ └── lib/ # Server-side utilities (JWT, auth, DB)
├── hls-server/ # Express.js HLS Media Server
│ └── src/
│ ├── middleware/ # JWT auth, CORS, logging
│ ├── routes/ # Stream serving, health, admin cache
│ ├── services/ # Revocation cache, upstream proxy, cache mgmt
│ └── utils/ # Path safety, hashing
See .env.example for a complete reference with documentation.
- Both services share the
@streaming/sharedworkspace package - Changes to
shared/are immediately available in both services (no build step) - Use
npx prisma studioto inspect the database visually - HLS test streams should be placed in
./streams/<eventId>/hls-server/streams//`
- Setup issues? See GETTING_STARTED.md — Comprehensive troubleshooting section
- API questions? See GETTING_STARTED.md#api-reference — Complete API documentation
- Deployment? See DEPLOYMENT.md — Docker & cloud deployment guides
- Architecture details? See PDR.md — Full product specification