Skip to content

A fully-featured Twitter-inspired microblogging platform with secure authentication, dynamic user interaction, and real-time communication. Built using the powerful MERN stack.

Notifications You must be signed in to change notification settings

SiddhantVgaikwad/TwitterClone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TwitterClone 🐦

MERN Stack | JWT Auth | Real-Time Social Experience

A fully-featured Twitter-inspired microblogging platform with secure authentication, dynamic user interaction, and real-time communication. Built using the powerful MERN stack.

πŸ‘‰ Live Demo β€” Explore it now!


✨ Features

πŸ” Authentication & Security

  • JWT-based user authentication
  • βœ‰οΈ Email verification system
  • πŸ”„ Password reset & recovery
  • πŸ›‘οΈ Role-based authorization (User / Moderator / Admin)
  • 🌐 OAuth 2.0 integration (Coming Soon)

πŸ“Έ Feature Showcase

  • Home page

image

  • Update Profile

image

  • follow/unfollow, Posts, like/unlike

image

🎯 User Experience

  • πŸŒ“ Light & Dark theme toggle
  • πŸ” Advanced tweet search with filters:
    • Hashtags
    • User mentions
    • Date range
    • Engagement threshold (likes/retweets)
  • ⭐ Threaded tweet conversations
  • 🎯 Personalized tweet recommendations

πŸ“ Tweet System

  • πŸ’¬ Rich text tweets with emoji & GIF support
  • πŸ“Έ Media uploads (images/videos via Cloudinary)
  • πŸ” Retweet with comments
  • πŸ”– Bookmarking tweets
  • πŸ“Š Tweet analytics (for verified users)

πŸ’¬ Social Features

  • πŸ‘₯ Follow / Unfollow system
  • πŸ’Œ Real-time direct messaging (Socket.IO)
  • πŸ”” Push notifications for:
    • New likes & retweets
    • Mentions
    • New followers

πŸ›  Tech Stack

πŸ”§ Frontend

  • React.js (Hooks + Context API)
  • Redux Toolkit (State management)
  • React Router v6
  • Tailwind CSS + Dark Mode
  • Socket.IO Client (Real-time)
  • Lottie Animations

πŸ”§ Backend

  • Node.js & Express.js
  • MongoDB + Mongoose
  • JSON Web Tokens (JWT)
  • Nodemailer (email services)
  • Cloudinary (media uploads)

πŸ”— Services

  • MongoDB Atlas
  • Vercel (Frontend Hosting)
  • Render (Backend Hosting)
  • Cloudinary CDN

πŸš€ Getting Started

βœ… Prerequisites

  • Node.js v18+
  • MongoDB Atlas cluster
  • Cloudinary account

πŸ“¦ Installation

  1. Clone the repository

    git clone https://github.com/SiddhantVgaikwad/TwitterClone.git
  2. Configure environment variables Create a .env file in both client/ and server/:

    MONGO_URI=your_mongodb_connection  
    JWT_SECRET=your_jwt_secret  
    CLOUDINARY_CLOUD_NAME=your_cloud_name
    
  3. Install dependencies and start the app

    cd client && npm install && npm start
    cd ../server && npm install && npm run dev


🀝 Contributing

We welcome contributions!

  1. Fork the repo
  2. Create a new branch
    git checkout -b feat/your-feature
  3. Commit your changes
    git commit -m "feat: add awesome feature"
  4. Push and create a Pull Request

πŸ“„ License

MIT Β© Siddhant Gaikwad


πŸ‘¨β€πŸ’» Crafted with ❀️ by Siddhant Gaikwad

Full Stack Developer

LinkedIn β€’ Twitter


πŸ—£οΈ Project Explained in My Words (Simple English)

What is TwitterClone?

This is a small version of Twitter I built using the MERN stack (MongoDB, Express, React, Node). It lets users post tweets, follow others, chat in real-time, and get notificationsβ€”just like the real Twitter app.

I added login with JWT (a safe way to keep users logged in), media uploads, light/dark mode, and live notifications using Socket.IO.

Key Features in Simple Words:

  • Login/Register system β€” Users can sign up, login, and even reset their password if they forget it.
  • Make tweets β€” You can post tweets with emojis, pictures, or videos.
  • Search tweets β€” You can search tweets by hashtags, names, or dates.
  • Real-time messaging β€” Chat with people instantly, like WhatsApp.
  • Notifications β€” Get alerts when someone likes, retweets, follows, or mentions you.
  • Dark & Light mode β€” Switch between themes.
  • Tweet threads & bookmarks β€” Group replies like a thread, and save tweets for later.
  • Tweet analytics β€” Verified users can see how well their tweets are doing.

⭐ JWT Authentication

  • Situation: Needed a secure way to keep users logged in.
  • Task: Set up a system for sign up, login, logout, and token-based security.
  • Action: Implemented JWT in the backend with refresh tokens and middleware for route protection.
  • Result: Created a secure auth system that handles login/logout smoothly without exposing user data.

⭐ Real-Time Messaging

  • Situation: Wanted to make chatting feel instant, like real social apps.
  • Task: Add a real-time direct messaging system.
  • Action: Integrated Socket.IO on both frontend and backend for live chat.
  • Result: Users can now chat instantly with each other with no page refresh.

⭐ Tweet System with Media

  • Situation: Users needed a way to express themselves more than just text.
  • Task: Add support for emojis, images, videos in tweets.
  • Action: Used Cloudinary for media uploads and emoji pickers in the tweet composer.
  • Result: Users can now tweet with rich content, improving engagement.

⭐ Notifications

  • Situation: Needed to keep users updated on activities like likes or retweets.
  • Task: Build a push notification system.
  • Action: Used Socket.IO and MongoDB triggers to send notifications in real-time.
  • Result: Users get instant updates, which improves interaction and time on site.

⭐ Search & Filters

  • Situation: Wanted users to find specific tweets quickly.
  • Task: Add a smart search bar with filters.
  • Action: Used MongoDB text indexing and built custom filters (hashtags, dates, mentions).
  • Result: Users can now find tweets quickly and accurately.

About

A fully-featured Twitter-inspired microblogging platform with secure authentication, dynamic user interaction, and real-time communication. Built using the powerful MERN stack.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages