This repository contains the backend services for the agridata.ch platform, built with Quarkus. It provides APIs, authentication integration, and data persistence capabilities.
Local development is powered by Quarkus DevServices, which automatically starts required services like PostgreSQL and Keycloak in Docker containers.
To launch the application in development mode:
mvn quarkus:dev -Dquarkus.profile=localThis will automatically spin up:
- A PostgreSQL database
- A Keycloak instance with the agate_realm.json imported
Access the Quarkus Developer UI here:
http://localhost:8060/q/dev-ui
git config --local core.hooksPath hooks && chmod +x hooks/*- Database Name:
agridata - Username:
admin - Password:
secret - Data Persistence Path:
.local-dev/postgres-volume
- Realm:
agate - Initial Import:
agate_realm.json - Admin Credentials:
- Username:
admin - Password:
admin
- Username:
- Client:
- Id:
agridata-ui - Password:
secret
- Id:
These are predefined users in the local agate realm:
| Username | Password | Roles | KT_ID_P | loginid |
|---|---|---|---|---|
| producer-a | secret | agridata.ch.Agridata_Einwilliger | FLXXA0001 | 3477580 |
| producer-b | secret | agridata.ch.Agridata_Einwilliger | FLXXB0001 | 3477581 |
| producer-b-3 | secret | agridata.ch.Agridata_Einwilliger | FLXXB0003 | 3477582 |
| producer-c | secret | agridata.ch.Agridata_Einwilliger | FLXXC0001 | 3477583 |
| producer-d | secret | agridata.ch.Agridata_Einwilliger | FLXXD0001 | 3477584 |
| producer-e | secret | agridata.ch.Agridata_Einwilliger | - | 3477585 |
| Username | Password | Roles | UID | loginid |
|---|---|---|---|---|
| provider | secret | agridata.ch.Agridata_Datenanbieters | CHE146680598 (BLW) | 3477553 |
| Username | Password | Roles | UID | loginid |
|---|---|---|---|---|
| consumer | secret | agridata.ch.Agridata_Datenbezueger | CHE101708094 (Bio Suisse) | 20154600 |
| consumer-ip-suisse | secret | agridata.ch.Agridata_Datenbezueger | CHE110013660 (IP Suisse) | 900000 |
| consumer-blv-1 | secret | agridata.ch.Agridata_Datenbezueger | CHE403244345 (BLV) | 3477588 |
| consumer-blv-2 | secret | agridata.ch.Agridata_Datenbezueger | CHE403244345 (BLV) | 3477589 |
| consumer-blv-without-uid | secret | agridata.ch.Agridata_Datenbezueger | - | 3477590 |
| Username | Password | Roles | loginid |
|---|---|---|---|
| admin | secret | agridata.ch.Agridata_Admin | 3477554 |
| support | secret | agridata.ch.Agridata_Support | 3477555 |
| guest | secret | - | - |
User data cannot easily be exported from the Docker container, so manual steps are required to preserve and update user configuration:
- Backup the
userssection inagate_realm.json. - Log into the Keycloak admin console.
- Go to Realm Settings > Action > Partial Export.
- Replace
agridata-ui.secretin the exported file withsecret. - Re-add the
userssection from your backup. - Replace the original
agate_realm.jsonwith the updated version.