Skip to content

This is a real-time chat application built with PHP, utilizing Medoo for database interactions and Pusher for real-time capabilities.

Notifications You must be signed in to change notification settings

code3-dev/php-chat

Repository files navigation

Modern PHP Chat Room

This is a real-time chat application built with PHP, utilizing Medoo for database interactions and Pusher for real-time capabilities.

Features

  • User Authentication: Register and log in with a username and password.
  • Real-Time Messaging: Messages are sent and received in real time using Pusher.
  • Online Status: Shows users who are currently online.
  • Typing Indicators: Displays when a user is typing a message.
  • Responsive Design: Accessible on various devices with RTL support for Persian language.

Configuration

Database Configuration (/app/config/app.php)

  • Database Type: MySQL
  • Database Name: chatplus
  • Host: localhost
  • Charset: utf8mb4

Make sure to set your database credentials:

'database' => [
    'database_type' => 'mysql',
    'database_name' => 'chatplus',
    'server' => 'localhost',
    'username' => 'your_username',
    'password' => 'your_password',
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'port' => 3306
],

Pusher Configuration

Add your Pusher credentials in the configuration file:

'pusher' => [
    'app_id' => 'your_app_id',
    'key' => 'your_key',
    'secret' => 'your_secret',
    'cluster' => 'your_cluster', // e.g., 'eu'
    'use_tls' => true
]

Application Settings

  • Name: چت روم مدرن
  • Version: 1.0.0
  • Timezone: Asia/Tehran
  • Locale: fa_IR
  • Debug Mode: Enabled

Import Database

Import the database structure, use the db/db.sql file.

This will create the necessary tables and relationships in your MySQL database.

Installation

  1. Clone the repository.
  2. Navigate to the directory.
  3. Install the dependencies using Composer:
    composer install
  4. Configure environment settings in /app/config/app.php.

Starting the Application

  1. Ensure your Apache server or equivalent is running.
  2. Open index.php in your browser.
  3. Register or log in with your credentials.

For further details, refer to the file comments and documentation.

About

This is a real-time chat application built with PHP, utilizing Medoo for database interactions and Pusher for real-time capabilities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages