Streamoo is a full-featured video streaming platform with a microservice architecture. Built using a React frontend and an Express backend, it leverages Docker for containerization and is deployed on DigitalOcean with Cloudflare DNS and HTTPS support.
- 📂 Project Structure
- ✨ Features
- ⚙️ Prerequisites
- 📥 Installation
- 🔑 Environment Variables
- 🚀 Usage
- 📁 API Endpoints
- 🔧 Technologies Used
- 📜 License
streamoo/
├── backend/
│ ├── controller/ # Contains controllers for managing app logic
│ ├── db/ # MongoDB configuration and models
│ ├── middleware/ # Middleware for file handling (e.g., multer)
│ ├── public/ # Static files and videos
│ ├── routes/ # API routes for backend
│ ├── .dockerignore
│ ├── .env
│ ├── app.js # Express app entry point
│ ├── Dockerfile
│ └── vercel.json
└── frontend/
├── src/
│ ├── components/ # React components (Movies, VideoPlayerCard, etc.)
│ ├── configs/ # Configuration for routes and authentication
│ ├── pages/ # App's main pages
├── .dockerignore
├── .env
├── Dockerfile
├── tailwind.config.js # Tailwind CSS config
└── README.md
- 🔒 User Authentication: Secure login and registration.
- 📂 Video Upload & Processing: Users can upload video files, which are processed and stored.
- 🖥️ HLS Streaming: Converts videos to HLS format for smooth streaming.
- ⚙️ Microservices Architecture: Frontend and backend are organized as separate services.
- 🚀 Deployment with Docker & DigitalOcean: Easy deployment using Docker and DigitalOcean.
- 🔐 HTTPS with Cloudflare SSL: Secure your website with Cloudflare DNS and SSL.
- 🖥️ Node.js - v14+
- 🐋 Docker - v20+
- 📦 MongoDB - v4+
- 🌐 Cloudflare Account - For DNS and SSL setup
-
Clone the repository
git clone https://github.com/yourusername/streamoo.git cd streamoo
-
Set up environment variables
- Refer to the Environment Variables section and create
.env
files in both the backend and frontend directories.
- Refer to the Environment Variables section and create
-
Run Docker containers
docker compose up --watch
This will start docker container and whenever a change is made you won't need to restart it.
-
Access the application
- Frontend:
http://localhost:5173
- Backend API:
http://localhost:3000
- Frontend:
-
Stop Docker Containers
docker compose up down
MONGOUSER=root
MONGOPASS=root
MONGODBPORT=27017
MONGOEXPPORT=8081
BACKENDPORT=3000
FRONTENDPORT=5173
VITE_MOVIE_UPLOAD_URL=http://localhost:3000
MONGODB_URI=mongodb://root:root@mongodb:27017/streamoo?authSource=admin
MOVIE_UPLOAD_URL=http://localhost:3000
-
Run Docker Compose
docker compose up --watch
-
Access the Application:
- Frontend at
http://localhost:5173
- Backend at
http://localhost:3000
- Frontend at
-
Upload a Video:
- Use the video upload form in the frontend, which interacts with the backend at
VITE_MOVIE_UPLOAD_URL
.
- Use the video upload form in the frontend, which interacts with the backend at
- POST /api/movieData - Upload a new movie
- Fields:
movieName
,movieGenres
,movieDescription
,movieThumbnail
,movieCaste
,movieURL
- Fields:
- GET /api/movies - Fetch all movies
- POST /api/thumbnail - Upload a movie thumbnail
- Fields:
movieThumbnail
- Fields:
- /api/auth/register - Register a new user
- /api/auth/login - User login
Technology | Purpose |
---|---|
React | Frontend Framework |
Express | Backend Framework |
MongoDB | Database |
Multer | File handling middleware |
Docker | Containerization |
ffmpeg | Video processing |
Cloudflare | DNS and SSL |
DigitalOcean | Hosting platform |
This project is licensed under the MIT License. See LICENSE for more information.