guildhall/apps/guildhall_web/lib/guildhall_web_web/router.ex
Tyler J King 69297f1ac0 feat(web): minimal LiveView dashboard, ceremonies, artifacts
Three LiveView modules reading from the Ops DB:

- DashboardLive at /: governance overview with artifact count,
  healthy/drifted deployment states, and the five most recent
  verification results. Subscribes to Guildhall.PubSub for
  ceremony:* and posture:* topics.

- CeremonyLive.Index at /ceremonies: lists open ceremonies. Query
  finds the latest custody_transition per artifact and keeps the
  ones where to_state = 'ceremony_open'. PubSub-driven refresh.
  Will integrate with substrate CRD watcher in a future sprint.

- ArtifactLive.Index at /artifacts: lists governed artifacts with
  name, type, tier, truncated CID, and aggregate drift status
  derived from their deployment_states.

Router updated to mount these LiveViews at /, /ceremonies,
/artifacts. Default PageController route removed.

Inline Heex templates (no separate .html.heex files); uses
Tailwind classes from Phoenix 1.8 default CSS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Tyler J King <tking@guildhouse.dev>
2026-04-18 07:19:31 -04:00

24 lines
559 B
Elixir

defmodule GuildhallWeb.Router do
use GuildhallWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, html: {GuildhallWeb.Layouts, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", GuildhallWeb do
pipe_through :browser
live "/", DashboardLive, :index
live "/ceremonies", CeremonyLive.Index, :index
live "/artifacts", ArtifactLive.Index, :index
end
end