GitHunt
SO

Real-time one-to-one chat app with JWT-based auth, end-to-end encryption, typing indicators, online status, and responsive UI using Tailwind CSS. Built with Socket.io and REST API architecture.

๐Ÿ’ฌ iConnect

iConnect is a real-time chat application built using the MERN stack and Socket.io. It enables users to sign up, log in, and chat instantly with others. The app includes features like auto-generated profile pictures, online/offline status indicators, and a responsive interface built with Daisy UI.


๐Ÿš€ Features

  • ๐Ÿ” Secure user authentication using JSON Web Tokens (JWT)
  • ๐Ÿ’ฌ Real-time one-to-one messaging via Socket.io
  • ๐Ÿ” End-to-end encryption (E2EE) for secure conversations
  • โŒจ๏ธ Typing indicators to enhance chat interactivity
  • ๐Ÿ–ผ๏ธ Auto-generated profile pictures of initial according to username
  • ๐ŸŸข Online/offline user status indicators
  • ๐Ÿ“ฑ Fully responsive UI using Daisy UI + Tailwind CSS
  • ๐Ÿ”„ RESTful API architecture for frontend-backend communication
  • ๐Ÿงฉ Clean and scalable folder structure with separate client and server codebases

๐Ÿ› ๏ธ Tech Stack

Frontend:

  • React
  • Daisy UI
  • Tailwind CSS

Backend:

  • Node.js
  • Express.js
  • MongoDB with Mongoose

Other Tools:

  • Socket.io (real-time communication)
  • JWT (authentication)
  • CORS and dotenv (config and cross-origin support)

๐Ÿ“ธ Screenshots

image
image
image


๐Ÿ“ฆ Installation (Local Setup)

Prerequisites

  • Node.js and npm
  • MongoDB installed and running locally or a cloud database (e.g., MongoDB Atlas)

1. Clone the Repository

git clone https://github.com/Sohail-Ali-Khwazada/Iconnect.git
cd iconnect

2. Backend Setup (/backend)

cd backend
npm install

Create a .env file in the /backend folder and add:

MONGO_URI=your_mongodb_connection_string
ACCESS_TOKEN_SECRET=your_jwt_secret
FRONTEND_URI=http://localhost:5173

Then start the backend server:

npm run dev

3. Frontend Setup (/frontend)

cd frontend
npm install

Create a .env file in the /frontend folder and add:

VITE_BACKEND_URI = "http://localhost:5000"

Then start the frontend:

npm run dev

Your React app will start on http://localhost:5173


๐ŸŒ Environment Variables

Variable Description
MONGO_URI MongoDB connection string
ACCESS_TOKEN_SECRET Secret key for signing JWTs
FRONTEND_URI Allowed CORS origin (frontend URL)

๐Ÿ“ Folder Structure

iconnect/
โ”œโ”€โ”€ frontend/         # React frontend (Vite)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ backend/         # Node.js backend
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ””โ”€โ”€ ...
โ””โ”€โ”€ README.md

Sohail-Ali-Khwazada/Iconnect | GitHunt