EduStream is a cloud-native adaptive streaming platform optimized for low-bandwidth environments (100 kbpsβ1.5 Mbps). It enables educators to deliver high-quality video content to students in regions with limited connectivity.
- Adaptive Bitrate Streaming: Automatic quality adjustment based on bandwidth
- Offline Content Caching: PWA support for offline viewing
- Low-Bandwidth Optimization: Works reliably on 100 kbpsβ1.5 Mbps connections
- Encoding Pipeline: Automated FFmpeg-based video encoding(multiple quality levels)
- Message Queue: RabbitMQ for async encoding jobs
- Real-time Monitoring: Prometheus + Grafana dashboards
- Distributed Tracing: Jaeger for observability
- Microservices Architecture: Modular, scalable design
- Secure Authentication: JWT-based auth with role-based access control
EduStream (Monorepo)
βββ apps/
β βββ backend/ # NestJS microservices
β β βββ src/
β β β βββ auth/ # JWT authentication
β β β βββ users/ # User management
β β β βββ content/ # Video content metadata
β β β βββ streaming/ # HLS delivery service
β β β βββ encoding/ # FFmpeg worker service
β β β βββ analytics/ # Usage analytics
β β βββ package.json
β βββ frontend/ # React + Tailwind frontend
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ services/
β β βββ hooks/
β βββ package.json
βββ infra/ # Infrastructure configs
β βββ docker/
β βββ kubernetes/
β βββ terraform/
β βββ cicd/
βββ docker-compose.yml # Local development stack
βββ README.md
- Node.js >= 18
- Docker & Docker Compose
- Git
cd edustream
npm installcp .env.example .env
# Update .env with your configuration if needednpm run docker:upThis will start:
- MongoDB (27017): Database
- Redis (6379): Cache & session store
- RabbitMQ (5672, 15672): Message broker
- FFmpeg Service: Encoding worker
- Prometheus (9090): Metrics
- Grafana (3003): Dashboards
- Jaeger (16686): Distributed tracing
- MinIO (9000, 9001): S3-compatible storage
# In separate terminals:
npm run dev:backend # Runs on http://localhost:3000
npm run dev:frontend # Runs on http://localhost:3001Or all at once:
npm run dev- Backend: http://localhost:3000/api/health
- Frontend: http://localhost:3001
- RabbitMQ Management: http://localhost:15672 (guest/guest)
- Grafana: http://localhost:3003 (admin/admin)
- Jaeger: http://localhost:16686
- MinIO: http://localhost:9001 (minioadmin/minioadmin)
edustream/
βββ apps/backend/ # NestJS backend
β βββ src/
β β βββ main.ts
β β βββ app.module.ts
β β βββ ... (modules to be created)
β βββ package.json
β βββ tsconfig.json
βββ apps/frontend/ # React frontend
β βββ src/
β β βββ index.tsx
β β βββ ... (components to be created)
β βββ package.json
β βββ tsconfig.json
βββ infra/
β βββ docker-compose.yml
β βββ Dockerfile.ffmpeg
β βββ mongodb/init.js
β βββ prometheus/prometheus.yml
β βββ kubernetes/ (manifests)
βββ docker-compose.yml
βββ package.json (root)
βββ .env.example
cd apps/backend
npm run start:dev # Start with hot-reload
npm run build # Build for production
npm run test # Run unit tests
npm run test:e2e # Run integration testscd apps/frontend
npm start # Start dev server
npm run build # Build for production
npm run test # Run tests
npm run eject # Eject from CRA (one-way)npm run docker:build # Build all services
npm run docker:up # Start containers
npm run docker:down # Stop containers
npm run docker:logs # View logsnpm run test # Run all tests
npm run test:backend # Backend tests only
npm run test:frontend # Frontend tests onlynpm run test -- --coverage- http://localhost:9090
- Queries available for uptime, request latency, encoding jobs, etc.
- http://localhost:3003
- Pre-configured dashboards for API health, video encoding, and streaming quality
- http://localhost:16686
- Trace requests across microservices
- JWT Authentication: All API endpoints protected
- Password Hashing: bcryptjs with salt rounds = 10
- Rate Limiting: 100 requests per 15 minutes
- CORS: Configured for
localhost:3000andlocalhost:3001 - Environment Secrets: Use
.envfile, never commit secrets
- Initialize NestJS app with database setup
- Create MongoDB schemas (users, videos, encodings)
- Set up Redis client and caching layer
- JWT auth service
- User registration & login endpoints
- Role-based access control (RBAC)
- HLS manifest generation
- Adaptive bitrate selection
- Progress tracking
- FFmpeg worker service
- RabbitMQ job queue
- Quality level generation (240p, 360p, 480p, 720p)
- React setup with Tailwind CSS
- HLS.js video player
- Offline PWA caching
- User dashboard
- Kubernetes manifests
- Terraform configs (AWS/GCP/Azure)
- Helm charts
- GitHub Actions workflows
- Automated testing on push
- Docker image building & registry push
- Automated deployment
See /docs (to be created) for:
- API specifications (Swagger)
- Database schemas
- Encoding quality guidelines
- Deployment guides
- Troubleshooting
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m 'Add feature' - Push:
git push origin feature/your-feature - Create a Pull Request