β οΈ Note: This project is still under development. Many features are yet to be added such as:
- Comments on posts
- Post sharing
- Read receipts in messages
- More enhancements coming soon...
A full-stack social media application built with React, Node.js, and MongoDB that provides a seamless social networking experience with real-time features, stories, messaging, and more.
- User Authentication - Secure authentication using Clerk
- User Profiles - Customizable profiles with cover photos and avatars
- Posts & Feed - Create, like, comment, and share posts
- Stories - 24-hour disappearing stories with viewer tracking
- Real-time Messaging - Direct messaging
- Connections - Send/accept connection requests, manage connections
- Discover - Find and connect with new people
- Notifications - Real-time notifications for interactions
- Image Uploads - Support for multiple image formats with ImageKit integration
- Email Notifications - Automated email notifications for important events
- Background Jobs - Inngest for handling background tasks
- Responsive Design - Mobile-first responsive design with Tailwind CSS
- Real-time Updates - Live updates using Redux Toolkit
- React 19 - Modern React with hooks and functional components
- Redux Toolkit - State management with RTK Query
- React Router v7 - Client-side routing
- Tailwind CSS 4 - Utility-first CSS framework
- Vite - Fast build tool and dev server
- Clerk React - Authentication and user management
- Node.js - JavaScript runtime
- Express.js - Web framework
- MongoDB - NoSQL database with Mongoose ODM
- Clerk Express - Authentication middleware
- Inngest - Background job processing
- ImageKit - Image storage and optimization
- Nodemailer - Email service integration
- Vercel - Frontend deployment
- Backend - Deployed on cloud platform with MongoDB Atlas
- Node.js (v18 or higher)
- MongoDB Atlas account
- Clerk account
- ImageKit account
- SMTP service (for email notifications)
- Clone the repository
git clone https://github.com/santoshsingh19114/Pingup.git
cd Pingup- Install dependencies
# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm install- Environment Variables
Create .env files in both server and client directories:
Server .env
PORT=4000
MONGODB_URI=your_mongodb_connection_string
CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key
IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key
IMAGEKIT_URL_ENDPOINT=your_imagekit_url_endpoint
EMAIL_USER=your_email@domain.com
EMAIL_PASS=your_email_password
INNGEST_EVENT_KEY=your_inngest_event_keyClient .env
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
VITE_API_URL=http://localhost:4000/api- Run the application
# Terminal 1 - Start the server
cd server
npm start
# Terminal 2 - Start the client
cd client
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend: http://localhost:4000
swishh/
βββ client/ # React frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ features/ # Redux slices
β β βββ api/ # API utilities
β β βββ assets/ # Static assets
β βββ package.json
βββ server/ # Express backend
β βββ controllers/ # Route controllers
β βββ models/ # MongoDB models
β βββ routes/ # API routes
β βββ middleware/ # Custom middleware
β βββ configs/ # Configuration files
β βββ inngest/ # Background jobs
β βββ server.js
βββ README.md
POST /api/user/register- Register new userPOST /api/user/login- User loginGET /api/user/profile/:id- Get user profile
GET /api/post/feed- Get feed postsPOST /api/post/create- Create new postPUT /api/post/:id/like- Like/unlike post
GET /api/story- Get active storiesPOST /api/story/create- Create new storyGET /api/story/:id/viewers- Get story viewersDELETE /api/story/:id- Delete story
GET /api/message/conversations- Get user conversationsGET /api/message/:userId- Get messages with specific userPOST /api/message/send- Send new messagePUT /api/message/:id/read- Mark message as read
POST /api/user/connect/:userId- Send connection requestPUT /api/user/connect/:requestId/accept- Accept connection requestDELETE /api/user/connect/:requestId/decline- Decline connection requestGET /api/user/connections- Get user connections
- WebSocket-like functionality using polling
- Read receipts and typing indicators
- Message status tracking
- 24-hour expiration with MongoDB TTL
- Viewer tracking and analytics
- Image optimization with ImageKit
- Chronological feed with connection filtering
- Pagination for infinite scroll
- Optimized database queries
- Multiple image upload support
- Automatic resizing and optimization
- CDN delivery via ImageKit
Client:
npm run dev # Start development server
npm run build # Build for production
npm run lint # Run ESLint
npm run preview # Preview production buildServer:
npm start # Start development server with nodemon
npm run test # Run tests (when implemented)- ESLint for JavaScript linting
- Prettier for code formatting
- Tailwind CSS for consistent styling
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Set up MongoDB Atlas cluster
- Configure environment variables on your hosting platform
- Deploy using platform-specific instructions
- Fork the repository
- 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
- Clerk for authentication
- MongoDB Atlas for database
- ImageKit for image storage
- Tailwind CSS for styling
- React community for amazing tools