Files
adminandClaude Opus 5 78dd081ad0 A front door on Netlify, and a demo that runs with no backend
The same arrangement Galena uses, deliberately: netlify.toml publishes
frontend/ alone, netlify/prepare.sh writes the _redirects that proxy
/api/v1/* and /healthz to SYGNA_BACKEND_URL, and with no backend
configured the build injects frontend/demo.js.

This is a front door, NOT a deployment. The backend is FastAPI +
PostgreSQL with two in-process schedulers and cannot run on a static
host; a real firm keeps the console on the same origin as its API behind
Caddy, because everything here is privileged material and a proxy in
front of it is one more place that sees it.

The demo is what makes the URL worth sending to somebody. It patches
window.fetch and answers from an invented Warsaw firm kept in
localStorage: three matters, an ethical wall screening one lawyer off a
retainer, an overdue deadline, an unpaid invoice, a conflict check
waiting on a human. Reads are complete enough that every screen renders;
recording time, confirming a deadline and assigning post genuinely mutate
the data, because a demo where nothing responds to a click teaches the
wrong thing. Everything else answers "this is a demo" rather than
pretending to have saved. It never ships in a real deployment — the
Docker/Caddy build serves index.html without the script — so it cannot
weaken a real backend.

The response shapes were CAPTURED from the running API rather than read
off the schemas. That still was not enough, and clicking through found
four mismatches no amount of reading would have:

  - /billing/summary.matters is a count, not a list — it rendered as
    "[object Object],[object Object] spraw"
  - the calendar needs `counts`, and spells the art. 115 k.c. note
    `moves_note`
  - an AML assessment is `risk`/`risk_score`, not `risk_rating`/`score`
  - time entries are `author` and `invoiced`, and the console posts
    `duration` AS TYPED — so "1:30" silently became six minutes until the
    mock learned the same parser the backend uses

Each of those rendered as a blank column or an error banner, and none
would have shown up short of using the thing.

Verified by driving it: dashboard, matters, all nine matter tabs,
calendar, inbox, parties, time, reports, admin, search with diacritic
folding (wodoci finds Wodociągom), and time recorded end to end. No
console errors on any route.

deploy_check gains three checks — the publish directory, and that the
mock prepare.sh injects by filename actually exists. A rename the build
cannot see would produce a console that loads and then cannot log in.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 14:24:33 +02:00
..