Peafowl is a full-stack real-time chat application inspired by modern messaging platforms like WhatsApp.
Built using the MERN stack with Socket.IO and Redis, the project focuses on scalable real-time communication, presence tracking, and modular backend architecture.
- React
- Vite
- Socket.IO Client
- Node.js
- Express.js
- Socket.IO
- Redis
- MongoDB
- JWT Authentication
- Real-time one-to-one messaging
- Socket.IO powered bidirectional communication
- Redis Pub/Sub for scalable socket event distribution
- Online/offline user presence
- Typing indicators
- Persistent chat storage with MongoDB
- JWT-based authentication
- Modular backend architecture
- Rate limiting and middleware support
- Responsive React UI
React Client
│
Socket.IO + REST APIs
│
Express + Socket.IO Server
│
Redis Pub/Sub Adapter
│
MongoDB
peafowl/
│
├── client/ # React frontend
├── server/ # Express + Socket.IO backend
│
├── README.md
└── .env.example
Create a .env file inside the server/ directory.
Example:
PORT=5000
MONGO_URI=your_mongodb_connection
JWT_SECRET=your_secret
REDIS_URL=redis://localhost:6379git clone <repo-url>
cd peafowlcd server
npm install
npm run devcd client
npm install
npm run dev- Group chats
- Message seen/delivery status
- Media/file sharing
- Voice/video calling
- End-to-end encryption
- Push notifications
This project is primarily focused on learning and implementing:
- Real-time system design
- WebSocket communication
- Redis Pub/Sub architecture
- Scalable socket handling
- Full-stack application structure
- Authentication and session handling