Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎥 VidTube – Backend API

VidTube is a scalable backend system for a social media platform that combines YouTube-style video sharing with Twitter-like microblogging features. The project is designed with clean architecture, modular APIs, and real-world backend best practices.


🚀 Features

📹 Video Platform (YouTube-like)

  • Upload and manage videos
  • Like and dislike videos
  • Comment on videos
  • Subscribe and unsubscribe to channels
  • Fetch videos with engagement details

🐦 Microblogging (Twitter-like)

  • Create short text posts (tweets)
  • Like tweets
  • Comment and reply to tweets
  • Fetch user tweets

👤 User & Engagement

  • User authentication and authorization
  • Follow / subscription system
  • Centralized constants and utilities
  • Environment-based configuration

🛠️ Tech Stack

  • Node.js
  • Express.js
  • MongoDB (Mongoose)
  • RESTful APIs
  • dotenv
  • MVC Architecture

📁 Project Structure

vidtube/
├── controllers/        # Business logic for each route
├── db/                 # Database connection and configuration
├── middlewares/        # Authentication & error handling
├── models/             # Mongoose schemas
├── routes/             # API route definitions
├── utils/              # Utility / helper functions
│
├── .env                # Environment variables
├── .env.sample         # Sample environment configuration
├── app.js              # Express app setup
├── constants.js        # Centralized constants
├── index.js            # Server entry point

🔗 API Capabilities

🎬 Video APIs

  • Upload video
  • Get all videos
  • Like / dislike video
  • Comment on video
  • Subscribe to channel

📝 Tweet APIs

  • Create tweet
  • Like tweet
  • Comment on tweet
  • Fetch tweets by user

👥 User APIs

  • Register & login user
  • Profile management
  • Follow / subscription management

⚙️ Setup Instructions

1. Clone the repository

git clone https://github.com/Rajat125tech/VidTube
cd vidtube

2. Install dependencies

npm install

3. Configure environment variables

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret

4. Start the server

npm run dev

🧩 Architecture Highlights

  • MVC architecture for clear separation of concerns
  • Modular controllers and routes for scalability
  • Reusable middleware for authentication and error handling
  • Centralized constants and utility functions
  • Environment-based configuration for security

🚧 Future Enhancements

  • Video streaming and playback optimization
  • Recommendation and feed ranking system
  • Hashtags and trending tweet features
  • Notifications and real-time updates
  • Cloud storage integration (AWS S3 / Cloudinary)

👨‍💻 Author

Rajat Srivastava
2nd-year AIML Student @ VIT Vellore
Backend Developer | Node.js | REST APIs

About

A Backend project inspired from youtube but with a tweet option

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages