A full-featured Discord/Slack clone built with modern web technologies.
- React 18 + Vite + TypeScript - Fast, type-safe development
- Tailwind CSS + shadcn/ui - Beautiful, accessible UI components
- Firebase - Authentication, Firestore database, File storage
- Pusher - Real-time presence and typing indicators
- LiveKit - Voice/video calls and screen sharing
- Zustand - Lightweight state management
- React Hook Form + Zod - Form validation
- TipTap - Rich text editing with Markdown support
- Electron - Desktop app support
- PWA - Mobile app support
- Node.js + Express + TypeScript - Backend API service
- Firebase Admin SDK - Push notifications via FCM
- OpenAI Moderation API - AI-powered content moderation
- Pusher Webhooks - Real-time event handling
- 🔐 Authentication (Email/Password, Google OAuth)
- 💬 Real-time text messaging with Markdown support
- 📁 File uploads with previews (images, PDFs, documents)
- 🎙️ Voice channels
- 📹 Video calls with screen sharing
- 🧵 Message threads for organized discussions
- 📌 Pin important messages
- 👥 User mentions (@user, @everyone)
- 😊 Emoji reactions
- 🔍 Message search and filtering
- 🔔 Push notifications for mentions
- 👥 Role-based permissions system
- 🔗 QR code invitations
- 👀 Read/unread message tracking
- ✏️ Message editing and deletion
- 🤖 AI-powered content moderation
- 🎨 Customizable themes (light/dark mode)
- ⚙️ Comprehensive settings
- ⌨️ Keyboard shortcuts
- 📱 PWA support for mobile
- 💻 Electron app for desktop (Windows, Mac, Linux)
- Node.js 18+ and npm
- Firebase project
- Pusher account
- LiveKit server (or cloud hosting)
- OpenAI API key (for content moderation)
-
Clone the repository
git clone <repository-url> cd chat-app-v2
-
Install dependencies
npm install
-
Set up environment variables Create a
.envfile in the root directory:VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id VITE_PUSHER_KEY=your_pusher_key VITE_PUSHER_CLUSTER=your_pusher_cluster VITE_LIVEKIT_URL=your_livekit_url VITE_BACKEND_URL=http://localhost:3001
-
Start the development server
npm run dev
-
Set up and start the backend (see
backend/README.md)
- Create a Firebase project at https://console.firebase.google.com
- Enable Authentication (Email/Password and Google)
- Create a Firestore database
- Enable Firebase Storage
- Set up Firestore Security Rules (see
firestore.rules) - Create required Firestore indexes (see plan document)
See backend/README.md for backend setup instructions.
src/
├── components/
│ ├── ui/ # shadcn/ui components
│ ├── chat/ # Chat-related components
│ ├── channels/ # Channel components
│ ├── groups/ # Group/server components
│ ├── modals/ # Modal dialogs
│ ├── settings/ # Settings pages
│ └── voice/ # Voice/video components
├── hooks/ # Custom React hooks
├── stores/ # Zustand stores
├── services/ # External service integrations
├── lib/ # Utility functions
├── types/ # TypeScript type definitions
└── pages/ # Route pages
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- Deploy to Vercel, Netlify, or Firebase Hosting
- Build command:
npm run build - Output directory:
dist
- Deploy to Railway.app, Render.com, or Fly.io
- See backend documentation for deployment instructions
npm run electron:buildMIT
Contributions are welcome! Please open an issue or submit a pull request.