Skip to content

YashKaliaS/chatapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README for Chat Application

Chat Application

This chat application is built using HTML, PHP, and JavaScript. It allows users to communicate in real-time through a web-based interface. Below is an overview of the key components and their functionalities.

Features

  • Real-time messaging
  • User authentication
  • Message storage
  • Simple and intuitive UI

Technologies Used

  • HTML: For the structure of the web pages.
  • PHP: For server-side scripting and handling backend logic.
  • JavaScript: For client-side interactions and real-time updates.

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/chat-app.git
  2. Navigate to the project directory:
    cd chat-app
  3. Set up the database:
    • Create a MySQL database.
    • Import the database.sql file to set up the necessary tables.
  4. Configure the database connection:
    • Update the database configuration in config.php with your database details.

Usage

  1. Start the server:
    • Use a local server like XAMPP or WAMP to host the application.
    • Place the project files in the htdocs (for XAMPP) or www (for WAMP) directory.
  2. Access the application:
    • Open your web browser and go to http://localhost/chat-app.

Directory Structure

chat-app/
│
├── index.html          # Main landing page
├── login.php           # Login functionality
├── register.php        # Registration functionality
├── chat.php            # Main chat interface
├── send_message.php    # Backend script to handle sending messages
├── get_messages.php    # Backend script to fetch messages
├── config.php          # Database configuration
├── styles.css          # CSS styles
├── script.js           # JavaScript for real-time updates
└── database.sql        # SQL script to set up the database

Key Components

  1. HTML (index.html, chat.html, login.html, register.html):

    • Structure the web pages.
    • Includes forms for user login and registration.
  2. PHP (login.php, register.php, send_message.php, get_messages.php):

    • Handles user authentication.
    • Processes message sending and retrieval.
    • Connects to the database to store and fetch messages.
  3. JavaScript (script.js):

    • Handles real-time message updates using AJAX.
    • Manages the dynamic behavior of the chat interface.

Example Workflow

  1. User Registration and Login:

    • Users can register with a username and password.
    • Registered users can log in to access the chat interface.
  2. Sending and Receiving Messages:

    • Logged-in users can send messages.
    • Messages are stored in the database and retrieved in real-time using AJAX.

Contribution

  1. Fork the repository
  2. Create a new branch
    git checkout -b feature-name
  3. Make your changes
  4. Commit your changes
    git commit -m "Description of changes"
  5. Push to the branch
    git push origin feature-name
  6. Create a pull request

Acknowledgments

  • Thanks to the contributors and the open-source community.

Feel free to contribute and improve the application. Your feedback is appreciated!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published