A real-time chat application built with Bun, React, Express, Socket.io, and MongoDB.
- Runtime: Bun
- Framework: Express 5
- Real-time: Socket.io 4.8
- Database: MongoDB (Mongoose 9)
- Auth: Custom hand-rolled authentication
- Framework: React 18
- Build Tool: Vite 7
- Real-time: Socket.io-client
- Styling: TailwindCSS
Synq/ ├── backend/ │ ├── server.js │ └── src/ │ ├── config/ # Database connection │ ├── models/ # Mongoose schemas │ ├── routes/ # REST API routes │ ├── sockets/ # Socket.io handlers │ └── utils/ # Helper functions └── FE/ ├── src/ └── public/
- Bun (latest version)
- MongoDB Atlas account or local MongoDB
cd backend bun install
Create .env file in backend/:
MONGODB_URI=your_mongodb_atlas_connection_string PORT=3000
Run backend:
bun dev
cd FE bun install
Run frontend:
bun dev
Frontend will run on http://localhost:5173
- Project structure setup
- User authentication (username-based initially)
- 1-to-1 real-time messaging
- Message history persistence
- Online/offline status
- Typing indicators
- Group chats
- Read receipts
- File/image sharing
- Express + Socket.io server
- MongoDB connection
- Basic message model
- 1-to-1 chat logic with room-per-pair
- React UI for chat
- Socket.io-client integration
- Basic chat interface
- User authentication
- Persistent sessions
- UI/UX improvements
Contributions are welcome! Please feel free to submit a Pull Request.
- 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.