A full-stack Netflix-style video streaming platform built with the MERN stack. Features JWT authentication, personalized recommendations, a custom HTML5 video player, and a fully responsive Netflix-style UI.
Live: oleoflix.oleo.dev
Backend: Node.js, Express, MongoDB/Mongoose, JWT, bcryptjs
Frontend: React 18, React Router, Axios, Vite
Infrastructure: Fly.io (backend), Vercel (frontend), MongoDB Atlas
- Node.js v16+
- MongoDB (local or Atlas)
cd backend
npm install
cp .env.example .env
# Fill in your values in .env
npm run devServer runs on http://localhost:5000
cd frontend
npm install
npm run devFrontend runs on http://localhost:5173
NODE_ENV=development
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
JWT_EXPIRE=30d
CLIENT_URL=http://localhost:5173streamingPlatform/
├── package.json
├── backend/
│ ├── config/
│ │ └── db.js
│ ├── controllers/
│ │ ├── authController.js
│ │ ├── videoController.js
│ │ └── recommendationController.js
│ ├── middleware/
│ │ └── auth.js
│ ├── models/
│ │ ├── User.js
│ │ └── Video.js
│ ├── routes/
│ │ ├── authRoutes.js
│ │ ├── videoRoutes.js
│ │ └── recommendationRoutes.js
│ ├── seed.js
│ ├── server.js
│ ├── fly.toml
│ └── Dockerfile
│
└── frontend/
├── src/
│ ├── components/
│ ├── context/
│ ├── pages/
│ └── utils/
├── index.html
├── vercel.json
└── vite.config.js
| Method | Route | Access |
|---|---|---|
| POST | /api/auth/register |
Public |
| POST | /api/auth/login |
Public |
| GET | /api/auth/me |
Protected |
| PUT | /api/auth/profile |
Protected |
| Method | Route | Access |
|---|---|---|
| GET | /api/videos |
Public |
| GET | /api/videos/featured |
Public |
| GET | /api/videos/trending |
Public |
| GET | /api/videos/genre/:genre |
Public |
| GET | /api/videos/:id |
Public |
| POST | /api/videos |
Protected |
| POST | /api/videos/:id/watch |
Protected |
| POST | /api/videos/:id/mylist |
Protected |
| Method | Route | Access |
|---|---|---|
| GET | /api/recommendations |
Protected |
| GET | /api/recommendations/similar/:id |
Public |
| Method | Route | Access |
|---|---|---|
| GET | /api/health |
Public |
cd backend
node seed.jsThis will clear and re-populate the database with sample videos.
cd backend
fly secrets set NODE_ENV=production MONGODB_URI=... JWT_SECRET=... JWT_EXPIRE=30d CLIENT_URL=https://oleoflix.oleo.dev
fly deployThe fly.toml is already configured with auto_stop_machines = 'off' and min_machines_running = 1 to prevent cold starts.
cd frontend
vercel --prodMIT