Skip to content

Yashika-code/Youtube_tweet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎥 YouTubeTweet – Social Video & Microblogging Backend (Node.js)

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.


🚀 Project Overview

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.


✨ Key Features

🔐 Authentication & User Management

  • JWT-based authentication
  • Secure protected routes using middleware
  • User registration and login APIs

🎥 Video Management

  • Video upload and storage via Cloudinary
  • Video retrieval and metadata management
  • Like and comment functionality on videos

💬 Tweet System

  • Create, read, and manage short text posts (tweets)
  • Like and interaction support
  • User–tweet relationship handling

📂 Playlists & Subscriptions

  • Playlist creation and management
  • Subscribe/unsubscribe to users
  • Feed-level relationship modeling

🛠 Backend Utilities

  • Healthcheck endpoint for service monitoring
  • Dashboard endpoints for aggregate data
  • Centralized error handling

🧱 Backend Architecture

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

Design Highlights

  • Clear separation of concerns
  • Reusable middleware for authentication and uploads
  • Clean controller-based request handling

🔒 Security Considerations

  • JWT authentication for protected APIs
  • Middleware-based access control
  • Secure media uploads using Cloudinary
  • Environment variable–based secret management

🛠 Tech Stack

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB + Mongoose
  • Authentication: JWT
  • Media Storage: Cloudinary
  • File Uploads: Multer
  • Environment Management: dotenv

⚙️ Setup & Installation

1️⃣ Clone the Repository

git clone https://github.com/Yashika-code/Youtube_tweet.git
cd Youtube_tweet

2️⃣ Install Dependencies

npm install

3️⃣ Configure Environment Variables

Create 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_secret

4️⃣ Run the Server

npm start

Server will run at:

http://localhost:5000

📡 API Endpoints Overview

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/.


🧠 What This Project Demonstrates

✔ RESTful API design ✔ Backend data modeling with MongoDB ✔ Authentication & authorization using JWT ✔ Media handling with Cloudinary ✔ Modular and scalable backend structure


🔮 Future Enhancements

  • Pagination for feeds and comments
  • Rate limiting for APIs
  • API documentation using Swagger
  • Notification system
  • Improved analytics endpoints

👩‍💻 Author

Yashika Soni Backend & Full-Stack Developer 📧 Email: soniyashika164@gmail.com 🔗 GitHub: https://github.com/Yashika-code


⭐ Final Notes

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.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors