This project is a real-time chat application built with React and Firebase, offering secure authentication, instant messaging via Firestore, and seamless deployment with Firebase Hosting.
The design is simple, clean, and focuses on human-like chat interaction using purely frontend logicβno external AI models like ChatGPT used.
- π Google Sign-In Authentication
- π¬ Real-Time Messaging with Firestore
- π‘ Typing Indicators (Simulated)
- π Emotion-Sensitive Replies (Keyword-Based)
- π± Responsive UI (Mobile Friendly)
- π Toggle Light and Dark Mode
git clone https://github.com/Dhruvi-tech/firebase-chat-app.git
cd firebase-chat-app
npm install
- Go to Firebase Console
- Create a new project
- Enable Authentication (Google Sign-In)
- Enable Firestore Database
- Copy your Firebase config from the project settings
π IMPORTANT SECURITY STEP:
Copy the environment template and add your Firebase config:
cp .env.example .env
Then edit .env
and replace the placeholder values with your actual Firebase configuration:
VITE_FIREBASE_API_KEY=your_actual_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
.env
file to version control!
npm run dev
# or
npm start
Navigate to http://localhost:3000
in your browser.
npm run build
npm run preview
Feature | Description |
---|---|
π Typing Status | Bot typing simulation before reply |
π§ Sentiment Response | Responds with comforting or happy replies based on keywords |
π§Ύ Message Time Tags | Every message is timestamped |
π Firebase Hosting | Easy deployment and scaling |
π‘ Minimal & Modern UI | Clean chat bubble design with auto-scroll |
π Dark/Light Mode | Toggle between Dark & Light modes |
firebase-chat-app/
βββ index.html # Vite entry point
βββ vite.config.js # Vite configuration
βββ package.json # Dependencies and scripts
βββ .env.example # Template for environment variables
βββ public/ # Static assets
β βββ favicon.ico
β βββ logo192.png
β βββ manifest.json
βββ src/
β βββ App.js # Main app component
β βββ index.js # React entry point
β βββ firebase-config.js # Firebase configuration
β βββ App.css # Global styles
β βββ components/
β β βββ AppWrapper.js # App wrapper component
β β βββ Auth.js # Authentication component
β β βββ Chat.js # Chat room component
β βββ styles/
β βββ Auth.css # Auth component styles
β βββ Chat.css # Chat component styles
βββ build/ # Production build output
- Frontend: React 18, CSS3
- Build Tool: Vite (for fast development and optimized builds)
- Backend: Firebase (Authentication, Firestore)
- Hosting: Firebase Hosting
- Authentication: Google OAuth
npm install -g firebase-tools
firebase login
firebase init hosting
npm run build
firebase deploy
Contributions are welcome! Whether it's bug fixes, improvements, or new features.
- Fork this repo
- Clone your fork
- Create a new branch:
git checkout -b feature-name
- Make your changes
- Commit and push:
git commit -m "Add: [your description]" git push origin feature-name
- Open a Pull Request
Feature | Description | Level |
---|---|---|
Group Chat | Add support for group conversations | Intermediate |
Media Support | Allow users to send images | Advanced |
Dark Mode | Toggle UI themes | Beginner |
Message Deletion | Add delete functionality | Intermediate |
Typing Indicator | Show "User is typing..." | Advanced |
Currently, manual testing is used:
- Try logging in, sending and receiving messages
- Open in two tabs or devices to test real-time sync
- Check console for errors and Firebase logs
Licensed under the MIT License.
- Maintainer: @Dhruvi-tech
- Open Issues: GitHub Issues
Happy Coding & Collaborating! π
This project is beginner-friendly. All contributors are welcome, regardless of experience level. > This project is beginner-friendly. All contributors are welcome, regardless of experience level.