From a5a8bd5ea88cf941439d90f6be40d6240afb59d8 Mon Sep 17 00:00:00 2001 From: Martin Tazl Date: Mon, 6 Jul 2026 15:41:56 +0200 Subject: [PATCH 1/4] Switch to service deamon --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 784286b..c340a40 100644 --- a/app.py +++ b/app.py @@ -159,8 +159,8 @@ if __name__ == "__main__": """) app.run( - host="0.0.0.0", + host="127.0.0.1", port=5000, debug=False, - use_reloader=True + use_reloader=False ) -- 2.47.3 From b1797bc1bb84be7c3e2287f7381d204f18789e96 Mon Sep 17 00:00:00 2001 From: Martin Tazl Date: Mon, 6 Jul 2026 13:51:29 +0000 Subject: [PATCH 2/4] changed host to 0.0.0.0 in app.py --- access_log.json | 21 +++++++++++++++++++++ app.py | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/access_log.json b/access_log.json index 48a3f53..9652746 100644 --- a/access_log.json +++ b/access_log.json @@ -579,5 +579,26 @@ "endpoint": "/", "method": "GET", "status": 200 + }, + { + "timestamp": "2026-07-06T13:14:58.113794", + "username": "mtazl", + "endpoint": "/", + "method": "GET", + "status": 200 + }, + { + "timestamp": "2026-07-06T13:15:20.071507", + "username": "mtazl", + "endpoint": "/", + "method": "GET", + "status": 200 + }, + { + "timestamp": "2026-07-06T13:15:32.538576", + "username": "mtazl", + "endpoint": "/", + "method": "GET", + "status": 200 } ] \ No newline at end of file diff --git a/app.py b/app.py index c340a40..7975f2f 100644 --- a/app.py +++ b/app.py @@ -159,7 +159,7 @@ if __name__ == "__main__": """) app.run( - host="127.0.0.1", + host="0.0.0.0", port=5000, debug=False, use_reloader=False -- 2.47.3 From 2459955acfb8015bb6a8415b6d02da8604498ea3 Mon Sep 17 00:00:00 2001 From: Martin Tazl Date: Tue, 7 Jul 2026 09:32:07 +0200 Subject: [PATCH 3/4] Updated Roadmap and Agents files --- AGENTS.md | 12 +++++++++++- ROADMAP.md | 10 +++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3c038d0..39d9b1f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,9 +24,19 @@ Primary files: - Do not add Python packages without approval. - Do not change existing APIs, route paths, data formats, or authentication behavior without approval. - Do not manually edit generated product data unless the user explicitly asks for data maintenance. +- Do not add new article-data administration features to RollCalc; propose a separate app or integration boundary instead. +- Preserve login/access logging unless the user explicitly asks to change or remove it. - Preserve the current Flask/vanilla JavaScript architecture unless the task is specifically a refactor. - Prefer documenting observed behavior over assuming intended behavior. +## Planned Direction + +- The existing admin UI/API in RollCalc is planned for removal. +- Do not expand or repair the admin area unless explicitly requested as a temporary measure. +- Keep login/access logging in RollCalc. +- Administration and maintenance of `article-data.json` should move to a separate application. +- Treat `templates/admin.html` and `/api/admin/*` expectations as legacy/transitional, not as target architecture. + ## Code Style - Python should follow PEP 8. @@ -63,7 +73,7 @@ These credentials are hardcoded and are a known risk; do not introduce more secr - Access logging writes to `access_log.json` by reading and rewriting the whole file. - The active UI logic is largely inline in `templates/roll_calculator.html`. - Several `static/*.js` files appear to be older, alternative, or integration modules. Confirm script inclusion before modifying them. -- The admin template and backend admin routes are inconsistent at the moment. +- The admin template and backend admin routes are inconsistent and scheduled for removal rather than expansion. - The disclaimer confirmation is client-side only. ## Safety Notes diff --git a/ROADMAP.md b/ROADMAP.md index 2b8adef..ad161e2 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -6,8 +6,12 @@ ## Version 0.4 -- Benutzermanagement auf sichere Methode umstellen, keine Klartext Passworte mehr -- Produktionsdaten aus SQL per Query direkt beziehen +- Benutzermanagement auf sichere Methode umstellen, keine Klartext-Passworte mehr +- Login-/Zugriffslogging beibehalten und robuster machen +- Bestehenden Admin-UI-/Admin-API-Teil aus RollCalc entfernen +- Pflege der `article-data.json` in eine eigenständige Administrations-App auslagern +- Produktionsdaten perspektivisch aus SQL per Query direkt beziehen ## Version 0.5 -- +- Schnittstelle bzw. Import-/Deployment-Prozess zwischen externer Artikelverwaltungs-App und RollCalc definieren +- Rollen-/Berechtigungskonzept für Zugriff auf RollCalc und externe Artikelverwaltung klären -- 2.47.3 From 04f6f7ba6ab54b22148db86a03415efdc7f76026 Mon Sep 17 00:00:00 2001 From: Martin Tazl Date: Tue, 7 Jul 2026 07:36:12 +0000 Subject: [PATCH 4/4] added systemd/rollcalc.system tu Repo --- systemd/rollcalc.service | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 systemd/rollcalc.service diff --git a/systemd/rollcalc.service b/systemd/rollcalc.service new file mode 100644 index 0000000..1c0838d --- /dev/null +++ b/systemd/rollcalc.service @@ -0,0 +1,19 @@ +[Unit] +Description=RollCalc Flask Application +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=www-data +Group=www-data +WorkingDirectory=/var/www/html +ExecStart=/usr/bin/python3 /var/www/html/app.py + +Restart=on-failure +RestartSec=5 + +Environment=PYTHONUNBUFFERED=1 + +[Install] +WantedBy=multi-user.target -- 2.47.3