Skip to content

mufeed-dev/DotChat-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DotChat App

DotChat is a full-stack, real-time chat application designed to provide seamless and interactive communication. Built with a modern tech stack including React, Node.js, Express, MongoDB, and Socket.io, it offers real-time messaging, user authentication, and profile customization.

Features

  • Real-Time Messaging: Instant message delivery and reception using WebSockets (Socket.io).
  • User Authentication: Secure signup and login processes using JWT (JSON Web Tokens) and bcrypt for password hashing.
  • Online Status Indicators: See which users are currently online in real-time.
  • Profile Management: Customize user profiles, including uploading profile pictures (integrated with Cloudinary).
  • Responsive Design: A beautiful, responsive user interface styled with Tailwind CSS, ensuring a great experience on both desktop and mobile devices.

Tech Stack

Frontend

  • Framework: React 19 with Vite
  • Routing: React Router DOM
  • State Management: React Context API
  • Styling: Tailwind CSS v4
  • Real-time Communication: Socket.io-client
  • HTTP Client: Axios
  • Notifications: React Hot Toast

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB (via Mongoose)
  • Real-time Communication: Socket.io
  • Authentication: JWT (JSON Web Tokens) & bcryptjs
  • Media Storage: Cloudinary (for profile pictures and media)
  • Environment Management: dotenv

Prerequisites

Before you begin, ensure you have the following installed:

Installation & Setup

  1. Clone the repository (if applicable) or navigate to the project directory:

    cd "DotChat App"
  2. Setup the Backend (Server):

    • Navigate to the server directory:
      cd server
    • Install dependencies:
      npm install
    • Create a .env file in the server directory and add the following variables:
      PORT=5000
      MONGO_URI=your_mongodb_connection_string
      JWT_SECRET=your_jwt_secret_key
      FRONTEND_URL=http://localhost:5173
      CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
      CLOUDINARY_API_KEY=your_cloudinary_api_key
      CLOUDINARY_API_SECRET=your_cloudinary_api_secret
    • Start the development server:
      npm run server
  3. Setup the Frontend (Client):

    • Open a new terminal and navigate to the client directory:
      cd client
    • Install dependencies:
      npm install
    • Create a .env file in the client directory and add the following variables:
      VITE_BACKEND_URL=http://localhost:5000
    • Start the Vite development server:
      npm run dev
  4. Access the Application: Open your browser and navigate to http://localhost:5173.

Folder Structure

DotChat App/
β”œβ”€β”€ client/                 # React frontend application
β”‚   β”œβ”€β”€ public/             # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable React components
β”‚   β”‚   β”œβ”€β”€ pages/          # Application pages (Home, Login, Profile)
β”‚   β”‚   β”œβ”€β”€ App.jsx         # Main application component
β”‚   β”‚   └── main.jsx        # Entry point
β”‚   β”œβ”€β”€ context/            # React Context for global state (Auth, etc.)
β”‚   β”œβ”€β”€ package.json        # Frontend dependencies
β”‚   └── vite.config.js      # Vite configuration
β”‚
└── server/                 # Node.js/Express backend
    β”œβ”€β”€ controllers/        # Route controllers (Auth, Messages)
    β”œβ”€β”€ lib/                # Utilities and database connection
    β”œβ”€β”€ middleware/         # Express middleware (Auth protection)
    β”œβ”€β”€ models/             # Mongoose database schemas (User, Message)
    β”œβ”€β”€ routes/             # API routes
    β”œβ”€β”€ server.js           # Main server entry point & Socket.io setup
    └── package.json        # Backend dependencies

About

πŸ’¬A full-stack real-time chat application built with React, Express, and Socket.io featuring user authentication, instant messaging, and cloud image uploads.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages