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!
- JWT-based user authentication
- βοΈ Email verification system
- π Password reset & recovery
- π‘οΈ Role-based authorization (User / Moderator / Admin)
- π OAuth 2.0 integration (Coming Soon)
- π Light & Dark theme toggle
- π Advanced tweet search with filters:
- Hashtags
- User mentions
- Date range
- Engagement threshold (likes/retweets)
- β Threaded tweet conversations
- π― Personalized tweet recommendations
- π¬ Rich text tweets with emoji & GIF support
- πΈ Media uploads (images/videos via Cloudinary)
- π Retweet with comments
- π Bookmarking tweets
- π Tweet analytics (for verified users)
- π₯ Follow / Unfollow system
- π Real-time direct messaging (Socket.IO)
- π Push notifications for:
- New likes & retweets
- Mentions
- New followers
- React.js (Hooks + Context API)
- Redux Toolkit (State management)
- React Router v6
- Tailwind CSS + Dark Mode
- Socket.IO Client (Real-time)
- Lottie Animations
- Node.js & Express.js
- MongoDB + Mongoose
- JSON Web Tokens (JWT)
- Nodemailer (email services)
- Cloudinary (media uploads)
- MongoDB Atlas
- Vercel (Frontend Hosting)
- Render (Backend Hosting)
- Cloudinary CDN
- Node.js v18+
- MongoDB Atlas cluster
- Cloudinary account
-
Clone the repository
git clone https://github.com/SiddhantVgaikwad/TwitterClone.git
-
Configure environment variables Create a
.env
file in bothclient/
andserver/
:MONGO_URI=your_mongodb_connection JWT_SECRET=your_jwt_secret CLOUDINARY_CLOUD_NAME=your_cloud_name
-
Install dependencies and start the app
cd client && npm install && npm start cd ../server && npm install && npm run dev
We welcome contributions!
- Fork the repo
- Create a new branch
git checkout -b feat/your-feature
- Commit your changes
git commit -m "feat: add awesome feature"
- Push and create a Pull Request
MIT Β© Siddhant Gaikwad
Full Stack Developer
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.