Connect instantly, scale infinitely. Build powerful group conversations with enterprise-grade architecture.
Live Demo β’ Documentation β’ Report Bug β’ Video
- Real-time Group Chat - Instant messaging with Socket.IO
- User Authentication - Secure login with Better Auth
- Group Management - Create and manage chat groups with passcodes
- Typing Indicators - See who's typing in real-time
- Message Persistence - All messages stored in PostgreSQL
- File Sharing - Share files and media in conversations
- Emoji Support - Rich emoji picker integration
- Responsive Design - Works seamlessly on all devices
- Scalable Architecture - Monorepo with Turbo for optimal performance
- Real-time Notifications - Instant message delivery
- Redis Integration - High-performance caching and session storage
- Kafka Integration - High throughput and scalability
- Database Migrations - Prisma ORM with automatic migrations
- User Sessions - Secure session management
- Docker Support - Containerized deployment ready
- Health Monitoring - Built-in health checks and monitoring
- Modern UI/UX - Beautiful, intuitive interface with Tailwind CSS
- Dark/Light Mode - Theme switching with next-themes
- Smooth Animations - Framer Motion powered interactions
- Mobile Responsive - Optimized for all screen sizes
- Accessibility - WCAG compliant components
- Loading States - Elegant loading indicators
- Error Handling - Graceful error management
- Next.js 15 - React framework with App Router
- TypeScript 5 - Type-safe development
- Tailwind CSS 4 - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Framer Motion - Animation library
- Socket.IO Client - Real-time communication
- React Hook Form - Form handling with validation
- Zod - Schema validation
- Better Auth - Authentication solution
- Node.js - JavaScript runtime
- Express.js - Web framework
- Socket.IO - Real-time bidirectional communication
- Prisma ORM - Database toolkit
- PostgreSQL - Primary database
- Redis - Caching and session storage
- Better Auth - Authentication backend
- TypeScript - Type-safe backend development
- Turbo - Monorepo build system
- Docker - Containerization
- Render - Cloud deployment platform
- pnpm - Fast package manager
- ESLint - Code linting
- Prettier - Code formatting
- Client Connection - Socket.IO client connects to server
- Room Joining - Users join specific chat rooms
- Message Broadcasting - Real-time message delivery
- Typing Indicators - Live typing status updates
- Database Persistence - Messages saved to PostgreSQL
- Session Management - Redis-backed session storage
- Node.js >= 18
- pnpm >= 8.15.6
- PostgreSQL database
- Redis instance
- Clone the repository
git clone https://github.com/nawinsharma/scalable-chatapp.git
cd scalable-chatapp- Install dependencies
pnpm install- Environment Setup
# Copy environment files
cp apps/client/.example.env apps/client/.env.local
cp apps/server/.example.env apps/server/.env- Database Setup
cd apps/server
pnpm db:push- Start Development Servers
# Start all services
pnpm dev
# Or start individually
pnpm --filter client dev
pnpm --filter server devNEXT_PUBLIC_API_URL=http://localhost:8080
NEXT_PUBLIC_BETTER_AUTH_URL=http://localhost:3000
BETTER_AUTH_SECRET=your-secret-key
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secretDATABASE_URL=postgresql://user:password@localhost:5432/chatbit
REDIS_URL=redis://localhost:6379
BETTER_AUTH_SECRET=your-secret-key
BETTER_AUTH_URL=http://localhost:3000
CORS_ORIGIN=http://localhost:3000
PORT=8080cd apps/server
docker-compose up -d# Build all packages
pnpm build
# Start production server
pnpm --filter server start- Turbo Build System - Incremental builds and caching
- Socket.IO Redis Adapter - Horizontal scaling support
- Database Indexing - Optimized queries with Prisma
- CDN Ready - Static asset optimization
- Lazy Loading - Component and route optimization
- Bundle Splitting - Efficient code splitting
- Health Endpoints -
/health,/ping,/ready - Memory Usage - Process monitoring
- Uptime Tracking - Server status monitoring
- Error Logging - Comprehensive error tracking
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- TypeScript - Strict type checking
- ESLint - Code linting and formatting
- Prettier - Consistent code formatting
- Turbo - Fast, incremental builds
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js Team - For the amazing React framework
- Socket.IO - Real-time communication library
- Prisma Team - Database toolkit
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
Built with β€οΈ by Nawin Sharma
β Star this repository if you found it helpful!