A backend-focused Node.js application that combines YouTube-style video features with Twitter-style microblogging, built to demonstrate scalable REST API design, secure authentication, and clean backend architecture.
This project focuses on backend engineering concepts such as data modeling, API design, authentication, media handling, and modular code organization.
YouTubeTweet provides RESTful APIs for:
- Video uploads and interactions
- Tweet creation and engagement
- User subscriptions and playlists
- Media storage using Cloudinary
It is designed as a backend service that can power modern social media or video-sharing platforms.
- JWT-based authentication
- Secure protected routes using middleware
- User registration and login APIs
- Video upload and storage via Cloudinary
- Video retrieval and metadata management
- Like and comment functionality on videos
- Create, read, and manage short text posts (tweets)
- Like and interaction support
- User–tweet relationship handling
- Playlist creation and management
- Subscribe/unsubscribe to users
- Feed-level relationship modeling
- Healthcheck endpoint for service monitoring
- Dashboard endpoints for aggregate data
- Centralized error handling
The backend follows a modular MVC-inspired architecture:
src/
├── app.js # Express app configuration
├── index.js # Application entry point
├── constants.js # Global constants
│
├── controllers/ # Business logic layer
├── routes/ # API route definitions
├── models/ # Mongoose schemas & relationships
├── middlewares/ # Auth, file upload, and error handling
├── db/ # MongoDB connection
└── utils/ # Utility functions and helpers
- Clear separation of concerns
- Reusable middleware for authentication and uploads
- Clean controller-based request handling
- JWT authentication for protected APIs
- Middleware-based access control
- Secure media uploads using Cloudinary
- Environment variable–based secret management
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB + Mongoose
- Authentication: JWT
- Media Storage: Cloudinary
- File Uploads: Multer
- Environment Management: dotenv
git clone https://github.com/Yashika-code/Youtube_tweet.git
cd Youtube_tweetnpm installCreate a .env file in the root directory:
PORT=5000
MONGO_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_secretnpm startServer will run at:
http://localhost:5000
| Resource | Endpoint Prefix |
|---|---|
| Users | /api/user |
| Videos | /api/video |
| Comments | /api/comment |
| Likes | /api/like |
| Playlists | /api/playlist |
| Subscriptions | /api/subscription |
| Tweets | /api/tweet |
| Dashboard | /api/dashboard |
| Healthcheck | /api/healthcheck |
Detailed endpoint definitions are available in src/routes/.
✔ RESTful API design ✔ Backend data modeling with MongoDB ✔ Authentication & authorization using JWT ✔ Media handling with Cloudinary ✔ Modular and scalable backend structure
- Pagination for feeds and comments
- Rate limiting for APIs
- API documentation using Swagger
- Notification system
- Improved analytics endpoints
Yashika Soni Backend & Full-Stack Developer 📧 Email: soniyashika164@gmail.com 🔗 GitHub: https://github.com/Yashika-code
This project is intended to demonstrate backend engineering skills, not UI design. It focuses on clean architecture, secure APIs, and real-world backend patterns.
If you find this project useful, feel free to ⭐ star the repository.