Skip to content

Routing, Tabbing and Navigation

The frontend uses Next.js App Router for URL routing and context-based state for in-app module navigation.

  • / checks server session and redirects:
    • authenticated -> /app
    • unauthenticated -> /logout
  • /app renders MainView with initial module home
  • /app/[module] resolves a module key and delegates rendering through Handle
  • src/app/page.tsx
  • src/app/app/page.tsx
  • src/app/app/[module]/page.tsx

TabProvider tracks the active ModuleKey for UI state (currentTab) and provides setCurrentTab.

This tab state is used by components like sidebar/nav and module handlers, while URL routes still control page-level entry.