This repo contains the webapp code used on the serverside for the WiFiCom project. This code is open source and free for use by anyone.
These docs are incomplete at this time, but enough information is given to get you started if you're familiar with Laravel.
- Clone the repo
- Deploy using a php stack such as wamp/lmap/xampp, you can also use Laravel Forge or Ploi.io to automatically build out the required infrastructure and security.
- Run the following command to copy the .env.example file to .env:
cp .env.example .env
- Run the following command to install composer dependencies:
composer install --no-dev
- Run the following command to install npm dependencies:
npm install && npm run build
- Generate a new App Key
php artisan key:generate
- Ensure you have a database ready to go with a user and password
- Edit the .env file and add your database credentials
- Run the following command to migrate the database:
php artisan migrate --force
- Run the following command to seed the database:
php artisan db:seed
- Pay attention to the output here, your initial admin user and login is provided, you'll need these later
-
Populate the remaining ENV variables
- You'll need the following
- APP_NAME=WiFiCom
- ASSET_URL=https://yoursiteurl.com
- APP_URL=https://yoursiteurl.com
- an email server
- a digitalocean spaces bucket
- MQTT server setup
- MQTT_AUTH_USERNAME=admin
- MQTT_AUTH_PASSWORD=PASSWORD_FROM_EARLIER_IN_CLI_OUTPUT
- Sentry DSN (Optional, used to track errors)
- You'll need the following
-
You'll need to setup a cron job for the scheduler to run every minute
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
- You'll need to setup a daemon for the mqtt:listener to run eternally
- Use Supervisor to start the daemon
cd /path-to-your-project && php artisan mqtt:listener
- Use Supervisor to start the daemon
- Ensure you can access the site
- Create an account (will require email verification)
- Test out the features, report back with any issues on this Repo