A real-time chat application built with Next.js, Firebase, and TypeScript. Features Google authentication, multiple chat rooms, and a modern dark/light theme interface.
- 🔐 Google Authentication - Secure sign-in with Firebase Auth
- 💬 Real-time Chat - Instant messaging with Firestore
- 🏠 Multiple Rooms - Create and join different chat rooms
- 🌙 Dark/Light Mode - Toggle between themes with next-themes
- 📱 Responsive Design - Works on desktop and mobile
- 🎨 Modern UI - Built with Tailwind CSS and Radix UI components
- Framework: Next.js 15.3.2 with App Router
- Language: TypeScript
- Styling: Tailwind CSS v4
- UI Components: Radix UI primitives
- Authentication: Firebase Auth
- Database: Firestore
- Theme: next-themes for dark/light mode
- Icons: Lucide React
- Node.js 18+ installed
- pnpm package manager
- Firebase project set up
-
Clone this repository
-
Install dependencies:
pnpm install
-
Set up Firebase configuration in
src/lib/firebase.ts -
Run the development server:
pnpm dev
-
Open http://localhost:3000 in your browser
src/
├── app/ # Next.js App Router pages
│ ├── rooms/ # Chat room pages
│ ├── layout.tsx # Root layout with providers
│ └── page.tsx # Home page
├── components/ # React components
│ ├── ui/ # Reusable UI components
│ ├── Auth.tsx # Authentication component
| |── AuthWrapper.tsx
│ ├── ChatUI.tsx # Chat interface
│ └── Theme-provider.tsx
└── lib/ # Utilities and actions
├── actions/ # Server actions
├── firebase.ts # Firebase configuration
└── utils.ts # Helper functions
- Sign In: Click the sign-in button and authenticate with Google
- Join Room: Enter a room name to create or join a chat room
- Chat: Send messages in real-time with other users
- Theme: Toggle between light and dark modes using the theme switcher
- Create a Firebase project at Firebase Console
- Enable Authentication with Google provider
- Create a Firestore database
- Add your Firebase config to
src/lib/firebase.ts
pnpm dev- Start development server with Turbopackpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLint
This app is configured for deployment on Replit. The project includes:
- Automatic dependency installation
- Development server configuration
- Firebase hosting setup
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request