Skip to content

Routing And Access Control ​

Public Summary ​

Routing separates public and protected areas. Access to dashboard routes is enforced by authentication wrappers.

Internal Details ​

Route Model ​

  • Public: landing/map and login.
  • Protected: dashboard feature routes behind auth guards.

Access Flow ​

Auth Recovery Behavior ​

  • fetchPrivate retries requests on 401 after transparent token refresh.
  • Guard components keep protected UI unavailable when auth is invalid.

Source Anchors ​

PathRelevance
apps/client/src/components/layout/App.jsxRoute definitions
apps/client/src/features/auth/components/PersistLogin.jsxSilent token refresh wrapper
apps/client/src/features/auth/components/RequireAuth.jsxAuth guard for dashboard routes
apps/client/src/api/fetch.jsToken retry via fetchPrivate 401 handler

Risks and Trade-offs ​

  • Auth coupling between guards and interceptor behavior requires clear testing to avoid redirect loops.

Obrok engineering documentation.