Skip to content

feat(frontend): claim, sign in, persons, camera upload and settings - #15

Merged
jalmena merged 3 commits into
developfrom
feature/frontend-core
Sep 23, 2026
Merged

jalmena merged 3 commits into
developfrom
feature/frontend-core

Conversation

@jalmena

@jalmena jalmena commented Sep 23, 2026

Copy link
Copy Markdown
Owner

What

The first usable interface for phase 1, plus the plumbing that keeps it honest with the backend.

  • Typed client generated from frontend/openapi.json, which nevus openapi exports. CI fails when the snapshot or the generated types are stale (just openapi refreshes both).
  • Pages: claim (fresh instance), sign in, persons list with creation, person page with camera capture (<input type=file capture>) or file pick, thumbnail grid and preview dialog with trash, settings (language, theme, uncertainty display) stored with the account.
  • Behaviour: redirects derive from session state, not from callbacks; language and theme follow the account, not the browser; the brand block stays on the dark paper.
  • Strings in English and Spanish.
  • Fix: NEVUS_ALLOWED_HOSTS=nevus.example.com crashed at start-up because pydantic-settings decoded the list as JSON. Now a plain comma-separated value works, with a test.

Verification

  • Backend: ruff, mypy strict, 34 tests on SQLite (CI also runs PostgreSQL).
  • Frontend: tsc, eslint + jsx-a11y, stylelint, prettier, 5 component tests against an in-memory API mock, production build.
  • End to end against the built frontend with curl: / and /login answer 200, manifest and service worker no-cache, self-hosted font served as font/woff2, claim 201, person 201, camera upload 201, thumbnail 200, preferences patched and read back, cross-site POST 403, unknown public host 421.
  • Container image builds (279 MB; pillow-heif and pillow libraries account for the growth since the last image).

…n step

nevus openapi prints the schema of a throwaway application, and frontend/openapi.json holds the committed copy. CI regenerates the snapshot and the typed client and fails when either is stale; just openapi refreshes both. The generated files are excluded from Prettier so the comparison is byte for byte.

Signed-off-by: Jose David <josedalmena@gmail.com>
pydantic-settings decodes list-typed variables as JSON before validators run, so the documented form nevus.example.com crashed the container at start-up. The field is now marked NoDecode and split on commas, with a test that goes through the environment.

Signed-off-by: Jose David <josedalmena@gmail.com>
First usable interface for phase 1: the claim page for a fresh instance, sign-in, the persons list with creation, a person page that takes a photo with the device camera (or picks a file) and shows the scrubbed thumbnails with a preview dialog, and settings for language, theme and uncertainty display stored with the account. Requests go through a typed client generated from the OpenAPI snapshot; redirects are derived from session state. Strings in English and Spanish; five component tests run against an in-memory API mock.

Signed-off-by: Jose David <josedalmena@gmail.com>
@jalmena
jalmena merged commit 60349aa into develop Sep 23, 2026
5 checks passed
@jalmena
jalmena deleted the feature/frontend-core branch September 23, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant