lazyflat/web
EiSiMo f1e26b38d0 refactor: split web/app.py into routers
app.py was ~1300 lines with every route, helper, and middleware mixed
together. Split into:

- app.py (~100 lines): FastAPI bootstrap, lifespan, /health, security
  headers, Jinja filter registration, include_router calls
- common.py: shared helpers (templates, apply_client, base_context,
  _is_htmx, client_ip, require_internal, time helpers, filter helpers,
  apply-gate helpers, _kick_apply / _finish_apply_background,
  _bg_tasks, _spawn, _mask_secret, _has_running_application, BERLIN_TZ)
- routes/auth.py: /login (GET+POST), /logout
- routes/wohnungen.py: /, /partials/wohnungen, /partials/wohnung/{id},
  /flat-images/{slug}/{idx}, /actions/apply|reject|unreject|auto-apply|
  submit-forms|reset-circuit|filters|enrich-all|enrich-flat; owns
  _wohnungen_context + _wohnungen_partial_or_redirect
- routes/bewerbungen.py: /bewerbungen, /bewerbungen/{id}/report.zip
- routes/einstellungen.py: /einstellungen, /einstellungen/{section},
  /actions/profile|notifications|account/password|partner/*; owns
  VALID_SECTIONS
- routes/admin.py: /logs redirect, /admin, /admin/{section},
  /logs/export.csv, /actions/users/*|secrets; owns ADMIN_SECTIONS,
  _parse_date_range, _collect_events
- routes/internal.py: /internal/flats|heartbeat|error|secrets

Route-diff before/after is empty — all 41 routes + /static mount
preserved. No behavior changes, pure mechanical split.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 19:27:12 +02:00
..
routes refactor: split web/app.py into routers 2026-04-21 19:27:12 +02:00
static frontend: hoist inline <style> into /static/app.css, drop redundant hx-on 2026-04-21 19:19:40 +02:00
templates frontend: hoist inline <style> into /static/app.css, drop redundant hx-on 2026-04-21 19:19:40 +02:00
app.py refactor: split web/app.py into routers 2026-04-21 19:27:12 +02:00
apply_client.py perf + simpler: composite index, range-filtered protokoll, simpler profile 2026-04-21 19:16:45 +02:00
auth.py multi-user: users, per-user profiles/filters/notifications, tab UI, apply forensics 2026-04-21 10:52:41 +02:00
common.py refactor: split web/app.py into routers 2026-04-21 19:27:12 +02:00
db.py perf + simpler: composite index, range-filtered protokoll, simpler profile 2026-04-21 19:16:45 +02:00
Dockerfile lazyflat: combined alert + apply behind authenticated web UI 2026-04-21 09:51:35 +02:00
enrichment.py correctness batch: atomic writes, task refs, hmac, import-star, pickle 2026-04-21 19:14:26 +02:00
llm.py secrets tab, drop commute filter, favicon, robust error reports 2026-04-21 17:56:57 +02:00
matching.py chore: sweep dead code across all three services 2026-04-21 19:06:05 +02:00
notifications.py correctness batch: atomic writes, task refs, hmac, import-star, pickle 2026-04-21 19:14:26 +02:00
requirements.txt enrichment: drop LLM for structured info, dedup images by sha + phash 2026-04-21 15:29:55 +02:00
retention.py multi-user: users, per-user profiles/filters/notifications, tab UI, apply forensics 2026-04-21 10:52:41 +02:00
settings.py chore: sweep dead code across all three services 2026-04-21 19:06:05 +02:00