Banque Misr Automatic Irrigation System (AIS) project helps to configure plots of land to schedule automatic irrigation. Postgres database is used to store data and redis to schedule irrigation on expiry.
To build the app locally, You need to have docker and maven installed on your machine. You can find instructions on how to install it here https://docs.docker.com/install/ You can find instructions on how to install maven here https://maven.apache.org/install.html
Once you have the project on your local system
- Navigate to the folder where this readme file is, through any command line interface
- Run mvn clean package
- Run "docker-compose up" without the quotes
- The command brings up the service and dependencies required for this project to run within a docker container
The service can be accessed with the details below:
- Spring boot backend: http://localhost:8090
4 endpoints have been provided. Below is a brief description of the endpoints;
- HTTP POST http://localhost:8090/ais/api/v1/lands This endpoint add new plot of land. It takes name and geometry points to determine location and area.
- HTTP PUT http://localhost:8090/ais/api/v1/lands/{id} This endpoint updates existing plot of land data.
- HTTP GET http://localhost:8090/ais/api/v1/lands This endpoint lists all added plots of land.
- HTTP POST http://localhost:8090/ais/api/v1/lands/{id}/configurations This endpoint adds or update an existing irrigation configuration.