backend

Green Ecolution - Backend

https://github.com/green-ecolution/backend

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary

Keywords

backend go golang green-ecolution smart-city
Last synced: 6 months ago · JSON representation ·

Repository

Green Ecolution - Backend

Basic Info
  • Host: GitHub
  • Owner: green-ecolution
  • License: agpl-3.0
  • Language: Go
  • Default Branch: develop
  • Homepage: https://green-ecolution.de
  • Size: 22.5 MB
Statistics
  • Stars: 7
  • Watchers: 0
  • Forks: 2
  • Open Issues: 28
  • Releases: 58
Topics
backend go golang green-ecolution smart-city
Created over 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Code of conduct Citation Codeowners

README.md

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

bash 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:

bash 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:

bash make setup

Generate code:

bash 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

bash make infra/up

Running the Project ▶️

With live reload:

bash make run/live

Without live reload:

bash 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! 🌿

Owner

  • Name: Green Ecolution
  • Login: green-ecolution
  • Kind: organization
  • Email: info@green-ecolution.de
  • Location: Germany

Citation (CITATION.cff)

cff-version: 1.2.0
title: "Green Ecolution"
message: "If you use this software, please cite it as below."
authors:
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Cedrik"
    given-names: "Hoffmann"
    email: cedrik.hoffmann@stud.hs-flensburg.de
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Christopher"
    given-names: "Otto"
    email: christopher.otto@stud.hs-flensburg.de
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Dorien"
    given-names: "Grönwald"
    email: dorien.groenwald@stud.hs-flensburg.de
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Konstantin"
    given-names: "Müller"
    email: konstantin.mueller@stud.hs-flensburg.de
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Linus"
    given-names: "Bumann-Buzuk"
    email: linus.bumann@stud.hs-flensburg.de
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Michael"
    given-names: "Sievers"
    email: michael.sievers@stud.hs-flensburg.de
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Mohammad"
    given-names: "Assaf"
    email: mohammad.assaf@stud.hs-flensburg.de
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Niklas"
    given-names: "Hargarter"
    email: niklas.hargarter@stud.hs-flensburg.de
  - affiliation: Flensburg University of Applied Sciences
    family-names: "Sophia"
    given-names: "Anthopoilos"
    email: sophia.anthopoilos@stud.hs-flensburg.de
version: v1.2.1
date-released: 2025-04-03
url: "https://green-ecolution.de"
repository-code: "https://github.com/green-ecolution/backend"
license: AGPL-3.0-only
abstract: >-
  Smart irrigation systems are essential for optimizing water consumption, reducing labor requirements, and minimizing operational costs. This repository contains the backend of Green Ecolution, a system designed to manage urban green spaces efficiently. The backend serves as a bridge between the web interface and the database, facilitating data management for trees, tree clusters, sensors, watering plans (including route planning), vehicles, and users. Initially developed as a research project within the Applied Computer Science master’s program at the University of Applied Sciences Flensburg, the software was created in collaboration with the local green space management authority (TBZ Flensburg). While tailored to the specific needs of Flensburg, the system is designed to be adaptable for implementation in other cities, promoting scalable and data-driven urban irrigation solutions.

GitHub Events

Total
  • Create event: 86
  • Release event: 44
  • Issues event: 7
  • Delete event: 64
  • Issue comment event: 29
  • Push event: 123
  • Gollum event: 1
  • Pull request review comment event: 6
  • Pull request review event: 76
  • Pull request event: 68
  • Fork event: 1
Last Year
  • Create event: 86
  • Release event: 44
  • Issues event: 7
  • Delete event: 64
  • Issue comment event: 29
  • Push event: 123
  • Gollum event: 1
  • Pull request review comment event: 6
  • Pull request review event: 76
  • Pull request event: 68
  • Fork event: 1

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 0
  • Total pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 13 minutes
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.2
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 5
Past Year
  • Issues: 0
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 13 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.2
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 5
Top Authors
Issue Authors
  • choffmann (4)
