A real-time chat application with user authentication, private chatrooms, message history, and dark/light mode toggle.
- User authentication (Email/Password & Google)
- Real-time messaging (Socket.io)
- Private chatrooms (direct messages)
- Message history (Firestore)
- Active users sidebar
- Dark mode / Light mode toggle (Material-UI)
- React (frontend)
- Material-UI (UI components)
- Firebase (Authentication, Firestore)
- Node.js + Express + Socket.io (backend)
git clone <your-repo-url>
cd Chat_Applicationcd frontend
npm install- Add your Firebase config to
src/firebase.js.
cd ../backend
npm install- Frontend:
cd frontend npm start - Backend:
cd backend node index.js
- Build the app:
npm run build
- Install Firebase CLI:
npm install -g firebase-tools
- Login and initialize:
firebase login firebase init
- Choose Hosting, set
buildas the public directory.
- Choose Hosting, set
- Deploy:
firebase deploy
- Push your backend to GitHub.
- Create a new web service on your chosen platform.
- Set the start command to
node index.js. - Update your frontend to use the deployed backend URL for Socket.io.
service cloud.firestore {
match /databases/{database}/documents {
match /private_chats/{chatId}/messages/{messageId} {
allow read, write: if request.auth != null;
}
}
}
MIT