A full-stack real-time chat application that connects users anonymously for private 1-on-1 messaging. Built with React, Node.js, Express, Socket.IO, and MongoDB.
π’ Project Status: This project was previously made private but is now publicly available again as an actively maintained open-source project. We're committed to transparency and community-driven development. Previously had 29 stars and 17 forksβthank you for your continued support!
- Preview
- Features
- Prerequisites
- Setup Instructions
- Tech Stack
- Project Structure
- Deployment
- Contributing
- Transparency & Trust
- Made by Contributors
- Acknowledgements
- Contact
- License
| Login Page | Sign Up | App Page |
|---|---|---|
![]() |
![]() |
![]() |
Pairly operates on a freemium model with core features available to all users and premium features for subscribers. This allows us to maintain the project sustainably while keeping the core chat experience free and open-source.
- π Secure User Authentication (Login/Signup)
- π² Random One-to-One Private Chat
- π‘ Real-time Messaging with Socket.IO
- π Chat History Persistence using MongoDB
- βοΈ Typing Indicator
- π‘οΈ Protected Routes for Logged-in Users
- π Timestamped Messages
- π± Fully Responsive UI (Mobile & Desktop)
- π Basic Notifications
- β Priority Support
- π¨ Custom Themes & Personalization
- πΈ Advanced Media Sharing
- π Enhanced Privacy Controls
- π± PWA App Installation
Contributing Note: Contributors are welcome to work on both free and premium features. The codebase is fully open-source under the MIT License, and both tiers benefit from community improvements!
Make sure you have the following installed before starting:
-
Node.js (v18 or later)
-
A MongoDB Atlas account (or use local MongoDB)
Need help setting up MongoDB Atlas? Follow this guide: Deploy a Free Cluster
After deploying a cluster:
- Click Connect β Drivers
- Select Node.js as the driver
- Copy the connection string and use it for
MONGO_URIin.env
Example connection string:
MONGO_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/?retryWrites=true&w=majority
Follow these steps to run the app locally:
git clone https://github.com/behan05/pairly.git
cd pairlyNavigate into the server directory:
cd pairly-serverInstall dependencies:
npm installCreate an environment file:
cp .env.example .envOpen the .env file and configure:
PORT=5000
MONGO_URI=your_mongo_db_uri_here
JWT_SECRET=your_jwt_secret_hereStart the backend server:
npm startYou should see logs like:
Server running on port 5000...
Connected to MongoDB
In a new terminal window/tab:
cd pairly-ui
npm install
npm run devThe app will open at: http://localhost:5173/
Common issues and solutions:
- MongooseServerSelectionError: Double-check your MongoDB URI and internet connection.
- Port already in use: Change the
PORTvalue in.env, or stop the conflicting process. - Frontend doesnβt load: Ensure backend server is running correctly.
Frontend:
- βοΈ React + Vite
- π Material UI (MUI)
- π React Router
- π¦ Redux or Context API
- π’ Toastify
- π Socket.IO Client
Backend:
- π© Node.js + Express
- π’οΈ MongoDB + Mongoose
- π JWT for Authentication
- π bcrypt for Hashing
- π‘ Socket.IO for Real-Time Comm
pairly/
βββ pairly-ui/ # Frontend React Application
β βββ src/
β β βββ api/ # API service calls
β β βββ assets/ # Images, fonts, static assets
β β βββ components/ # Reusable React components
β β βββ context/ # Context API setup
β β βββ features/ # Feature-specific modules
β β βββ layouts/ # Layout components
β β βββ middleware/ # Custom middleware
β β βββ MUI/ # Material-UI customizations
β β βββ pages/ # Page components
β β βββ redux/ # Redux store & slices
β β βββ routes/ # Route definitions
β β βββ services/ # Service functions
β β βββ styles/ # Global styles
β β βββ utils/ # Utility functions
β β βββ installPrompt/ # PWA install prompt
β β βββ SubscriptionManager/ # Subscription handling
β β βββ App.jsx # Main App component
β β βββ main.jsx # Entry point
β βββ public/
β β βββ manifest.json # PWA manifest
β β βββ robots.txt # SEO robots config
β β βββ service-worker.js # Service worker
β β βββ messageTone/ # Message audio files
β β βββ sounds/ # Sound effects
β βββ vite.config.js
β βββ eslint.config.js
β βββ package.json
β βββ README.md
β
βββ pairly-server/ # Backend Express Application
β βββ controllers/
β β βββ authController.js
β β βββ profileController.js
β β βββ settingsController.js
β β βββ adminPanelControllers/ # Admin management
β β βββ feedbackControllers/ # User feedback
β β βββ paymentControllers/ # Payment processing
β β βββ privateChatControllers/ # Private chat logic
β β βββ randomChatControllers/ # Random chat matching
β β βββ searchUserControllers/ # User search
β β βββ support-ticket/ # Support tickets
β β βββ common/ # Shared controller logic
β β
β βββ models/
β β βββ User.model.js # User schema
β β βββ Profile.model.js # User profile
β β βββ settings.model.js # User settings
β β βββ LoginActivity.model.js # Login tracking
β β βββ UserActivity.model.js # User activity logs
β β βββ ReportProblem.model.js # Problem reports
β β βββ SupportTicket.model.js # Support tickets
β β βββ admin/ # Admin-related models
β β βββ chat/ # Chat-related models
β β βββ feedback/ # Feedback models
β β βββ payment/ # Payment models
β β βββ proposal/ # Proposal models
β β
β βββ routers/
β β βββ profileRoutes.js
β β βββ settingsRoutes.js
β β βββ admin/ # Admin routes
β β βββ auth/ # Authentication routes
β β βββ chat/ # Chat routes
β β βββ feedback/ # Feedback routes
β β βββ payment/ # Payment routes
β β βββ searchUsers/ # Search routes
β β
β βββ middlewares/
β β βββ authMiddleware.js # JWT authentication
β β βββ adminAuthMiddleware.js # Admin authorization
β β βββ multerMiddleware.js # File upload handling
β β βββ uploadPrivateMedia.js # Private chat media upload
β β βββ uploadRandomMedia.js # Random chat media upload
β β βββ uploadProfileS3.js # S3 profile upload
β β
β βββ sockets/
β β βββ socketServer.js # Main socket configuration
β β βββ privateChat/ # Private chat socket events
β β βββ randomChat/ # Random chat socket events
β β
β βββ config/
β β βββ db.js # MongoDB connection
β β βββ passport/ # OAuth strategies
β β β βββ passportGithub.js
β β β βββ passportGoogle.js
β β βββ razorpay/
β β βββ razorpay.js # Razorpay integration
β β
β βββ utils/
β β βββ generateToken.js
β β βββ aws/ # AWS S3 utilities
β β βββ email/ # Email service
β β βββ socket/ # Socket utilities
β β
β βββ cron/
β β βββ cleanupUnverifiedUsers.cron.js
β β βββ deleteRandomExpiredMessages.cron.js
β β
β βββ tests/
β β βββ unit/ # Unit tests
β β βββ integration/ # Integration tests
β β
β βββ server.js # Main server entry
β βββ package.json
β
βββ docs/
β βββ screenshot/ # App screenshots
β βββ translations/
β βββ README.en.md # English docs
β βββ README.es.md # Spanish docs
β βββ README.id.md # Indonesian docs
β
βββ CODE_OF_CONDUCT.md # Community guidelines
βββ CONTRIBUTING.md # Contribution guide
βββ LICENSE # MIT License
βββ README.md # This file
- Frontend: Vercel
- Backend: Render
Don't worry if you're new to open source β we're happy to help guide you! π Just open an issue or comment on one you'd like to tackle.
Pairly supports both free and premium features. All contributions are welcome, whether you're:
- π Improving free features that benefit all users
- π Building premium features for subscribers
- π§ Fixing bugs or improving performance for everyone
The entire codebase is open-source under the MIT License. Contributors get credit for their work regardless of which tier they contribute to!
If you're new to open source, here are some good first issues:
- Improve error messages or user feedback
- Setup GitHub Actions for CI
- Add unit tests or end-to-end tests
- Improve accessibility
- Write documentation
- π± Fork this repo
- π οΈ Create your feature branch
- π Submit a Pull Request
- β€οΈ Don't forget to star the project!
Be sure to read the contributing guide if available.
We understand that making a project private and then public again may raise concerns. Here's what we want you to know:
- We needed time to restructure the codebase and improve stability
- We wanted to ensure the project was production-ready
- We were evaluating the best path forward for long-term maintenance
- 100% Open Source: All code is publicly visible and auditable
- Active Maintenance: The project is actively maintained and updated regularly
- Community-Driven: We welcome feedback, issues, and pull requests from the community
- Clear Roadmap: We're committed to transparent development practices
- MIT License: You can use, modify, and distribute this software freely
- All future development will be in the open
- We'll maintain regular communication through issues and discussions
- Security and stability are our top priorities
- Your feedback and contributions directly shape the project's future
We are grateful to all contributors who make this better every day.
Add yourself in CONTRIBUTORS.md when you contribute!
Thanks to all contributors and open-source libraries used in this project. This project wouldn't be possible without them!
For questions or contributions, feel free to reach out: βοΈ behankrbth@outlook.com
This project is licensed under the MIT License


