A Netflix/YouTube-style MERN video streaming monolith with React, Express, Node.js, and MongoDB.
- JWT registration, login, profile, protected routes, and admin-only routes.
- Role-based access control for admin APIs.
- Video upload, thumbnail upload, HTTP range streaming, search, trending, recommendations, likes, dislikes, comments, playlists, subscriptions, and watch history APIs.
- React Router, Axios interceptor auth, Context API auth state, responsive video grid, watch page, upload page, and admin dashboard.
- Dockerfile, docker-compose.yml, environment example, architecture diagram, ER diagram, API documentation, setup guide, implementation plan, and testing strategy.
cp .env.example .env
npm install
npm run devThe frontend runs on http://localhost:5173 and the API runs on http://localhost:5000.
MongoDB must be available at MONGO_URI. If Docker is installed:
docker compose up -d mongoFor MongoDB Atlas, create a free cluster, create a database user, allow your IP address in Network Access, then set:
MONGO_URI=mongodb+srv://USERNAME:PASSWORD@YOUR_CLUSTER.mongodb.net/streambox?retryWrites=true&w=majority
Seed demo users and a catalog:
npm run seed --workspace serverDemo credentials:
admin@streambox.dev / Password123
ava@streambox.dev / Password123
Use signup for real users:
- Viewer account: watches videos, movies, and serials.
- Creator client account: uploads videos, movies, and serial episodes.
Use the Dockerfile behind an AWS Application Load Balancer. Put AWS WAF in front of the ALB, use MongoDB Atlas or a managed MongoDB replica set, store original video and thumbnails in S3, distribute video URLs through CloudFront, and keep JWT secrets in AWS Secrets Manager or SSM Parameter Store.
Docs live in docs/.