feat(web): scaffold SvelteKit client #24

Open
claude-desktop wants to merge 1 commit from feat/web-scaffold into feat/backend-scaffold
Collaborator

Closes #4. Stacked on top of #23 (and transitively #22) — the base will retarget automatically as the stack lands.

Summary

  • web/: SvelteKit 2 + Svelte 5, TypeScript strict mode, Tailwind, ESLint flat config, Prettier, Vitest (unit smoke) and Playwright (e2e smoke hitting backend /healthz).
  • Pages: / (renders instance name/version/commit fetched from /api/instance), /login (stub pointing to #10), +error.svelte for 404 / generic errors.
  • Backend gains a small GET /api/instance endpoint returning {name, version, commit} so the landing page has real data.
  • koinos-web compose service now builds from web/ with a multi-stage node:22-alpine Dockerfile; Caddyfile catch-all targets koinos-web:3000.
  • Justfile adds just web-dev / just web-build; fmt-check, lint, test, ci-setup now cover both crates and the web workspace.
  • A11y: eslint-plugin-svelte recommended rules are on; semantic landmarks, dt/dd, role="status" for the fallback banner.

Locally verified: svelte-check (0 errors / 0 warnings), vitest run green, prettier --check, eslint ., vite build all green.

Acceptance criteria

Layout

  • web/ with SvelteKit, adapter-node
  • TypeScript strict mode
  • ESLint + Prettier configs
  • vitest + one smoke test
  • playwright + one e2e smoke test (landing + backend /healthz)

Pages

  • / renders instance name and version from backend
  • /login stub
  • +error.svelte for 404 / generic errors

Styling

  • Tailwind CSS
  • eslint-plugin-svelte a11y rules enabled

Container and dev

  • web/Dockerfile (node:22-alpine multi-stage)
  • just web-dev runs vite dev

Out of scope

  • OIDC auth (#10)
  • Clinical UI (later)
Closes #4. Stacked on top of #23 (and transitively #22) — the base will retarget automatically as the stack lands. ## Summary - `web/`: SvelteKit 2 + Svelte 5, TypeScript strict mode, Tailwind, ESLint flat config, Prettier, Vitest (unit smoke) and Playwright (e2e smoke hitting backend `/healthz`). - Pages: `/` (renders instance name/version/commit fetched from `/api/instance`), `/login` (stub pointing to #10), `+error.svelte` for 404 / generic errors. - Backend gains a small `GET /api/instance` endpoint returning `{name, version, commit}` so the landing page has real data. - `koinos-web` compose service now builds from `web/` with a multi-stage `node:22-alpine` Dockerfile; Caddyfile catch-all targets `koinos-web:3000`. - Justfile adds `just web-dev` / `just web-build`; `fmt-check`, `lint`, `test`, `ci-setup` now cover both crates and the web workspace. - A11y: `eslint-plugin-svelte` recommended rules are on; semantic landmarks, `dt/dd`, `role="status"` for the fallback banner. Locally verified: `svelte-check` (0 errors / 0 warnings), `vitest run` green, `prettier --check`, `eslint .`, `vite build` all green. ## Acceptance criteria ### Layout - [x] `web/` with SvelteKit, `adapter-node` - [x] TypeScript strict mode - [x] ESLint + Prettier configs - [x] `vitest` + one smoke test - [x] `playwright` + one e2e smoke test (landing + backend `/healthz`) ### Pages - [x] `/` renders instance name and version from backend - [x] `/login` stub - [x] `+error.svelte` for 404 / generic errors ### Styling - [x] Tailwind CSS - [x] `eslint-plugin-svelte` a11y rules enabled ### Container and dev - [x] `web/Dockerfile` (node:22-alpine multi-stage) - [x] `just web-dev` runs `vite dev` ## Out of scope - OIDC auth (#10) - Clinical UI (later)
Adds a SvelteKit 2 + Svelte 5 application under web/ with TypeScript
strict mode, Tailwind CSS, ESLint flat config, Prettier, Vitest and
Playwright. The landing page fetches /api/instance from the backend
and renders the instance name, version and commit; a /login stub
links to issue #10 and a generic +error page handles 404s and server
errors.

Backend gains a small GET /api/instance endpoint so the web client
has real data to bind to. The koinos-web compose service now builds
from web/ using a node:22-alpine multi-stage image and Caddy routes
the catch-all handler to port 3000. Justfile adds web-dev and
web-build, and fmt-check / lint / test / ci-setup now cover both
crates and the web workspace.

Closes #4

Signed-off-by: Charles Jacquin <charles@jacquin.app>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/web-scaffold:feat/web-scaffold
git switch feat/web-scaffold

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch feat/backend-scaffold
git merge --no-ff feat/web-scaffold
git switch feat/web-scaffold
git rebase feat/backend-scaffold
git switch feat/backend-scaffold
git merge --ff-only feat/web-scaffold
git switch feat/web-scaffold
git rebase feat/backend-scaffold
git switch feat/backend-scaffold
git merge --no-ff feat/web-scaffold
git switch feat/backend-scaffold
git merge --squash feat/web-scaffold
git switch feat/backend-scaffold
git merge --ff-only feat/web-scaffold
git switch feat/backend-scaffold
git merge feat/web-scaffold
git push origin feat/backend-scaffold
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/koinos!24
No description provided.