No description
  • Java 46.5%
  • TypeScript 30.5%
  • HTML 20%
  • CSS 3%
Find a file
Hannes 7fdbda6bf8
All checks were successful
Build and Deploy / build (push) Successful in 2m10s
Support extended account subcodes
2026-09-07 14:31:50 +00:00
.forgejo/workflows Add Forgejo deploy workflow 2026-06-26 17:28:47 +00:00
frontend Add dashboard budget mode switch 2026-09-02 14:05:57 +00:00
sql Add dashboard MVAG ansatz filter 2026-08-14 09:43:10 +00:00
src Support extended account subcodes 2026-09-07 14:31:50 +00:00
.gitignore Add Playwright URL filter smokes 2026-07-11 16:27:53 +00:00
pom.xml Automate Offener Haushalt CSV imports 2026-08-22 08:37:34 +00:00
README.md Add dashboard MVAG filter configuration 2026-08-14 08:27:24 +00:00

hrtm-benko

Jakarta EE / TomEE application with an Angular frontend for analysing Austrian municipal finance data.

PostgreSQL

The application expects a TomEE JTA datasource named jdbc/hrtmBenko.

Example TomEE resource:

<Resource id="jdbc/hrtmBenko" type="DataSource">
  JdbcDriver = org.postgresql.Driver
  JdbcUrl = jdbc:postgresql://POSTGRES_LXC:5432/hrtm_benko
  UserName = hrtm_benko
  Password = hrtm_benko
  JtaManaged = true
</Resource>

Create the first import table with:

psql "$DATABASE_URL" -f sql/001_schema.sql

Build

Backend only:

mvn clean verify

WAR with Angular frontend:

mvn clean package -Pfrontend

Documentation

The packaged WAR includes a static documentation page at /docs/. In production with the /hrtm-benko context path, it is available at /hrtm-benko/docs/ and linked from the public analysis page.

Import

The public Angular application is read-only. Imports are handled by a separate admin page:

  • Admin UI: /admin/import.html
  • Dashboard configuration UI: /admin/configuration.html
  • Budget CSV upload endpoint: POST /api/imports/csv
  • Transparenzportal budget HTML URL endpoint: POST /api/imports/budget-html
  • Municipality revenue-sharing or population XLSX upload endpoint: POST /api/imports/municipality-revenue-sharing
  • Multipart field: file
  • Optional form field: truncate=true

The HTML import accepts sourceUrl=https://transparenz.hrtm.net/council-manager/resources/finance/council/.../*.html. HTML rows are treated as fallback data: the import replaces only existing HTML fallback rows for the same municipality/year/report type/household, refuses to overwrite primary CSV rows, and later CSV imports remove matching HTML fallback rows.

Protect /admin/*, /api/imports/* and /api/admin/* at the reverse proxy. Hiding the admin pages alone is not sufficient because the endpoints write data.

Example Caddy rule:

@benko_import path /hrtm-benko/admin/* /hrtm-benko/api/imports/* /hrtm-benko/api/admin/*
basicauth @benko_import {
    admin $2a$14$REPLACE_WITH_HASHED_PASSWORD
}

Example nginx location:

location ~ ^/hrtm-benko/(admin/|api/imports/|api/admin/) {
    auth_basic "HRTM Benko Import";
    auth_basic_user_file /etc/nginx/htpasswd-hrtm-benko-import;
    proxy_pass http://tomee_backend;
}