A modern real-time chat application built with React, Redux Toolkit, Express, and Socket.io, organized as a monorepo with Turbo and pnpm.
- Real-time Messaging - Instant messaging with Socket.io
- Video Calling - Single and multiple user video calls with WebRTC
- User Authentication - Secure JWT-based authentication
- User Management - User profiles, search, and contact management
- Chat History - Persistent message storage and retrieval
- Modern UI - Responsive design with Tailwind CSS
- Monorepo Architecture - Organized workspace with shared packages
This project uses a monorepo structure with the following workspaces:
apps/web- React frontend application (Vite + Redux Toolkit)apps/api- Express backend API (Node.js + TypeScript)packages/ui- Shared UI componentspackages/eslint-config- Shared ESLint configurationpackages/typescript-config- Shared TypeScript configuration
- React 19 - UI framework
- Redux Toolkit - State management
- Vite - Build tool and dev server
- Tailwind CSS - Styling
- Socket.io Client - Real-time communication
- PeerJS - WebRTC video calling
- Express.js - Web framework
- TypeScript - Type safety
- Socket.io - Real-time communication
- MongoDB - Database
- JWT - Authentication
- Winston - Logging
- Turbo - Monorepo build system
- pnpm - Package manager
- Docker - Containerization
- Vercel - Frontend deployment
- Render - Backend deployment
- Node.js >= 18
- pnpm >= 9.0.0
- Docker (for local database)
git clone <repository-url>
cd rtk-chat-apppnpm installCopy environment files and configure:
# For API
cp apps/api/.env.example apps/api/.env
# For Web (if needed)
cp apps/web/.env.example apps/web/.env# Start all applications
pnpm dev
# Or start individually
pnpm --filter @rtk-app/api dev # Backend only
pnpm --filter @rtk-app/web dev # Frontend onlyThe applications will be available at:
- Frontend: http://localhost:5173
- Backend: http://localhost:5000
cd apps/api
docker-compose up -d --buildThis will start:
- MongoDB database
- Express API server
- Nginx reverse proxy
pnpm dev # Start all development servers
pnpm build # Build all applications
pnpm lint # Lint all packages
pnpm format # Format code with Prettier
pnpm check-types # Type check all TypeScript code# API
pnpm --filter @rtk-app/api dev
pnpm --filter @rtk-app/api build
pnpm --filter @rtk-app/api lint
# Web
pnpm --filter @rtk-app/web dev
pnpm --filter @rtk-app/web build
pnpm --filter @rtk-app/web lint- URL: https://rtk-chat-app-cyan.vercel.app
- Auto-deploys from main branch
- URL: https://rtk-chat-app.onrender.com
- Auto-deploys from main branch
rtk-chat-app/
├── apps/
│ ├── api/ # Express backend
│ │ ├── src/
│ │ │ ├── controllers/ # API route handlers
│ │ │ ├── middleware/ # Express middleware
│ │ │ ├── models/ # Database models
│ │ │ ├── services/ # Business logic
│ │ │ └── utils/ # Utility functions
│ │ └── build/ # Compiled TypeScript
│ └── web/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── features/ # Redux slices and API
│ │ ├── pages/ # Route components
│ │ └── utils/ # Utility functions
│ └── dist/ # Built assets
├── packages/
│ ├── ui/ # Shared UI components
│ ├── eslint-config/ # Shared ESLint config
│ └── typescript-config/ # Shared TypeScript config
└── turbo.json # Turbo configuration- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the ISC License.