expense-log example: step 1 — skeleton module + Mill build + /health endpoint #23

Open
opened 2026-04-28 08:13:45 +00:00 by mprihoda · 0 comments
mprihoda commented 2026-04-28 08:13:45 +00:00 (Migrated from github.com)

Part of #22 — first implementation step toward the reference expense-log example.

Goal

Stand up the empty examples/expense-log module group with Mill build wiring and a single trivial HTTP endpoint, so subsequent steps have a place to land code and CI has something to compile.

This is intentionally minimal: no OIDC, no UI, no domain model yet. Just the skeleton.

Scope

  • New module group examples/expense-log/ in the repo, not published.
  • Mill build entries following the conventions used by existing modules (mirroring how scenarios / scenariosUI are wired). Cross-compilation is not required at this step — JVM only is fine; ScalaJS/Vite get added when UI work starts.
  • Initial sub-modules (empty placeholders or single-file as needed):
    • examples/expense-log/server — JVM module with the http server bootstrap and a single Tapir endpoint GET /health returning {"status":"ok"}.
  • A README at examples/expense-log/README.md with:
    • one paragraph explaining what this example will become (link back to #22),
    • how to run it (./mill examples.expenseLog.server.runBackground or whatever the canonical Mill task is),
    • explicit "this is a work in progress" note.
  • The module compiles in CI alongside the rest of the repo.

Out of scope (deferred to later steps)

  • OIDC / Pac4j / sessions (step 2).
  • Domain model, repositories (step 3).
  • Authorization (step 4).
  • Tapir endpoints beyond /health (step 5).
  • UI module, Vite, WebAwesome, HTMX (step 6).
  • i18n / message catalogue wiring.
  • e2e tests.

Acceptance criteria

  • examples/expense-log/server exists with build wiring and compiles.
  • Running the server task starts an HTTP server on a documented port.
  • GET /health returns 200 with {"status":"ok"}.
  • examples/expense-log/README.md exists and explains current state + link to #22.
  • No new published artifacts (the example must not appear in publish output).
  • mill __.compile succeeds for the whole repo.

Notes for the implementer

  • Look at how scenarios / scenariosUI are wired in build.mill for the right BaseModule / BaseScalaJSModule conventions.
  • Use the existing server/http and tapir modules as dependencies — that's exactly what we're showcasing.
  • Follow the file PURPOSE: comment convention from CLAUDE.md.
  • Pick a non-conflicting default port (suggestion: 8080 is fine for now; we'll revisit when docker-compose for the IdP is added).
Part of #22 — first implementation step toward the reference expense-log example. ## Goal Stand up the empty `examples/expense-log` module group with Mill build wiring and a single trivial HTTP endpoint, so subsequent steps have a place to land code and CI has something to compile. This is intentionally minimal: **no OIDC, no UI, no domain model yet.** Just the skeleton. ## Scope - New module group `examples/expense-log/` in the repo, **not published**. - Mill build entries following the conventions used by existing modules (mirroring how `scenarios` / `scenariosUI` are wired). Cross-compilation is **not** required at this step — JVM only is fine; ScalaJS/Vite get added when UI work starts. - Initial sub-modules (empty placeholders or single-file as needed): - `examples/expense-log/server` — JVM module with the http server bootstrap and a single Tapir endpoint `GET /health` returning `{"status":"ok"}`. - A README at `examples/expense-log/README.md` with: - one paragraph explaining what this example will become (link back to #22), - how to run it (`./mill examples.expenseLog.server.runBackground` or whatever the canonical Mill task is), - explicit "this is a work in progress" note. - The module compiles in CI alongside the rest of the repo. ## Out of scope (deferred to later steps) - OIDC / Pac4j / sessions (step 2). - Domain model, repositories (step 3). - Authorization (step 4). - Tapir endpoints beyond `/health` (step 5). - UI module, Vite, WebAwesome, HTMX (step 6). - i18n / message catalogue wiring. - e2e tests. ## Acceptance criteria - [ ] `examples/expense-log/server` exists with build wiring and compiles. - [ ] Running the server task starts an HTTP server on a documented port. - [ ] `GET /health` returns `200` with `{"status":"ok"}`. - [ ] `examples/expense-log/README.md` exists and explains current state + link to #22. - [ ] No new published artifacts (the example must not appear in publish output). - [ ] `mill __.compile` succeeds for the whole repo. ## Notes for the implementer - Look at how `scenarios` / `scenariosUI` are wired in `build.mill` for the right `BaseModule` / `BaseScalaJSModule` conventions. - Use the existing `server/http` and `tapir` modules as dependencies — that's exactly what we're showcasing. - Follow the file `PURPOSE: ` comment convention from CLAUDE.md. - Pick a non-conflicting default port (suggestion: `8080` is fine for now; we'll revisit when docker-compose for the IdP is added).
Sign in to join this conversation.
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
iterative-works/support#23
No description provided.