This project is a real-time chat application that allows users to create accounts, join chat rooms, or start private conversations. The application uses WebSocket technology to enable instant messaging between users. It also stores all messages in a MySQL database for future reference.
- Create accounts and log in.
- Join chat rooms or initiate private conversations.
- Real-time messaging using WebSocket and the Ratchet library.
- Fully responsive design.
- All messages stored in a MySQL database.
- Frontend: HTML, CSS, Tailwind, JavaScript
- Backend: PHP, MySQL
- Real-Time Technology: WebSocket, Ratchet library
git clone https://github.com/hashirmeraj/real-time-chat-application.git
cd real-time-chat-application
- Import the
chat_application.php
file located in/database
into your MySQL database. - You can download the SQL file directly by clicking here.
- Open the
config.php
file and set your database credentials.
$host = 'localhost';
$db_name = 'chat_application';
$username = 'root';
$password = '';
Run the following command to start the WebSocket server using the Ratchet library:
php path/to/your/server.php
- Open your browser and navigate to
http://localhost/your_project_folder/
to access the application.
This project is licensed under the MIT License.