Routes
Routes are generated by Nuxt pages and localized by Nuxt i18n. Use route names from app/utils/route-locations.ts and wrap them with localePath instead of hard-coding URLs.
Main localized pages
- Home:
/en/,/fr/ - Login:
/en/login,/fr/login - Agencies:
/en/agencies,/fr/agences - Agency detail:
/en/agencies/[id],/fr/agences/[id] - Programs:
/en/transfer-payments,/fr/transfer-payments - Program detail:
/en/transfer-payments/[id] - Stream detail:
/en/transfer-payments/[id]/streams/[streamId] - Proponents:
/en/proponents,/fr/promoteurs - Proponent create:
/en/proponents/new,/fr/promoteurs/nouveau - Proponent edit/detail:
/en/proponents/edit/[id],/fr/promoteurs/modifier/[id] - Roles:
/en/roles,/fr/roles - Role detail:
/en/roles/[id],/fr/roles/[id] - Users:
/en/users,/fr/utilisateurs - User detail:
/en/users/[id],/fr/utilisateurs/[id] - Common Admin:
/en/admin/common,/fr/admin/commun
Agreement and program child routes also exist for commitments, payments, forecasts, claims, monitors, generated documents, assessment schemas, approval templates, document templates, and assessments.
Route helper
appRouteLocations contains named route helpers such as home, login, agencies, agencyDetail, proponents, proponentCreate, proponentEdit, agreements, agreementDetail, roles, roleDetail, users, and userDetail.
Use:
const localePath = useLocalePath()
await navigateTo(localePath(appRouteLocations.proponentEdit(id)))Middleware
auth.global.ts protects authenticated routes and redirects signed-in users away from login. admin-common.ts protects Common Admin by requiring a root/global read-all permission.
API route style
API routes live under server/api. Dynamic files such as [id].get.ts, [id].patch.ts, and [id].delete.ts map to HTTP methods. Authorization should happen before data mutation and should resolve scope from the target record when possible.
Tab routing
Complex detail pages use a query-backed tab state through route tab composables. This makes links to sections stable while keeping the page route focused on the entity id. When adding tabs, provide stable values and localized labels.
Extension routes
Extension server handlers are dispatched under /api/extensions/{extensionKey}/.... The host resolves route params and then dispatches to the matching extension handler.
For handlers with RBAC, the host resolves the declared entity, stream, or agency param before extension code runs. It checks auth/RBAC, agency and stream enablement, and resolved extension config, then attaches stable context for defineGcsExtensionRouteHandler: params, auth context, config, entity/stream/agency context, and authorized scope.
Handlers with auth: "manual" skip host RBAC context and must perform their own domain authorization.
Full-page stream extension configuration uses /en/extension/[id]/config and /fr/extension/[id]/configuration with streamId, transferPaymentId, and agencyId query parameters.