Skip to content

ankitjain28may/openchat

Repository files navigation

OpenChat

Join the chat at https://gitter.im/ankitjain28may/openchat Scrutinizer Code Quality Build Status Coverage Status Code Climate Issue Count Codacy Badge GitPitch Open Source Helpers

OpenChat is an Open Source messaging platform where people can send messages to anyone registered to this platform.

How to Setup

Setting up OpenChat on your local machine is really easy. Follow this guide to setup your development machine.

Requirements :

  1. PHP > 5.6
  2. MySQL
  3. Composer
  4. npm
  5. git
  6. Supervisor

Installation :

  1. Get the source code on your machine via git.

    git clone https://github.com/ankitjain28may/openchat.git
  2. Install php and js dependencies

    cd openchat
    composer install
    npm install
  3. Rename file .env.example to .env and change credentials.

  4. Create an empty sql database and run import database.

    create database openchat;
    mysql -u[user] -p[password] [database name] < path\openchat\sql\openchat.sql
  5. open .env file and set APP_URL to your external_ip address at port 8888

  6. Open a message.js file stored at public\assests\js and set external_ip

    var conn = new WebSocket("ws://external_ip:8080");
  7. Create a log file inside the root folder.

    touch openchat_supervisor.log
  8. Open Supervisor\devserver.conf and set external_ip address at port 8888

  9. Add the conf files of the Supervisor folder to Supervisor by running following commands in terminal

    sudo supervisorctl reread
    sudo supervisorctl update
    sudo supervisorctl start devserver
    sudo supervisorctl start server

That's it, now start development at http://external_ip:8888 in your browser

Contribution guidelines

If you are interested in contributing to OpenChat, Open Issues, send PR and Don't forget to star the repo.

Feel free to code and contribute