Commit Graph

9 Commits

Author SHA1 Message Date
Claude
a9666ff96c Workstream 2: Datenbankschema & Migrationen (Phase 1)
Vollständiges Drizzle-Schema (alle Tabellen/Enums/Indizes aus Spec §6):
brigades, users, merkmale(+optionen), vehicle_templates(+merkmale,+aliasse),
equipment_categories(+merkmale), vehicles, equipment, merkmal_values (EAV mit
typisierten Spalten + 4 Indizes), login_attempts, audit_log. Einzige initiale
Migration 0000 (idempotent: enum-DO-Blöcke, IF NOT EXISTS), scripts/migrate.ts,
db:* npm-Scripts.

Verifiziert (offline): tsc --noEmit OK; drizzle-kit check 'Everything's fine';
Migration 7 CREATE TYPE / 14 CREATE TABLE / 17 CREATE INDEX / 32 IF NOT EXISTS.
DEFERRED (kein Postgres im Sandbox — Ursache des vorherigen Stalls): live
db:migrate und DB-abhängige Schema-Tests; laufen in CI/Deploy mit Postgres.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 08:58:56 +02:00
Matthias Hochmeister
d7c74aa041 Fix BLOCKING review findings: /login route + CSP header (WS1)
Behebt zwei BLOCKING-Befunde aus dem Review zu "Projekt-Fundament &
Design-System":

1. Route-Namens-Mismatch (Default-deny-Kerngarantie): Login-Seite lag unter
   (auth)/anmelden, der gesamte downstream Auth-/Gating-Vertrag im Plan
   erwartet aber /login (NextAuth pages.signIn, requireSession-Redirect,
   PUBLIC_ALLOWLIST, Middleware-Matcher, auth-gating.spec toHaveURL(/\/login/),
   Datei-Layout (auth)/login/...). Verzeichnis nach (auth)/login umbenannt;
   /login als kanonischen Pfad im Guard-Slot-Kommentar von (app)/layout.tsx
   dokumentiert, damit Workstream 3 dieselbe Route verwendet.

2. Fehlende Content-Security-Policy in SECURITY_HEADERS: Plan Z.1314 fordert
   CSP mit default-src 'self', img-src 'self' data: blob:, worker-src
   'self' blob:, frame-ancestors 'none', form-action 'self'; die
   security-headers.spec prueft frame-ancestors 'none'. CSP ergaenzt, in
   Produktion strikt, im Dev-Modus gelockerte script-src/connect-src
   (unsafe-eval + ws:) fuer Next.js-HMR via NODE_ENV.

Verifikation: tsc --noEmit, next lint, next build (Route /login, kein
/anmelden) gruen; CSP zur Laufzeit fuer prod/dev geprueft.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 17:10:32 +02:00
Matthias Hochmeister
4707844dbc Workstream 1: Projekt-Fundament & Design-System (Phase 0)
Greenfield-Next.js-15-App-Router-Gerüst (TS strict) mit:
- Route-Groups (auth)/(app) inkl. loading/error/not-found je Group;
  Guard-Slot-Kommentar im (app)/layout.tsx (vom Auth-WS zu füllen).
- "Amtlich"/Netzknoten-Designsystem: Tailwind-Tokens (Navy #1B3A5B,
  Signalrot #E2231A, Anthrazit, Nebelgrau, bereit/Wartung), tabular-nums,
  Serif-Display/Inter-Sans via CSS-Variablen, Inline-SVG-Logo.
- Radix-Basiskomponenten (button/input/label/badge/tabs/dialog/select/
  switch/slider); StatusBadge entspricht asset_status.
- Kanonisches src/lib/env.ts (Zod, Fail-Fast) mit ALLEN DB-/Auth-/Geo-Slots
  inkl. AUTH_URL; isHttps-Ableitung. Zentrale i18n-Tabelle de.ts + t().
- Drizzle-Setup: client.ts (Pool-Singleton), leeres schema/index.ts-Barrel
  (KEIN Migrations-Eigentümer), drizzle.config.ts, .env.example.
- next.config.ts: output:standalone, experimental.authInterrupts,
  Security-Header. Vitest + Fail-Fast-Env-Test (TDD, 5/5 grün).

Bewusst KEINE Auth-Logik und KEINE fachlichen Tabellen.

Verifikation: typecheck/lint/test grün; npm run build erzeugt
.next/standalone/server.js; curl /anmelden -> lang="de" + FlorianNetz.
next/font/google durch CSS-Variablen ersetzt (air-gapped-Build).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:57:01 +02:00
Claude
6ebcd270ad Add FlorianNetz implementation plan (workflow-generated)
Phased, dependency-ordered plan across 11 workstreams (foundation,
schema, auth, admin taxonomy, brigade area, search, geo/ETA, detail,
deployment, seed, tests/security) with exact file paths, code/schema
snippets, ordered tasks and per-task verification. Includes cross-cutting
standards, definition-of-done, and risks. Produced by a fan-out design +
adversarial critique + synthesis workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:10:43 +02:00
Claude
c054c834d3 Fold NÖ findings into spec; fix Allrad naming (HLFA n, A infixed)
- Bundesland confirmed: Niederösterreich; spec references seed catalog
- Vorlagen list corrected to NÖ HLF system + aliases + Allrad rule
- Geräte-Kategorien derived from Beladelisten
- Allrad designation is HLFA n (A infixed), not 'HLF n A'

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:07:22 +02:00
Claude
ebd0c30f12 Document HLF 'A' (Allrad) naming rule maps to Allradantrieb merkmal
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:01:02 +02:00
Claude
b7c8046ba0 Add vehicle name aliases (RLF/RLFA for HLF 2 & HLF 3 confirmed)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:38:42 +02:00
Claude
a01fa2f066 Add NÖ LFV/ÖBFV vehicle catalog reference from guideline analysis
Synthesized from the 11 PDFs in unterlagen/: 11 Fahrzeug-Vorlagen
(HLF 1, HLF 1 W, HLF 2-4, VRF, VF, ALF, SSTF, WLF, MTF) with technical
specs and standard Beladung, plus a derived typed Merkmal-Katalog to
seed the dynamic attribute system. Corrects RL numbers that the source
filenames got wrong (FA 04 = VRF, FA 07 = HLF 4).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:30:51 +02:00
Claude
f9e045ebed Add FlorianNetz design specification
Login-only mutual-aid platform for Austrian volunteer fire brigades to
list vehicles/equipment, searchable by other brigades and sorted by
fastest-arriving (drive-time ETA). Next.js + PostgreSQL/Drizzle + Auth.js
(Authentik OIDC + local argon2id), dynamic admin-curated Merkmal system,
self-hosted OSRM/Nominatim, Docker Compose behind external Traefik.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:11:50 +02:00