A professional full-stack multi-tenant application for secure video upload, AI-powered sensitivity analysis, and seamless streaming.
You can view a complete walkthrough of the application functionality here: Watch Demo Video
- Frontend (Vercel): https://pulse-assignment-beta.vercel.app
- Backend API (Render): https://pulse-assignment-tca5.onrender.com
Pulse CMS is designed as a robust solution for organizations to manage their video content with built-in safety checks. It features a modern dark-themed UI, real-time processing updates via Socket.io, and a secure multi-tenant architecture.
The system follows a modular MERN stack architecture:
- Frontend: React.js with Vite, Tailwind CSS for styling, and Socket.io-client for real-time events.
- Backend: Node.js & Express.js REST API.
- Database: MongoDB (Mongoose ODM) for storing metadata, users, and tenant information.
- Real-time Layer: Socket.io for live upload and processing progress.
- Storage: AWS S3 for secure, scalable video hosting.
- Processing: Simulated AI moderation pipeline for sensitivity detection.
- Node.js: v18+
- Express: Web framework
- MongoDB: Primary database
- Socket.io: Real-time communication
- JWT: Secure Authentication
- Multer / Multer-S3: File upload handling
- AWS SDK (v3): S3 integration for storage
- React: UI Library
- Vite: Build tool
- Tailwind CSS: Modern styling
- Context API: Global state management (Auth)
- Lucide React: Iconography
- Axios: API client
- Node.js installed
- MongoDB instance (Local or Atlas)
git clone <repository-url>
cd Pulse- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackendfolder:PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret AWS_ACCESS_KEY_ID=your_key AWS_SECRET_ACCESS_KEY=your_secret AWS_REGION=your_region AWS_BUCKET_NAME=your_bucket
- Start the server:
node server.js
- Navigate to the frontend directory:
cd ../frontend - Install dependencies:
npm install
- Start the development server:
npm run dev
Use the following credentials to explore the multi-tenant features. All accounts use the common password: password123
| Organization | Role | |
|---|---|---|
| System | Super Admin | super@admin.com |
| Alpha Corp | Editor | editor@alpha.com |
| Alpha Corp | Viewer | viewer@alpha.com |
| Beta Corp | Editor | editor@beta.com |
| Pulse Corp | Editor | editor@pulse.com |
| Pulse Corp | Viewer | viewer@alpha.com |
The system supports three distinct roles:
- Super Admin:
- Manage all tenants (Create/Delete)
- Manage users across all organizations
- Oversee AI Moderation queue and purge flagged content
- Editor:
- Upload new videos
- Edit their own video metadata
- Publish/Unpublish videos
- Viewer:
- Read-only access to published videos within their tenant
Users can log in using their email and password. The system automatically identifies the tenant and role associated with the account.
- Go to the Upload page.
- Drag and drop a video file or click to select.
- Enter a title.
- Watch real-time progress as the video is uploaded and processed for sensitivity.
- Use the Dashboard to see all videos.
- Toggle visibility (Publish/Unpublish).
- Deletion is available for non-flagged content.
- Admins can access the Moderation Tab in the Admin Portal.
- Flagged videos (Insensitive/Abusive) must be reviewed.
- Admin can either Allow (override flags) or Remove the content.
POST /api/auth/login: Authenticate user and return JWT.POST /api/auth/register: Create a new user (Admin/Editor/Viewer).
GET /api/videos: List videos (filtered by tenant/role).POST /api/videos/upload: Upload video file and metadata.GET /api/videos/stream/:videoId: Stream video using HTTP Range requests.DELETE /api/videos/:videoId: Delete a video.PATCH /api/videos/:videoId/publish: Toggle publish status.
GET /api/admin/tenants: List all organizations.POST /api/admin/tenants: Create a new tenant.GET /api/admin/moderation: Fetch flagged videos pending review.
- Cloud Native Storage: Leverages AWS S3 for high availability and durability, avoiding local filesystem limitations.
- Multi-Tenancy: Tenant isolation is enforced at the database query level using
tenantId. - Streaming: Implemented using AWS S3
GetObjectCommandwith support forRangeheaders to allow seeking in the player. - Simulated AI: To demonstrate the workflow, a simulated sensitivity analysis runs post-upload, flagging content based on keywords or random triggers for demonstration purposes.
- Security: JWT is used for session management, and sensitive routes are protected by role-verification middleware.
- Full-Stack Architecture (Node/React)
- Multi-Tenant Isolation
- Video Upload & Processing Pipeline
- HTTP Range-based Streaming
- Real-time Progress (Socket.io)
- Comprehensive README & User Manual
- AI Moderation Workflow