Skip to content

Repository files navigation

πŸ’¬ ChitChat β€” Frontend

A modern and responsive real-time chat application built with React.js, designed for fast and seamless one-to-one communication.


πŸ“Έ Screenshots

Sign Up

ChitChat Login

Login

ChitChat Sign Up

Chat Interface

ChitChat Chat Interface

Mobile View

ChitChat Mobile View


πŸ“Œ Overview

ChitChat is a real-time messaging application with a responsive interface for one-to-one communication.

The frontend focuses on a smooth messaging experience with real-time updates, image sharing, search functionality, authentication, sound controls, and responsive design.


✨ Features

  • πŸ’¬ Real-Time Messaging β€” Send and receive messages instantly.
  • πŸ–ΌοΈ Image Sharing β€” Send images directly within conversations.
  • πŸ”Š Sound Controls β€” Enable or disable chat notification sounds.
  • πŸ”Ž Search & Filtering β€” Search contacts and conversations quickly.
  • 🟒 Online / Offline Status β€” View users' current availability.
  • ⚑ Optimistic UI β€” Messages appear immediately for a smoother experience.
  • πŸ” Secure Authentication β€” JWT authentication using HttpOnly cookies.
  • 🚫 Custom 404 Page β€” Handles invalid and unavailable routes.
  • πŸ“± Responsive Design β€” Optimized for desktop and Android browsers.

πŸ› οΈ Tech Stack

Technology Purpose
React.js User interface
Vite Development and build tooling
React Router Client-side routing
Zustand State management
Axios API communication
Socket.IO Client Real-time communication
Tailwind CSS Styling
DaisyUI UI components
Motion / Framer Motion Animations
Lucide React Icons

πŸ” Authentication

ChitChat uses JWT authentication with HttpOnly cookies.

The authentication token is stored in an HttpOnly cookie, preventing client-side JavaScript from directly accessing the token.

The frontend communicates with the backend using authenticated requests and credentials.


⚑ Real-Time Communication

The application uses Socket.IO Client for real-time communication with the backend.

This enables:

  • Instant message delivery
  • Online/offline presence
  • Real-time conversation updates

πŸ”Ž Search & Filtering

ChitChat provides search functionality for both contacts and conversations.

When no matching results are found, the application displays an appropriate empty state instead of leaving the interface blank.


πŸ–ΌοΈ Image Sharing

Users can select and send images directly within conversations.

The interface supports image previews and displays uploaded images directly inside the chat.


πŸ”Š Sound Controls

Users can enable or disable chat notification sounds.

The selected sound preference is stored locally and persists between sessions.


⚑ Optimistic UI

ChitChat uses optimistic UI updates when sending messages.

Messages are displayed immediately while the request is processed by the backend, creating a faster and more responsive messaging experience.


🌐 Browser Compatibility

ChitChat currently works best on:

  • βœ… Windows / Desktop browsers
  • βœ… Android browsers
  • ⚠️ Safari β€” currently limited

Safari has stricter cross-site cookie and privacy behavior, which can affect authentication when the frontend and backend are deployed separately.


πŸš€ Getting Started

Prerequisites

Make sure you have installed:

  • Node.js
  • npm

1. Clone the repository

git clone https://github.com/yourusername/chitchat-frontend.git

2. Navigate to the project

cd chitchat-frontend

3. Install dependencies

npm install

4. Start the development server

npm run dev

The application will be available at:

http://localhost:5173

πŸ“¦ Production Build

Create an optimized production build:

npm run build

Preview the production build locally:

npm run preview

πŸ”— Backend

The frontend communicates with a separate backend that handles server-side functionality including authentication, messaging, user management, image uploads, and email services.

Backend Repository: https://github.com/YashSinghal02/ChitChatBackend


πŸ“ Project Structure

src/
β”œβ”€β”€ components/
β”œβ”€β”€ pages/
β”œβ”€β”€ hooks/
β”œβ”€β”€ store/
β”œβ”€β”€ lib/
β”œβ”€β”€ App.jsx
└── main.jsx

πŸ‘¨β€πŸ’» Author

Yash Singhal

ChitChat was built as a hands-on full-stack project to gain practical experience with modern frontend development, real-time communication, authentication, state management, responsive UI, and production deployment.


πŸ“„ License

This project is licensed under the MIT License.

Copyright Β© 2026 Yash Singhal.

About

ChitChat is a full-stack real-time messaging application built with the MERN stack and Socket.IO. It features secure JWT authentication, real-time one-to-one messaging, image sharing, online/offline presence, search and filtering, sound controls, email services, API protection, and a responsive interface designed for desktop and mobile experiences.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages