Streamline is a high-performance, scalable backend for a media streaming platform, inspired by platforms like YouTube (but not a clone!). This backend powers core features such as user authentication, video uploads, playlist management, and dynamic user interactions including comments, likes, and subscriptions.
-
User Authentication:
Secure login/register system using JWT and bcrypt for robust password and session security. -
Video Uploads & Delivery:
Supports efficient video uploads and streaming, utilizing Cloudinary for optimized media storage and accelerated delivery (boosted delivery speed by 40%). -
Playlist Management:
Users can create, update, and manage playlists for better content organization. -
User Interactions:
- Comments: Aggregated with user details and like counts.
- Likes: Like and unlike videos and comments.
- Subscriptions: Subscribe/unsubscribe to channels.
- Tweets: Custom tweet-like feature for short video updates.
-
Performance-Oriented Database Design:
Built with MongoDB and Mongoose; optimized schemas for users, videos, playlists, and interactions for rapid queries and scalability. -
Custom Middleware & Routing:
Modular and maintainable code structure using Express.js, with custom middleware for authentication, error handling, and more. -
Health Checks & Dashboards:
Integrated endpoints for service health monitoring and admin dashboards. -
Controllers: All major business logic, such as handling video, user, comment, playlist, and subscription operations.
-
Middleware: Authentication, validation, and error-handling logic.
-
Routes: API endpoints mapped to controllers.
-
Models: Mongoose schemas for Users, Videos, Playlists, Comments, etc.
- Backend: Node.js, Express.js
- Database: MongoDB (with Mongoose ODM)
- Authentication: JWT, bcrypt
- Media Storage/Delivery: Cloudinary
- Other: Custom middleware, RESTful API design
- Improved media delivery speed by 40% through Cloudinary integration.
- Aggregated comment endpoints fetch user details and like counts efficiently.
- Modular, scalable, and production-ready backend design.
- Passwords are hashed using bcrypt before storage.
- All sensitive routes are protected using JWT-based authentication middleware.
- Input validation is applied across endpoints.
- Node.js (v14+)
- MongoDB instance (local or cloud)
- Cloudinary account (for media storage)
-
Clone the repo:
git clone https://github.com/Itsmeinayath/Backend-Project.git cd Backend-Project -
Install dependencies:
npm install
-
Configure environment variables:
Create a.envfile with the following:MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret -
Run the server:
npm start
The server will start on
http://localhost:3000(or the port in your.env).
- API endpoints are organized by resource (users, videos, playlists, etc.).
- See the
/routesdirectory and controller files for detailed endpoint documentation.
Contributions are welcome! Please open an issue or submit a pull request for feature requests, bug fixes, or improvements.
This project is licensed under the MIT License.
For questions, suggestions, or collaborations, please open an issue or reach out via GitHub.