Skip to content

sidd190/Chatty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

💬 Chatty

A simple full-stack chat application built using the MERN stack (MongoDB, Express, React, Node.js) with real-time messaging support via Socket.IO. Chatty allows users to send and receive individual (1-on-1) messages instantly in an open system for all authenticated users.


🚀 Features

  • 🔌 Real-time messaging with Socket.IO
  • 🧠 Full-stack MERN architecture
  • 📄 Simple user interface built with React

🛠️ Tech Stack

Frontend

  • React
  • Socket.IO Client
  • Axios

Backend

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

📦 Installation

1. Clone the repository

git clone https://github.com/your-username/chatty.git
cd chatty

2. Backend Setup

cd server
npm install

Create a .env file in the server directory with the following:

PORT=5000
MONGO_URI=your_mongo_db_connection_string

Run the backend:

npm run dev

3. Frontend Setup

cd ../client
npm install

Start the frontend:

npm start

🔌 Socket.IO Integration

  • A Socket.IO server runs alongside the Express app.
  • Clients connect via Socket.IO on page load.
  • Each user can send a message to another user by name (or ID).
  • Server emits the message back to both the sender and the receiver in real-time.

🧪 Example Usage

  1. Open two browser tabs or devices.
  2. Type your user name (e.g., "Alice" and "Bob").
  3. Start sending messages to each other.
  4. Messages show up in real time without needing a refresh.

🗂️ Project Structure

chatty/
├── client/               # React frontend
│   └── src/
│       ├── components/
│       └── App.js
├── server/               # Express + Socket.IO backend
│   ├── models/
│   ├── routes/
│   └── server.js
├── README.md

📄 License

MIT License © 2025 — \sidd190


About

Basic Full stack chat app with individual chats open to all. Socket.io used.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors