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
MIT License - See LICENSE file
For issues or questions:
- Open an issue on GitHub
- Check existing documentation
- Review logs:
npm run docker:logs
Built with ❤️ for educators and students worldwide.