rulestead_admin

Mountable Phoenix LiveView admin for Rulestead.

Optional sibling package for host apps that need an operator surface — flag inventory, rollouts, kill switch, audit, audiences, and governance workflows. Your app owns auth, policy, and session; this package renders inside your router.

Install {:rulestead_admin, "~> 0.1"} alongside rulestead (currently 0.1.x on Hex).

Two version lines: GitHub repo milestones track project delivery. Hex packages use 0.1.x semver until a future 1.0 API freeze.

This is a mounted companion, not a standalone control plane.

Install

defp deps do
[
{:rulestead, "~> 0.1"},
{:rulestead_admin, "~> 0.1"}
]
end

Mount from your host router (the policy: option is required):

import RulesteadAdmin.Router
scope "/" do
pipe_through :browser
rulestead_admin "/admin/flags", policy: MyApp.RulesteadPolicy
end

Include the packaged stylesheet in your root layout:

<link phx-track-static rel="stylesheet" href={~p"/assets/css/rulestead_admin.css"} />

Copy priv/static/css/rulestead_admin.css from this package into your asset pipeline during build. See the Admin UI guide.

Host session contract

The mounted UI expects your session to provide:

The host owns authentication, actor identity, and authorization. The admin package consumes those seams; it does not ship an auth stack.

URL contract

?env= is the canonical environment selector on mounted pages. When present in the URL, it wins over remembered session state. Preserve it in links and redirects when building adjacent tooling.

Roles

The UI maps to three conceptual roles enforced by your policy module:

  1. Viewer — read flags, audit, diagnostics
  2. Editor — propose changes and drafts; no direct prod publish
  3. Admin — publish, execute change requests, kill switch

Choose your path

You are…Start here
Mounting the adminAdmin UI guide
Lifecycle workflowsFlag Lifecycle
Evaluating the full stackAdoption Lab demo
Installing both packagesInstallation

Package docs: hexdocs.pm/rulestead_admin

Monorepo: github.com/szTheory/rulestead