RtChat v2 is a powerful, room-based real-time chat application. Designed for seamless interaction, it offers both public and private chat rooms, catering to diverse communication needs.
🌐 Access RtChat v2
- Web App: https://rtchat.thesujal.buzz
- Status: Active and Open for Users 🟢
🌟 Versatile Room-Based Communication
- Create and join multiple chat rooms
- Choose between public and private room options
- Instant, real-time messaging across rooms
🔒 Flexible Access Controls
- Public rooms: Open to all users
- Private rooms: Need room's private key
⚡ High-Performance Architecture
- Low-latency communication
- Optimized for smooth user experience
- Scalable design supporting multiple concurrent users
- Monorepo: Turborepo
- Frontend: Next.js
- Styling: Tailwind CSS
- WebSocket: Node.js
ws
library - Database: PostgreSQL
- ORM: Prisma
- State Management: Zustand
- Type Safety: Zod
💡 Smart Architecture
- Debouncing to prevent redundant API calls
- Infinite scrolling for efficient chat history
- Singleton WebSocket connection management
- Optimized database indexing
- Robust retry and fallback mechanisms
- Real-time sending/sent status tracking
- Room members joined/online/offline/left status tracking
- Node.js v22.12.0 (LTS)
- PostgreSQL
- pnpm package manager
- Clone the repository
git clone https://github.com/sujal8976/rtchat.git
cd rtchat
- Install dependencies
npm install -g pnpm
pnpm install
- Configure environment variables
- Refer to
.env.example
in each app directory - Set up database, authentication, and WebSocket configurations
- Database Setup
pnpm run prisma:migrate
pnpm run prisma:generate
pnpm run prisma:seed
- Start Development Server
pnpm run dev
- Open to all registered users
- Discover and join rooms based on interests
- No invitation required
- Invite-only access
- Required private room key
- Register an account
- Explore public rooms
- Create your own rooms (public or private)
- Invite friends to private rooms
- Start chatting!
Happy Chatting! 🚀🌈