No description
  • Java 46.9%
  • TypeScript 30.3%
  • HTML 17.3%
  • CSS 5.5%
Find a file
Hannes 3654599d72
All checks were successful
Build and Deploy / build (push) Successful in 49s
Show operating result per analysis column
2026-07-10 14:24:24 +00:00
.forgejo/workflows Add Forgejo deploy workflow 2026-06-26 17:28:47 +00:00
frontend Show operating result per analysis column 2026-07-10 14:24:24 +00:00
sql Add municipal finance CSV import 2026-06-26 15:24:02 +00:00
src Add public documentation page 2026-07-10 12:12:37 +00:00
.gitignore Add TomEE CSV upload app 2026-06-26 15:36:58 +00:00
pom.xml Add version endpoint 2026-07-03 10:42:44 +00:00
README.md Add public documentation page 2026-07-10 12:12:37 +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. CSV imports are handled by a separate admin page:

  • Admin UI: /admin/import.html
  • Upload endpoint: POST /api/imports/csv
  • Multipart field: file
  • Optional form field: truncate=true

Protect both /admin/* and /api/imports/* at the reverse proxy. Hiding the admin page alone is not sufficient because the upload endpoint writes data.

Example Caddy rule:

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

Example nginx location:

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