Navigation Registry

Keep sidebar, mobile navigation, command discovery, docs links, breadcrumbs, admin tools, and quick actions aligned


Navigation Registry

The Navigation Registry is the typed product map for ReformCode. It keeps desktop sidebar, mobile navigation, command discovery, header search, docs links, breadcrumbs, admin entry points, and quick actions aligned from one source of truth.

What It Solves

  • No drift: CODE, REFORM, Library, Resources, Operations, and Account routes are defined once in lib/navigation.
  • Cross-surface discovery: the same route metadata powers sidebar links, mobile links, command-palette entries, and header search suggestions.
  • Role-aware operations: admin routes are registered but hidden unless the shell has an admin or super-admin user.
  • Docs truth: product routes can declare docsPath, and regression coverage checks those docs exist in docs/index.json.
  • Breadcrumb readiness: route metadata can resolve product breadcrumbs without bespoke per-page logic.

Product Map

The current launch map treats CODE as the active build surface and REFORM as the remix, analyze, transform, and evidence surface:

  • CODE: Workspace and Projects.
  • REFORM: Search, Analyze, Transform, Snippets, and Reports/Evidence Studio.
  • Library: History and Saved.
  • Resources: Docs and API Docs.
  • Operations: Admin Operations Console for authorized users.
  • Account: Settings and billing/credit management.

Developer Contract

Add or change product destinations in lib/navigation/registry.ts first. Then consume registry helpers instead of hardcoding new route lists:

  • getSidebarNavigationSections() for desktop shell navigation.
  • getMobileNavigationSections() for mobile drawer navigation.
  • getCommandNavigationItems() for command palette destinations.
  • getHeaderSearchNavigationItems() for global header search.
  • getDocsNavigationItems() for docs-linked route checks.
  • getBreadcrumbsForPathname() for route breadcrumb resolution.

Quick actions should use getNavigationQuickActions() so launch CTAs point at registered routes rather than one-off paths.