Skip to content

Repository files navigation

🎬 StreamSphere

Enterprise-Grade Video Streaming Platform built with Full Stack TypeScript

TypeScript NestJS Next.js MongoDB AWS Docker

A scalable cloud-based video streaming platform featuring secure authentication, high-performance media delivery, AWS cloud integration, and modern full-stack architecture.


πŸš€ Overview

StreamSphere is a production-ready video streaming platform inspired by modern OTT applications. It allows users to securely upload, manage, stream, and organize video content while leveraging AWS cloud services for scalable media storage.

The project follows industry-standard backend architecture using NestJS, Next.js, MongoDB, AWS S3, Docker, and JWT Authentication.

✨ Features

πŸ” Authentication πŸŽ₯ Video Management ☁️ Media Storage
βœ… User Registration βœ… Upload Videos βœ… AWS S3 Upload
βœ… Secure Login βœ… Delete Videos βœ… Secure File Storage
βœ… JWT Authentication βœ… Edit Metadata βœ… Signed URLs
βœ… Refresh Tokens βœ… Categories βœ… Thumbnail Storage
βœ… Protected APIs βœ… Thumbnail Upload βœ… Automatic File Removal
βœ… Role-Based Authorization βœ… Video Details
πŸ‘€ User Features πŸ›  Admin Features
βœ… Profile Management βœ… Dashboard
βœ… Watch History βœ… User Management
βœ… Continue Watching βœ… Content Management
βœ… Search Videos βœ… Analytics Ready
βœ… Responsive UI

πŸ›  Tech Stack

Category Technologies
Frontend Next.js TypeScript Tailwind CSS
Backend NestJS TypeScript
Database MongoDB Mongoose MongoDB Atlas
Cloud AWS S3 Amazon EC2 AWS IAM CloudFront
DevOps Docker Docker Compose GitHub Actions
API Documentation & Testing Swagger Postman
Version Control Git GitHub

πŸ— System Architecture

StreamSphere System Architecture


πŸ“ Project Structure

StreamSphere

β”œβ”€β”€ frontend
β”‚   β”œβ”€β”€ app
β”‚   β”œβ”€β”€ components
β”‚   β”œβ”€β”€ hooks
β”‚   β”œβ”€β”€ services
β”‚   └── utils
β”‚
β”œβ”€β”€ backend
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ auth
β”‚   β”‚   β”œβ”€β”€ users
β”‚   β”‚   β”œβ”€β”€ videos
β”‚   β”‚   β”œβ”€β”€ uploads
β”‚   β”‚   β”œβ”€β”€ common
β”‚   β”‚   └── config
β”‚   β”‚
β”‚   └── Dockerfile
β”‚
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ README.md
└── .env.example

βš™ Installation

Clone Repository

git clone https://github.com/jyoti1900/StreamSphere.git

cd StreamSphere

Backend

cd backend

npm install

Frontend

cd frontend

npm install

πŸ”‘ Environment Variables

Backend

PORT=3000
MONGO_URI=<your_mongodb_connection_string>
JWT_SECRET=<your_jwt_secret>
JWT_REFRESH_SECRET=<your_jwt_refresh_secret>
AWS_REGION=<your_aws_region>
AWS_ACCESS_KEY_ID=<your_access_key_id>
AWS_SECRET_ACCESS_KEY=<your_secret_access_key>
AWS_BUCKET_NAME=<your_s3_bucket_name>
CLOUDFRONT_URL=<your_cloudfront_distribution_url>

Frontend

NEXT_PUBLIC_API_URL=http://localhost:3000

β–Ά Running Locally

Backend

npm run start:dev

Frontend

npm run dev

🐳 Docker

Build

docker-compose build

Run

docker-compose up -d

Stop

docker-compose down

☁ Deployment Flow

StreamSphere Deployment Flow


πŸ” Authentication Flow

StreamSphere Authentication Flow


πŸ“¦ API Modules

Module Description
πŸ” Authentication User registration, login, JWT, refresh tokens
πŸ‘€ Users User profile and account management
πŸŽ₯ Videos Upload, update, delete, and stream videos
☁️ Uploads Media upload and file handling
πŸ—‚ Categories Video categorization and organization
πŸ” Search Search and filter videos
πŸ“Š Dashboard Analytics and administrative overview

πŸ”’ Security

Security Feature Purpose
πŸ”‘ JWT Authentication Secure user authentication
πŸ”’ Password Hashing Encrypt user passwords
πŸ›‘ Protected Routes Restrict unauthorized access
βš™ Environment Variables Secure configuration management
☁️ AWS IAM Permissions Controlled cloud resource access
πŸ“€ Secure File Upload Safe media upload handling
βœ… Input Validation Prevent invalid or malicious input
πŸ“‹ Request Validation Ensure API request integrity

⚑ Performance Optimizations

Optimization Benefit
⚑ Lazy Loading Faster initial page load
πŸƒ Optimized MongoDB Queries Reduced database response time
πŸ–Ό Image Compression Lower bandwidth usage
πŸ”— Efficient API Design Improved backend performance
πŸ— Modular Architecture Better scalability and maintainability
☁️ Cloud Storage Reliable and scalable media storage
🐳 Dockerized Deployment Consistent development and production environments
πŸ“˜ TypeScript Strict Mode Improved code quality and reliability

πŸ“ˆ Future Improvements

Feature Description
πŸ“‘ Live Streaming Real-time video broadcasting
πŸ€– Video Recommendations AI-powered personalized suggestions
πŸ’³ Subscription Plans Premium membership support
πŸ’° Payment Gateway Secure online payments
πŸ”Ž AI Video Search Intelligent content discovery
πŸ”” Notifications Real-time user alerts
πŸ‘₯ Watch Together Shared viewing experience
🌐 Multi-language Support Localization for global users
πŸ“Š Analytics Dashboard Advanced insights and reporting

🀝 Contributing

Contributions are welcome.

  1. Fork the repository

  2. Create your feature branch

git checkout -b feature/new-feature
  1. Commit changes
git commit -m "Add new feature"
  1. Push
git push origin feature/new-feature
  1. Create Pull Request

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Developed By

Team Member Contribution
Jyotipriya Das πŸš€ Project Lead, Backend Development, Cloud Infrastructure (AWS), CI/CD Pipeline, Docker, System Architecture
Sayan Pal πŸ’» Full Stack Development, Testing, Debugging, UI/UX Implementation
Indrajit Sahu 🎨 Frontend Development, UI Components, User Experience

⭐ If you found this project helpful, consider giving it a Star!

About

Enterprise-grade full-stack video streaming platform built with Next.js, NestJS, TypeScript, MongoDB, AWS S3, Docker, and JWT Authentication.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages