Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

anilgummula/ChitChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

πŸ“± NetVork - Real-time Chat Application

ChitChat is a MERN stack application that allows users to connect, add friends, and chat in real time.
The backend is built with Node.js, Express, and MongoDB, while the frontend uses React.


πŸš€ Features

  • πŸ”‘ User Authentication (Login/Register with JWT)
  • πŸ‘₯ Manage Connections (Add/Remove Friends)
  • 🌐 View Networks (List of all registered users)
  • πŸ’¬ Real-time Messaging (via Socket.io)
  • πŸ“‚ Modular Code Structure (Controllers, Routes, Middleware, Models)
  • 🎨 Modern UI built with React

πŸ—οΈ Tech Stack

Frontend

  • React.js
  • TailwindCSS (for styling)

Backend

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • JWT Authentication
  • Socket.io (for real-time communication)

πŸ“‚ Project Structure

backend/
│── config/
β”‚ └── db.js # Database connection
β”‚
│── controllers/
β”‚ └── userController.js # Connections & networks logic
β”‚
│── middlewares/
β”‚ └── auth.js # Authentication middleware
β”‚
│── models/
β”‚ β”œβ”€β”€ user.js # User schema
β”‚ └── connections.js # Connections schema
β”‚
│── routes/
β”‚ β”œβ”€β”€ auth.route.js # Auth routes
β”‚ └── user.route.js # User routes
β”‚
│── index.js # Entry point
│── package.json
β”‚
frontend/
│── src/
β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”œβ”€β”€ AddFriend.jsx # Example React component
β”‚ β”‚ └── ...
β”‚ β”œβ”€β”€ App.jsx
β”‚ └── ...
│── package.json

βš™οΈ Installation & Setup

1. Clone the repository

git clone https://github.com/anilgummula/ChitChat/.git
cd ChitChat

2. Setup Backend

cd backend
npm install

Create a .env file inside backend/ with:

MONGO_URI=your-mongodb-uri
JWT_SECRET=your-secret-key
PORT=5000

Run the backend:

npx nodemon

3. Setup Frontend

cd frontend
npm install
npm run dev

πŸ“‘ API Endpoints

Auth Routes (/auth)

  • POST /auth/register β†’ Register a new user
  • POST /auth/login β†’ Login user

User Routes (/user)

  • GET /user/networks β†’ Get all users (requires authentication)
  • POST /user/connections β†’ Add or get connections (requires authentication)

πŸ“œ License

This project is licensed under the MIT License.

About

this is a simple chating page

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /