API-only Phoenix 1.8 project for cloud-ops, inventory, billing, and provisioning sagas. Validates arcadia JWTs via shared Guardian secret (verify-only; arcadia-app remains the issuer). Deps beyond default Phoenix: guardian, cors_plug, oban, req. Postgres on local port 5433 per arcadia stack convention. Endpoint runs on :4005. Endpoints: - GET /api/health — public, returns service identifier - GET /api/v1/inventory — auth-gated, returns empty list (phase 0 stub) Oban configured with the queues phase 1+ will need: provisioning / cloud_sync_fast|full|slow / cloud_billing / metering. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
24 lines
434 B
Elixir
24 lines
434 B
Elixir
defmodule ArcadiaCloudWeb.Router do
|
|
use ArcadiaCloudWeb, :router
|
|
|
|
pipeline :api do
|
|
plug :accepts, ["json"]
|
|
end
|
|
|
|
pipeline :authed do
|
|
plug ArcadiaCloudWeb.Plugs.RequireAuth
|
|
end
|
|
|
|
scope "/api", ArcadiaCloudWeb do
|
|
pipe_through :api
|
|
|
|
get "/health", HealthController, :show
|
|
end
|
|
|
|
scope "/api/v1", ArcadiaCloudWeb do
|
|
pipe_through [:api, :authed]
|
|
|
|
get "/inventory", InventoryController, :index
|
|
end
|
|
end
|