Commit Graph
2 Commits
Author SHA1 Message Date
grabowski 3d2d8fa30b Back office in the website's style; People as record cards
CI / secret scan (push) Successful in 10s
CI / fmt, clippy, tests (push) Successful in 44s
CI / release (push) Skipped
The back office now looks like lannadesk.com:

- Light theme as a printed letterhead (warm paper, navy ink, thin gold
  rules, a gold line across the top), and the default; the dark theme is
  the same navy and gold and stays a click away.
- Trirong for headings and names, Sarabun for text: the website's
  fonts, self-hosted in static/fonts/ (latin and Thai subsets, OFL),
  since the CSP allows fonts from this origin only.
- The header reads "Lanna Desk, back office"; primary buttons are navy
  on paper and gold on navy; corners are squarer.

People are record cards, like the example record on the website: a
monogram, the name in Trirong, nationality and province, the most
urgent deadline's chip, the stay today, the next four dated deadlines
with how far away they are, the passport and the employer. The filter
works on the cards; "Table" shows the table as before (?view=table),
and the switch keeps the employer and archive filters.

Checks: fmt, clippy, 109 unit and 57 integration tests (the cards show
the stay, the next dates and the monogram; the table view and the
switch keep their filters); screenshots of People (light, dark, phone),
a person, the deadlines and a client link.
2026-11-21 21:27:09 +07:00
grabowski 2e009700a9 Phase 1: app, Kanidm login, people, passports, addresses, audit log
CI / secret scan (push) Successful in 4s
CI / fmt, clippy, tests (push) Successful in 42s
visa.buildfor.life keeps the immigration records of the foreigners B4L
looks after. This first phase is the base the deadlines and extension
packs build on (docs/PLAN.md, phases 2 to 7).

- One Rust binary (axum 0.8, minijinja, sqlx on PostgreSQL) with its
  templates, static files and migrations compiled in.
- Login through Kanidm (OpenID Connect with PKCE and a nonce, ES256),
  client visa-web, group visa; sessions in PostgreSQL keyed by the
  SHA-256 of the cookie. VISA_INSECURE_NO_LOGIN=1 for loopback
  development only.
- Same-site check and form token on every POST; a CSP without inline
  script or style; security headers.
- People: list with filter, page, create, edit, archive, restore.
- Passports from the machine-readable zone with check digits (ICAO
  9303 TD3); expiry warnings at 12 and 6 months.
- Addresses in Thailand in the order Thai forms use, with the house
  master and the TM.30 receipt.
- Append-only audit log of every view and change, with the names of the
  changed fields but never their values (PDPA); the Activity page.
- Invented demo people (visa seed-demo, refused when login is on).
- 40 tests: unit tests, pages with demo data, the forms, the audit log
  and the whole login against a fake OpenID provider.
- CI: gitleaks over the history, fmt, clippy and the tests against
  PostgreSQL 18; the pre-commit secret scan.
2026-11-17 16:58:48 +07:00