Smart home automation app.
This repository contains the frontend and backend services for the ZenHome app, along with the pipeline configuration for CI/CD and the AWS CloudFormation template.
The backend is built with Python, while the frontend uses HTML, CSS, and TypeScript.
The CI/CD pipeline is built with Concourse and the infrastructure is deployed on AWS using CloudFormation.
Environments:
- Staging: https://stage-zenhome-portal.s3.eu-west-2.amazonaws.com/index.html
- Production: https://prod-zenhome-portal.s3.eu-west-2.amazonaws.com/index.html
To install the requirements, run the following command:
pip install -r requirements-dev.txtThis will install all requirements for the app and for testing. If you just want to install the app requirements, substitute requirements-dev.txt with requirements.txt.
Run the backend.backend.init.py file to start the app.
fastAPI automatically builds interactive OpenAPI documentation. To access it when running on your local environment, click here.
To run unit tests, run the following command:
coverage run -m pytestTo see the coverage report, run the following command:
coverage report -mNOTE: This is a work in progress. Behave tests are not fully implemented. Server needs restarting between runs as no set up/tear down of the DB is implemented
First, start the app.
Then either run the feature file directly, or right-click on the behave folder and click run.
To install the dependencies, run the following command:
npm installThis will install all the packages need to compile and test the TypeScript code.
To run the unit tests and see the coverage report, run the following command:
npm run test:frontend