This repo is one of a few repos that make up the whole project. RoboHome-Web is the codebase that represents the frontend of the RoboHome project. The web interface provides a way to create users, add and manage devices, and an additional way to control devices. RoboHome-Web is primarily built using PHP with Laravel for MVC and routing, MySQL for the database, and Bootstrap for layout and basic mobile support.
RoboHome is a SaaS tool that also integrates with Amazon's Echo to enable control of semi-connected devices (think IR, and RF) in your house over wifi! This is done using an MQTT pub-sub network to send messages between the website or Echo to a microcontroller like the ESP8266 which has various transmitters hooked up to it (like IR and RF transmitters) to send signals to these devices. This can be used to control RF outlets with lights plugged into them, or to turn on your TV and change channels for instance.
.env.example
to .env
and populate the information needed to connect to your MQTT broker and MySQL database (under DB_CONNECTION
).composer install
from the root folder to download and install third-party PHP dependencies.php artisan key:generate
from the root folder. This will populate the APP_KEY
field in the .env
file.php artisan migrate
from the root folder. This will setup the database using the connection settings defined in the .env
file.php artisan passport:install
from the root folder and save the output to a safe location. The output will be needed later to help configure 3rd parties (like Amazon) to authenticate with RoboHome.php artisan serve
from the root folder to start the website. This command will print to the terminal the local URL where you can visit the website in your browser.This project uses Docker Compose to help easily emulate a test environment for rapid development and testing. This container has the PHP, MySQL, and phpMyAdmin services.
./StartDockerAndRunTests.sh
. This will create a backup of the .env
file, download and start all the containers, configure Laravel, run all the tests, and then restore the .env
file.
http://localhost
to view the website. To access phpMyAdmin, navigate to http://localhost:8183
and login with the following credentials; username: root
, password: password
(these credentials come from .env.docker
if you want to change them).web.sh
like ./web.sh composer install
.Contributions are always welcome! Please fork this repo and open a pull request from a new branch with your code or feel free to make an issue. All pull requests will need to be reviewed and pass automated checks. If feedback is given on a pull request, please submit updates to the original pull request in the form of fixup! commits which will later be squashed before the pull request is merged.
For more information, consult the contributing guidelines.
This repo supports the principles of Bob Martin's Clean Code.
.env
file:
APP_ENV
to production
APP_DEBUG
to false