Pull Request Authors
  • dependabot[bot] (39)
  • choffmann (3)
  • github-actions[bot] (2)
  • akatranlp (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (31) go (20) docker-compose (10) infra (10) ci (3) github-actions (3) docker (1)

Packages

  • Total packages: 3
  • Total downloads: unknown
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 37
proxy.golang.org: github.com/green-ecolution/backend/pkg/client
  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.7%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/green-ecolution/backend/pkg/plugin
  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.7%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/green-ecolution/backend
  • Versions: 37
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.7%
Dependent repos count: 5.9%
Last synced: 6 months ago

Dependencies

.github/workflows/build-and-test-on-pr.yaml actions
  • actions/checkout v4 composite
  • actions/setup-go v5 composite
.github/workflows/linter-on-pr.yaml actions
  • actions/checkout v4 composite
  • actions/setup-go v5 composite
  • golangci/golangci-lint-action v6 composite
.github/workflows/notify-on-reviewer-needed.yaml actions
  • tsickert/discord-webhook v6.0.0 composite
docker-compose.yml docker
  • mongo latest
  • mongo-express latest
go.mod go
  • github.com/KyleBanks/depth v1.2.1
  • github.com/andybalholm/brotli v1.1.0
  • github.com/caarlos0/env/v11 v11.0.1
  • github.com/dave/jennifer v1.6.0
  • github.com/davecgh/go-spew v1.1.1
  • github.com/devfeel/mapper v0.7.13
  • github.com/eclipse/paho.mqtt.golang v1.4.3
  • github.com/go-openapi/jsonpointer v0.21.0
  • github.com/go-openapi/jsonreference v0.21.0
  • github.com/go-openapi/spec v0.21.0
  • github.com/go-openapi/swag v0.23.0
  • github.com/gofiber/fiber/v2 v2.52.5
  • github.com/gofiber/swagger v1.1.0
  • github.com/golang/snappy v0.0.4
  • github.com/google/uuid v1.6.0
  • github.com/gorilla/websocket v1.5.0
  • github.com/jinzhu/copier v0.4.0
  • github.com/jmattheis/goverter v1.5.0
  • github.com/joho/godotenv v1.5.1
  • github.com/josharian/intern v1.0.0
  • github.com/klauspost/compress v1.17.9
  • github.com/mailru/easyjson v0.7.7
  • github.com/mattn/go-colorable v0.1.13
  • github.com/mattn/go-isatty v0.0.20
  • github.com/mattn/go-runewidth v0.0.15
  • github.com/montanaflynn/stats v0.7.1
  • github.com/pmezard/go-difflib v1.0.0
  • github.com/rivo/uniseg v0.4.7
  • github.com/stretchr/objx v0.5.2
  • github.com/stretchr/testify v1.9.0
  • github.com/swaggo/files/v2 v2.0.1
  • github.com/swaggo/swag v1.16.3
  • github.com/valyala/bytebufferpool v1.0.0
  • github.com/valyala/fasthttp v1.55.0
  • github.com/valyala/tcplisten v1.0.0
  • github.com/xdg-go/pbkdf2 v1.0.0
  • github.com/xdg-go/scram v1.1.2
  • github.com/xdg-go/stringprep v1.0.4
  • github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d
  • go.mongodb.org/mongo-driver v1.16.0
  • golang.org/x/crypto v0.25.0
  • golang.org/x/mod v0.18.0
  • golang.org/x/net v0.27.0
  • golang.org/x/sync v0.7.0
  • golang.org/x/sys v0.22.0
  • golang.org/x/text v0.16.0
  • golang.org/x/tools v0.22.0
  • gopkg.in/yaml.v3 v3.0.1
go.sum go
  • github.com/KyleBanks/depth v1.2.1
  • github.com/andybalholm/brotli v1.1.0
  • github.com/caarlos0/env/v11 v11.0.1
  • github.com/dave/jennifer v1.6.0
  • github.com/davecgh/go-spew v1.1.1
  • github.com/devfeel/mapper v0.7.13
  • github.com/eclipse/paho.mqtt.golang v1.4.3
  • github.com/go-openapi/jsonpointer v0.21.0
  • github.com/go-openapi/jsonreference v0.21.0
  • github.com/go-openapi/spec v0.21.0
  • github.com/go-openapi/swag v0.23.0
  • github.com/gofiber/fiber/v2 v2.52.5
  • github.com/gofiber/swagger v1.1.0
  • github.com/golang/snappy v0.0.4
  • github.com/google/go-cmp v0.6.0
  • github.com/google/uuid v1.6.0
  • github.com/gorilla/websocket v1.5.0
  • github.com/jinzhu/copier v0.4.0
  • github.com/jmattheis/goverter v1.5.0
  • github.com/joho/godotenv v1.5.1
  • github.com/josharian/intern v1.0.0
  • github.com/klauspost/compress v1.17.9
  • github.com/kr/pretty v0.3.1
  • github.com/kr/text v0.2.0
  • github.com/mailru/easyjson v0.7.7
  • github.com/mattn/go-colorable v0.1.13
  • github.com/mattn/go-isatty v0.0.16
  • github.com/mattn/go-isatty v0.0.20
  • github.com/mattn/go-runewidth v0.0.15
  • github.com/montanaflynn/stats v0.7.1
  • github.com/pmezard/go-difflib v1.0.0
  • github.com/rivo/uniseg v0.2.0
  • github.com/rivo/uniseg v0.4.7
  • github.com/rogpeppe/go-internal v1.11.0
  • github.com/stretchr/objx v0.5.2
  • github.com/stretchr/testify v1.9.0
  • github.com/swaggo/files/v2 v2.0.1
  • github.com/swaggo/swag v1.16.3
  • github.com/valyala/bytebufferpool v1.0.0
  • github.com/valyala/fasthttp v1.55.0
  • github.com/valyala/tcplisten v1.0.0
  • github.com/xdg-go/pbkdf2 v1.0.0
  • github.com/xdg-go/scram v1.1.2
  • github.com/xdg-go/stringprep v1.0.4
  • github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d
  • github.com/yuin/goldmark v1.4.13
  • go.mongodb.org/mongo-driver v1.16.0
  • golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
  • golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
  • golang.org/x/crypto v0.25.0
  • golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
  • golang.org/x/mod v0.18.0
  • golang.org/x/net v0.0.0-20190620200207-3b0461eec859
  • golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
  • golang.org/x/net v0.0.0-20220722155237-a158d28d115b
  • golang.org/x/net v0.27.0
  • golang.org/x/sync v0.0.0-20190423024810-112230192c58
  • golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
  • golang.org/x/sync v0.7.0
  • golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
  • golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
  • golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1
  • golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
  • golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
  • golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab
  • golang.org/x/sys v0.6.0
  • golang.org/x/sys v0.22.0
  • golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
  • golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
  • golang.org/x/text v0.3.0
  • golang.org/x/text v0.3.3
  • golang.org/x/text v0.3.7
  • golang.org/x/text v0.3.8
  • golang.org/x/text v0.16.0
  • golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e
  • golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
  • golang.org/x/tools v0.1.12
  • golang.org/x/tools v0.22.0
  • golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
  • gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
  • gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
  • gopkg.in/yaml.v3 v3.0.1
.github/workflows/build-and-push-develop.yaml actions
  • actions/checkout v4 composite
  • actions/setup-go v5 composite
  • actions/upload-artifact v4 composite
  • docker/build-push-action v5 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite
  • peter-evans/repository-dispatch v3 composite
.github/workflows/build-and-push-production.yaml actions
  • actions/checkout v4 composite
  • docker/build-push-action v5 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite
  • thomaseizinger/create-pull-request 1.0.0 composite
  • thomaseizinger/create-release 1.0.0 composite
.github/workflows/build-and-push-stage.yaml actions
  • actions/checkout v4 composite
  • dev-drprasad/delete-tag-and-release v1.1 composite
  • docker/build-push-action v5 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite