Context is an instant messaging app for schools.
Context is built upon the beautiful Laravel framework. It relies heavily upon the Laravel ecosystem to get things going.
This package primarily includes the code and install scripts. It is recommended to start a virtual server over at DigitalOcean or Linode and setup from there.
- Apache or Nginx
- PHP 7.0 or higher
- php-mbstring
- php-zip
- php-dom
- Either, MySQL, MariaDB or Postgres
- Redis
- Node.JS
- Yarn
- Composer
- Git clone this repository in your web root
- Copy
.env.example
to.env
and change its contents to match your web server setup. - Call
composer install
from the command-line to install all required PHP packages. - Call
yarn install
from the command-line to install all required Node packages. - Call
npm run prod
to compile all views, Javascript and CSS. - Call
./node_modules/.bin/laravel-echo-server init
to setup the Websockets server - Call
php artisan key:generate
,php artisan optimize
andphp artisan passport:install
to setup Laravel for operation. - Call
php artisan migrate
to setup your database for use with Context. - That's it! Have fun with your Context install.
In order for the server to be able to send push notifications, we need the Laravel Echo server to be running. The server can be started by ruunning ./node_modules/.bin/laravel-echo-server start
.
However, to run this command as the logged in user is just bad practice. So to make sure the server start with the system, we use Forever:
- Install forever by calling
yarn global add forever
- Call
forever start ./node_modules/.bin/laravel-echo-server start
- Ensure that your server either has 2GB of RAM available or has swap enabled. Webpack requires this in order to compile its assets.