Skip to content

DJSanch/Chat_Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Chat Application

A real-time chat application with user authentication, private chatrooms, message history, and dark/light mode toggle.

Features

  • 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)

Tech Stack

  • React (frontend)
  • Material-UI (UI components)
  • Firebase (Authentication, Firestore)
  • Node.js + Express + Socket.io (backend)

Setup

1. Clone the repository

git clone <your-repo-url>
cd Chat_Application

2. Frontend Setup

cd frontend
npm install
  • Add your Firebase config to src/firebase.js.

3. Backend Setup

cd ../backend
npm install

4. Start Development Servers

  • Frontend:
    cd frontend
    npm start
  • Backend:
    cd backend
    node index.js

Deployment

Frontend (Firebase Hosting)

  1. Build the app:
    npm run build
  2. Install Firebase CLI:
    npm install -g firebase-tools
  3. Login and initialize:
    firebase login
    firebase init
    • Choose Hosting, set build as the public directory.
  4. Deploy:
    firebase deploy

Backend (Render/Railway/Heroku)

  • 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.

Firestore Rules (Production)

service cloud.firestore {
  match /databases/{database}/documents {
    match /private_chats/{chatId}/messages/{messageId} {
      allow read, write: if request.auth != null;
    }
  }
}

License

MIT

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published