A modern real-time chat application built with the MERN Stack and Socket.IO, delivering secure authentication, instant messaging, and a responsive user experience.
ChatSphere is designed with a scalable architecture, clean code practices, and reusable components, making it an excellent foundation for modern real-time communication applications.
| Landing Page | Chat Interface |
|---|---|
| Add Screenshot | Add Screenshot |
- User Registration
- User Login
- JWT Authentication
- Protected Routes
- User Profile API
- One-to-One Messaging
- Instant Message Delivery using Socket.IO
- Real-Time Connection Management
- Responsive UI
- React Context API for Global State Management
- React Router for Navigation
- Axios-based API Layer
- Reusable Components
- Modern UI with Tailwind CSS
- RESTful API Architecture
- Express.js Middleware
- MongoDB with Mongoose
- JWT Authentication
- Modular Folder Structure
- Centralized Error Handling
- React
- Vite
- Tailwind CSS
- React Router
- Axios
- Context API
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT
- Socket.IO
ChatSphere/
│
├── client/
│ ├── public/
│ ├── src/
│ │ ├── assets/
│ │ ├── components/
│ │ ├── context/
│ │ ├── hooks/
│ │ ├── pages/
│ │ ├── services/
│ │ ├── utils/
│ │ ├── App.jsx
│ │ └── main.jsx
│ └── package.json
│
├── server/
│ ├── config/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── utils/
│ ├── server.js
│ └── package.json
│
├── README.md
└── .gitignore
git clone https://github.com/Hanzalah-m/ChatSphere.git
cd ChatSphereFrontend
cd client
npm installBackend
cd ../server
npm installCreate a .env file inside the server directory.
PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
CLIENT_URL=http://localhost:5173cd server
npm run devcd client
npm run devFrontend:
http://localhost:5173
Backend:
http://localhost:3000
User
│
▼
Register / Login
│
▼
JWT Token Generated
│
▼
Stored in Local Storage
│
▼
Protected API Requests
│
▼
Authenticated User Profile
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register a new user |
| POST | /api/auth/login |
Authenticate user |
| GET | /api/auth/profile |
Fetch authenticated user |
- Group Chats
- Typing Indicators
- Read Receipts
- Online/Offline Presence
- File & Image Sharing
- Emoji Support
- Message Search
- Notifications
- Voice & Video Calling
- Message Reactions
- Dark Mode Customization
- Redis for Socket Session Management
- Docker Support
- CI/CD Pipeline
- Unit & Integration Testing
- Rate Limiting
- End-to-End Encryption
- Multi-Device Synchronization
This project is licensed under the MIT License.
Hanzalah
GitHub: https://github.com/Hanzalah-m
Contributions, issues, and feature requests are welcome.
If you'd like to improve ChatSphere, feel free to fork the repository, create a feature branch, and submit a pull request.
If you found this project useful, consider giving it a ⭐ on GitHub.