Files
arcadia-admin/app/routes.ts
jules af2c8d6663 Phase 5: platform feature-flags CRUD, impersonation, billing catalogue
Three new platform screens on top of the Phase 1-4 work.

Feature flags (/feature-flags) — platform-wide flag registry. New route +
lib/arcadia/feature-flags.ts, capability platform.feature_flags, nav under
Automation. List/create/edit/delete with a per-row default toggle; pairs with
the Phase-4 per-tenant override tab.

Impersonation — "Impersonate" action on active users. Entirely client-side
token swap in session.ts (beginImpersonation parks the operator's session +
API token and swaps to the impersonation token; endImpersonation restores it),
with a sticky "Viewing as <email> — Stop" banner in the shell driven by the
JWT's impersonated_by claim. Stop is client-side because the impersonation
token carries the target's roles and can't reach the admin-gated /stop
endpoint; impersonation is stateless JWT so restoring the parked token is
sufficient.

Billing (/billing) — replaced the coming-soon stub with the real plan
catalogue from GET /billing/plans (lib/arcadia/billing.ts). Per-tenant plan
assignment stays on the tenant detail page; Entitlements + Apps remain honestly
marked "Soon".

Verified in-browser with real backend; typecheck adds zero errors (36→36).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 14:04:09 +10:00

36 lines
1.5 KiB
TypeScript

import { type RouteConfig, index, route } from "@react-router/dev/routes"
export default [
index("routes/home.tsx"),
route("audit-log", "routes/activity.tsx"),
route("activity", "routes/activity-redirect.tsx"),
route("ai", "routes/ai.tsx"),
route("settings", "routes/settings.tsx"),
route("profile", "routes/profile.tsx"),
route("login", "routes/login.tsx"),
route("login/forgot", "routes/login.forgot.tsx"),
route("login/reset", "routes/login.reset.tsx"),
route("login/2fa", "routes/login.2fa.tsx"),
route("signup", "routes/signup.tsx"),
route("tenants", "routes/tenants.tsx"),
route("tenants/:id", "routes/tenants.$id.tsx"),
route("storage", "routes/storage.tsx"),
route("users", "routes/users.tsx"),
route("secrets", "routes/secrets.tsx"),
route("webhooks", "routes/webhooks.tsx"),
route("scheduled-tasks", "routes/scheduled-tasks.tsx"),
route("buckets", "routes/buckets.tsx"),
route("monitoring", "routes/monitoring.tsx"),
route("memberships", "routes/memberships.tsx"),
route("organizations", "routes/organizations.tsx"),
route("networking", "routes/networking.tsx"),
route("sso", "routes/sso.tsx"),
route("announcements", "routes/announcements.tsx"),
route("status-page", "routes/status-page.tsx"),
route("search", "routes/search.tsx"),
route("billing", "routes/billing.tsx"),
route("feature-flags", "routes/feature-flags.tsx"),
route("integrations", "routes/integrations.tsx"),
// CREMA:ROUTES
] satisfies RouteConfig