Skip to content
Dark-WitcherPublic

About

A fast and easy to make PHP and Ajax Chat System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

WebChat

A simple web-based chat application built with PHP, MySQL, HTML, CSS, and AJAX.

This project was originally created as a small PHP/AJAX web development project and has been revisited and updated as part of a review and modernization of older personal projects.

Features

  • Simple web-based chat interface
  • PHP backend
  • MySQL/MariaDB database
  • AJAX-based message handling
  • Environment-based database configuration
  • Lightweight project structure

Requirements

  • PHP 8.x
  • MySQL or MariaDB
  • A web server capable of running PHP
  • PHP mysqli extension

Configuration

Database credentials are loaded from a .env file.

Create a .env file in the project root based on .env.example:

DB_HOST=db
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=your_database

Do not commit .env to version control.

Database

Import the provided database schema into your MySQL/MariaDB database before running the application.

For example:

mysql -u your_username -p your_database < chat.sql

Then configure the database credentials in .env.

Running Locally

Configure your web server so that the project directory is served as the document root.

For example:

http://localhost/

The project can also be run through a local Docker-based development environment.

Project Structure

.
├── chat.php          # Chat message handling
├── db.php            # Database connection
├── index.php         # Main application page
├── style.css         # Application styling
├── chat.sql          # Database schema
├── .env.example      # Example environment configuration
└── LICENSE           # Project license

Development

This project is primarily a small PHP development and learning project. It is not intended to be a production-ready chat platform.

Before deploying it publicly, additional work should be done around authentication, authorization, input validation, output escaping, CSRF protection, rate limiting, database security, and general application hardening.

History

Originally developed as an early PHP/AJAX web development project and later revisited as part of a broader review and modernization of older personal projects.

License

This project is licensed under the GNU General Public License v3.0.

See the LICENSE file for the complete license text.

About

A fast and easy to make PHP and Ajax Chat System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages