A modern, feature-rich social media platform built with the MERN stack, featuring real-time messaging, multimedia content sharing, and interactive social features.
- User Authentication: Secure signup/signin with JWT tokens and bcrypt password hashing
- Password Recovery: OTP-based password reset via email using Nodemailer
- Real-time Messaging: Instant chat with Socket.io integration
- Live Notifications: Real-time push notifications for likes, comments, and follows
- Multimedia Sharing: Upload and share images/videos for posts, stories, and loops
- User Profiles: Customizable profiles with bio, profession, and profile pictures
- Social Features: Follow/unfollow users, like posts, comment on content
- Posts: Share images and videos with captions
- Stories: Temporary content that expires after 24 hours
- Loops: Short video content similar to reels/TikTok
- Online Status: See which users are currently online
- Responsive Design: Works seamlessly across desktop and mobile devices
- Search Functionality: Find users by name or username
- Media Preview: View media before uploading
- Auto-scroll Messaging: Smooth chat experience with automatic scrolling
- React.js 19.1.0 - UI library
- Vite 7.0.4 - Build tool and dev server
- Redux Toolkit - State management
- TailwindCSS - Styling framework
- Socket.io-client - Real-time communication
- React Router Dom - Navigation
- Axios - HTTP client
- React Icons - Icon library
- React Toastify - Toast notifications
- React Spinners - Loading indicators
- Node.js - Runtime environment
- Express.js 5.1.0 - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- Socket.io - Real-time communication
- JWT - Authentication tokens
- Bcrypt.js - Password hashing
- Multer - File upload handling
- Cloudinary - Cloud media storage
- Nodemailer - Email service
- CORS - Cross-origin resource sharing
- Cookie-parser - Cookie handling
- Dotenv - Environment variables
Before running this project, make sure you have the following installed:
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (local installation or MongoDB Atlas account)
- Git
git clone https://github.com/prkr-28/vybe.git
cd vybeNavigate to the backend directory:
cd backendInstall dependencies:
npm installCreate a .env file in the backend root directory:
# Database
MONGODB_URL=mongodb://localhost:27017/vybe
# or for MongoDB Atlas:
# MONGODB_URL=mongodb+srv://<username>:<password>@cluster.mongodb.net/vybe
# JWT Secret
JWT_SECRET=your_super_secret_jwt_key_here
# Server Port
PORT=8000
# Email Configuration (for OTP)
EMAIL=your_email@gmail.com
EMAIL_PASS=your_app_specific_password
# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secretNavigate to the frontend directory:
cd ../frontendInstall dependencies:
npm install- Enable 2-factor authentication on your Gmail account
- Generate an App Password:
- Go to Google Account settings
- Security β 2-Step Verification β App passwords
- Generate a password for "Mail"
- Use this password in the
EMAIL_PASSfield
- Create a free account at Cloudinary
- Go to Dashboard to find your credentials
- Add the credentials to your
.envfile
Option 1: Local MongoDB
- Install MongoDB locally
- Start MongoDB service
- Use:
MONGODB_URL=mongodb://localhost:27017/vybe
Option 2: MongoDB Atlas (Cloud)
- Create a free account at MongoDB Atlas
- Create a new cluster
- Get the connection string
- Replace
<username>and<password>with your credentials
cd backend
npm run devThe backend server will start on http://localhost:8000
Open a new terminal and run:
cd frontend
npm run devThe frontend will start on http://localhost:5173
- Sign Up: Create a new account with name, username, email, and password
- Sign In: Log in with your username and password
- Profile Setup: Update your profile with bio, profession, and profile picture
- Create Content: Upload posts, stories, or loops with images/videos
- Social Interaction: Follow users, like posts, and comment on content
- Messaging: Send real-time messages to other users
- Notifications: Receive instant notifications for social activities
POST /api/auth/signup- User registrationPOST /api/auth/signin- User loginGET /api/auth/signout- User logoutPOST /api/auth/sentOtp- Send OTP for password resetPOST /api/auth/verifyOtp- Verify OTPPOST /api/auth/resetPassword- Reset password
GET /api/user/current- Get current user dataGET /api/user/suggestedUsers- Get suggested usersPOST /api/user/updateProfile- Update user profileGET /api/user/getProfile/:userName- Get user profile by usernamePOST /api/user/follow/:userId- Follow/unfollow user
POST /api/post/upload- Upload new postGET /api/post/getAllPosts- Get all postsPOST /api/post/like/:postId- Like/unlike postPOST /api/post/comment/:postId- Comment on post
POST /api/story/upload- Upload new storyGET /api/story/- Get all storiesGET /api/story/:storyId- View specific story
POST /api/loop/upload- Upload new loopGET /api/loop/getAllLoops- Get all loops
POST /api/message/send/:receiverId- Send messageGET /api/message/getAll/:receiverId- Get conversation messagesGET /api/message/prevChats- Get previous conversations
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Prkr-28
- GitHub: @prkr-28
- Thanks to all the open-source libraries that made this project possible
- Special thanks to the React and Node.js communities
- Cloudinary for providing excellent media management services
If you encounter any issues or have questions, please feel free to:
- Open an issue on GitHub
- Contact me through my GitHub profile
Happy coding! π