Skip to content

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

 
 
 

Contributors