backend

command module
v1.3.0-nightly.20251019 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2025 License: AGPL-3.0 Imports: 33 Imported by: 0

README ยถ

GitHub Release Go Reference Code coverage License Maintained yes

Green Ecolution Backend ๐ŸŒฟ

Smart irrigation is essential to saving water, reducing staff workload, and cutting costs. This project provides the backend for Green Ecolution โ€” a digital system to manage urban greenery efficiently.

๐Ÿ‘‰ For the frontend implementation, visit the Green Ecolution Frontend.

The backend acts as the interface between the website and the database, managing data about:

  • ๐ŸŒณ Trees
  • ๐ŸŒฟ Tree clusters
  • ๐Ÿ“ก Sensors
  • ๐Ÿ—บ๏ธย Watering plans
  • ๐Ÿš› Vehicles
  • ๐Ÿ‘ค Users

In the current setup, sensors are connected to a microcontroller with an LoRaWAN modules. Sensor data is transmitted via LoRaWAN to an MQTT gateway, then forwarded to the server for processing.

Developed in collaboration with TBZ Flensburg, this software is designed to be adaptable for other cities. It originated as a research project within the Applied Computer Science Master's program at the University of Applied Sciences Flensburg.

For further information, visit:

Quick Start Guide ๐Ÿš€

To quickly run the application locally:

  1. Clone this repository
  2. Copy the env.example to .env
  3. Build and launch the application containers
make run/docker

make will download a pbf file of the open street map geographical tileset from Germany Schleswig-Holstein and place it in a directory where vahalla can access it via docker. If you don't want to download this part or want to load a different location into valhalla, you can download it yourself and place the file in .docker/infra/valhalla/custom_files/<file-osm.pbf>. After that you can start the docker services with the backend using this command:

docker compose -f compose.yaml -f compose.app.yaml up -d --build

By default, all services such as auth, routing and s3 are enabled and running with docker, except mqtt. This service is currently disabled by default and must be configured manually.

๐Ÿ‘‰ Once the service is up and running, the backend is available at: http://localhost:3000

The other services can be accessed via the following URLs:

Service URL
Minio http://minio.localhost:3000
S3 http://s3.localhost:3000
Keycloak http://auth.localhost:3000
Valhalla http://valhalla.localhost:3000
Vroom http://vroom.localhost:3000
pgadmin http://pgadmin.localhost:3000
reverse-proxy http://traefik.localhost:3000
backend http://localhost:3000

Technologies Used โš™๏ธ

Local Development Setup ๐Ÿ’ป

For a detailed step-by-step guide on setting up your local development environment, refer to the Local Development Wiki ๐Ÿ“–.

Prerequisites
Initial Setup โš™๏ธ

Install required tools:

make setup

Generate code:

make generate

Start the infrastructure services using Docker Compose. This setup includes:

  • a local PostgreSQL database,
  • routing services such as Valhalla, ORS and VROOM for route and vehicle scheduling calculations
make infra/up
Running the Project โ–ถ๏ธ

With live reload:

make run/live

Without live reload:

make run

๐Ÿ‘‰ Once the service is up and running, you can access it at: http://localhost:3000

How to Contribute ๐Ÿค

We welcome contributions! Please follow these guidelines:

  1. Fork this repository.
  2. Create a topic branch off develop.
  3. Commit your changes.
  4. Push your branch to your fork.
  5. Open a Pull Request.

This project follows:

Thank you for helping us improve Green Ecolution! ๐ŸŒฟ

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
internal
worker
Package worker implements an event management system for publishing and subscribing to events.
Package worker implements an event management system for publishing and subscribing to events.
pkg
client module
plugin module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL