Router helpers for mounting the bloccs dashboard into a host Phoenix app.
Add one macro call inside a scope and pipe it through whatever auth your
app already uses:
defmodule MyAppWeb.Router do
use MyAppWeb, :router
import Bloccs.Web.Router
scope "/" do
pipe_through [:browser, :require_admin]
bloccs_dashboard "/bloccs"
end
endThe dashboard inherits the host's auth from the pipeline; per-feature
authorization (the Pro seam) is delegated to a Bloccs.Web.Resolver.
Summary
Functions
Mount the bloccs dashboard at path.
Functions
Mount the bloccs dashboard at path.
Options
:resolver— a module implementingBloccs.Web.Resolver, consulted for the current user, access level, and enabled features. Defaults toBloccs.Web.Access(everything visible — the free baseline).:as— the route helper name. Defaults to:bloccs_dashboard.:on_mount— extraon_mounthooks appended to the dashboard's own.
All four panels live under a single live_session so navigating between them
never triggers a full remount.