Skip to content

Debrup-Chatterjee/Demo-Chatting-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💬 Demo-Chatting-App

A simple real-time chatting application built with React (frontend) and Node.js (backend).
This project has been extended to use MySQL (via PHP scripts) for storing chat rooms and messages.

Users can:

  • Join existing chat rooms.
  • Create new chat rooms.
  • View all past messages in a room upon joining.
  • Exchange messages in real time.

🚀 Features

🔹 Create and join chat rooms.
🔹 Persistent message storage using MySQL.
🔹 API calls to PHP endpoints for message retrieval and saving.
🔹 Node.js backend and React frontend for seamless chat experience.


🛠️ Installation

1. Clone the Repository

git clone https://github.com/your-username/Demo-Chatting-App.git
cd Demo-Chatting-App 

2. Install Required Software

  • XAMPP (for Apache + MySQL)

  • Node.js (for backend + frontend servers)

3. Setup Database

  1. Start XAMPP and launch Apache + MySQL.

  2. Open phpMyAdmin and create a database named:

chat_db

3.You can stop Apache and MySQL after successfully creating the database.

4. Configure PHP Files

  1. Inside xampp/htdocs, create a folder named:
chat-app
  1. Move the following files from the cloned project folder into it:
  • index.php

  • save_message.php

  • fetch_messages.php

Path should look like:

xampp/htdocs/chat-app/
  ├── index.php
  ├── save_message.php
  └── fetch_messages.php

5. Install Dependencies

From the project root (Demo-Chatting-App), run:

Backend (Node.js server):

cd server
npm install

Frontend (React client):

cd ../client
npm install

▶️ Running the Project

  1. Start Apache and MySQL servers in XAMPP.

  2. Open the project in VS Code (or your editor of choice).

Start the backend server:

cd server
node index.js

Start the frontend (React) server:

cd client
npm start
  1. The app will automatically open in your browser. 🎉

📂 Project Structure

Demo-Chatting-App/
│
├── client/          # React frontend
├── server/          # Node.js backend
├── chat-app/        # PHP scripts (to be placed inside xampp/htdocs/)
│   ├── index.php
│   ├── save_message.php
│   └── fetch_messages.php
└── README.md

📌 Notes

Make sure XAMPP servers are running before using the app.

All messages and chat rooms are stored in MySQL (chat_db).

PHP scripts act as API endpoints for storing and fetching chat data.


🙏 Acknowledgment

The base project (React + Node.js chat application) was originally built by my college teammate. I contributed by extending the project to integrate MySQL database support through PHP APIs (index.php, save_message.php, fetch_messages.php).


📜 License

This project is open-source. You’re free to use, modify, and distribute it.

About

A basic real time chatting app developed for learning purpose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published