docs: document file-based router migration (frontend routing rewrite)
Rewrite the frontend routing documentation for the TanStack Router
file-based system (PR #1447) and record the migration with reasoning:
- architecture/frontend/Routing.md: full rewrite — request flow,
router bootstrap + defaults, single Register + staticData typing,
auth/status gate, role tiers, beforeLoad flag gates (fail-closed
trade-off documented), 404 split, redirect-after-login, route-owned
search state (#1238), loaders, navigation conventions, nav
projection, Vite codegen, add-a-route and add-a-flag walkthroughs;
4 validated mermaid diagrams
- codes/frontend/routes: RouteGuards rewritten for pathless layouts +
beforeLoad (HOC guidance removed); RoutesIndex rewritten as the
verified 29-route catalog
- changes/refactors: new dated migration entry with self-contained
reasoning for every design decision
- stale old-router references corrected across Feature-Flags,
Authentication, Roles, Frontend Structure/Overview, ReportingUnitBlockDetails,
Formula pages, LayoutSideNav, and index/log files; the deleted
search-params sync hook converted to a removal record
- block details accuracy: the route keeps its dedicated
reporting-unit-block-details-enabled flag (beforeLoad, same pattern
as RU details); its lack of role restriction predates the migration
(#1254 dropped the D9-era ADMIN gate on 2026-10-13) — preserved
1:1, not changed by the migration
docs: update Frontend Structure and Guidelines; add Frontend Verification and Tooling guide; create Frontend Type Boundary pattern
feat: Migrate from react-router-dom to TanStack Router v1
- Replaced `react-router-dom` with `@tanstack/react-router` v1, transitioning to a static route tree with composable HOC guards.
- Deleted legacy routing components: `AppRoutes.tsx`, `ProtectedRoute.tsx`, `DashboardRedirect.tsx`.
- Introduced new routing structure with `routeTree.tsx` for router singleton and guard application, and `AppRouter.tsx` as a thin wrapper for `RouterProvider`.
- Updated `routePaths.tsx` to use `component: ComponentType` and added `guards?: RouteGuard[]` to `RouteDescription`.
- Simplified `redirectStorage.ts` to a single session storage key for post-login redirects.
- Updated architecture documentation to reflect changes in routing, error handling, and component structure.
- Ensured all unit tests across 14 modules were migrated to the new routing structure and passed without TypeScript errors.
docs: add FormulaInput component documentation and update related references
docs: update architecture documentation with user bookmarking feature and related changes
docs: update architecture documentation with global API middleware and notification improvements
docs: enhance notification events documentation and update architecture overview
docs: centralize query hooks and improve token handling in architecture documentation
chore: Refactor frontend project structure: replace existing architecture documentation with detailed code structure tree, including directory layout and folder taxonomy commentary. Introduce proposed improvements for better organization, including new directories for queries, types, and constants, along with future-proofing recommendations.
feat: Add detailed error documentation for NR Waste Plus application
- Introduced new error codes and descriptions for common issues:
- G405: Method Not Allowed
- G408: Request Timeout
- G409: Conflict
- G410: Gone
- G413: Payload Too Large
- G415: Unsupported Media Type
- G422: Unprocessable Entity
- G429: Too Many Requests
- G500: Internal Server Error
- G501: Not Implemented
- G502: Bad Gateway
- G503: Service Unavailable
- G504: Gateway Timeout
- P403: Insufficient Permissions
- R600: Data Cannot Be Retrieved
- U404: User Not Registered
- Created an overarching error handling guide to assist users in understanding and resolving application errors.