Skip to content

abelgeorgeantony/confab

Repository files navigation

Confab – Real-time Private Messaging

A real-time chat application built with PHP, MySQL, and Ratchet WebSocket as the backend, and HTML, CSS, and JavaScript as the frontend.

This project is being developed as a Mini Project for the 5th Semester BCA program at Mahatma Gandhi University.


Setup on a New Device

The instructions are for linux based systems and for making the application available on a local network.

1. Clone the Project

git clone https://github.com/abelgeorgeantony/confab.git

2. Requirements

a). Install dependencies:

  • apt install:

    • php
    • php-mysql
    • mariadb-server
    • composer
    • caddy
  • composer require(php libraries must be installed in backend/):

    • cboden/ratchet
    • phpmailer/phpmailer
    • vlucas/phpdotenv
      (Running "composer install" in backend/ would be sufficient)

b). Create a new MySQL database confab.

c). Import the database schema:

mysql -u root -p confab < backend/schema.sql

d). Create a .env file in the backend/ directory and add your database and SMTP credentials. Use the following template:

 DB_HOST=127.0.0.1
 DB_USER=root
 DB_PASS=
 DB_NAME=confab

 SMTP_HOST=smtp.gmail.com
 SMTP_USER=your-email@gmail.com
 SMTP_PASS=your-app-password
 SMTP_PORT=587

Starting the Servers

Before starting, make sure MySQL (mysqld) is running.

To start all the necessary servers (Caddy, PHP, WebSocket), simply run the startup script from the project root:

./start-server.sh

The script will automatically handle prerequisite checks, update network configurations, and launch all servers in the background. It will also provide you with the URL to access the application.

Once the server is started you will find a logs/ directory where you can find the logs of the different servers.

Stopping the Servers

To stop all the running servers, use the stop script:

./stop-server.sh

Visit docs/ for more information.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors