Content Broadcasting Backend Project | Interview Assignment Project |
A backend system for educational content distribution β teachers upload subject content, principals approve it, and students access live content via public APIs. ## π Tech Stack - **Runtime**: Node.js - **Framework**: Express.js - **Database**: MySQL - **Auth**: JWT + bcrypt - **File Upload**: Multer (local storage by default, S3 if configured) / cloudinary storage - **Rate Limiting**: express-rate-limit ## π Project Structure ``` src/ βββ app.js # Entry point βββ config/ β βββ db.js # PostgreSQL pool β βββ storage.js # S3 or local multer config βββ controllers/ β βββ auth.controller.js # Register, login β βββ content.controller.js # Upload, approve, reject β βββ broadcast.controller.js # Public live content βββ middlewares/ β βββ auth.middleware.js # JWT + RBAC β βββ error.middleware.js # Error handler βββ routes/ β βββ auth.routes.js β βββ content.routes.js β βββ broadcast.routes.js βββ services/ β βββ scheduling.service.js # Rotation algorithm βββ utils/ βββ migrate.js # DB table creation βββ seed.js # Demo data ``` ## π Assumptions - `start_time` and `end_time` must both be provided (or neither) β content without a time window is never shown - Times are stored and compared in UTC - The rotation clock resets daily at midnight UTC for simplicity - Content can only go from `pending` β `approved` or `pending` β `rejected` (no re-approval) - Subjects are stored in lowercase for consistent matching
Download
0 formatsNo download links available.