Routing, Tabbing and Navigation
Routing Overview
Section titled “Routing Overview”The frontend uses Next.js App Router for URL routing and context-based state for in-app module navigation.
Entry Routes
Section titled “Entry Routes”/checks server session and redirects:- authenticated ->
/app - unauthenticated ->
/logout
- authenticated ->
/apprendersMainViewwith initial modulehome/app/[module]resolves a module key and delegates rendering throughHandle
Route Files
Section titled “Route Files”src/app/page.tsxsrc/app/app/page.tsxsrc/app/app/[module]/page.tsx
Tab State
Section titled “Tab State”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.