Milestone 3 · Monday scaffold

Company-owned identity, human pages, agent face

Bun + HTMX owns the browser and MCP. Ory Hydra is the tokens-only OIDC sidecar — not Zitadel Console, not Ory Kratos.

Locked shape

  • Cloud Run service name auth
  • Two containers: Bun ingress + Hydra sidecar (oryd/hydra:v26.2.0, ADR 0010)
  • Bun proxies public OIDC (ADR 0011); admin :4445 stays sidecar-only
  • Roles: owner, advisor, teacher, student, agent
  • Password + TOTP first; passkeys later (stub only)
  • M3 DoD includes admin users/roles/audit and account settings — not login-only

This process

  • App public URL: https://auth.spanishacademylive.com
  • Hydra public: https://auth.spanishacademylive.com
  • Hydra admin: http://127.0.0.1:4445
  • Directory DSN: set

Human pages

Shared partials (button, table, form-field, sidebar) keep login, consent, admin, and account on one branded shell. HTMX swaps admin tables and settings forms. Login/consent accept is still a TODO.