Panly API docsstaging

Screens / Bootstrap (app start)

Bootstrap (app start)

Restores the session from the stored refresh token, then routes to sign-in or the first page the session's permissions allow. An owner whose setup is not finished goes to /onboarding first (PAN-78 startup gate; it never locks the owner out).

App routes
/
Access
any
Screen code
lib/screens/bootstrap/bootstrap_page.dart
lib/screens/bootstrap/bootstrap_controller.dart
lib/core/navigation/onboarding_gate.dart
Source
elmermj/panly-app @ pre-staging-test (72aaffd)

API calls (3)

CallWhy the screen makes itWhere in the app code
POST /v1/auth/refresh
Rotate refresh token
Exchange the stored refresh token (single use) for a new session lib/screens/bootstrap/bootstrap_controller.dart:50
lib/data/repositories/auth_repository.dart:198
GET /v1/me
Get the signed-in account, its role here and the current merchant
Enrich the restored session with account, merchant and role
The answer also carries the role and its permission keys (PAN-88); the app gates pages and buttons on those keys, not on role names.
lib/data/repositories/auth_repository.dart:189
lib/data/repositories/auth_repository.dart:426
GET /v1/merchants/me/onboarding
Get onboarding state
Startup gate (owner only, `settings.manage`): is this business's setup finished? An unfinished one opens /onboarding instead of the page. A 6-second timeout, a failure or any other role passes straight through to the page lib/screens/bootstrap/bootstrap_controller.dart:102
lib/core/navigation/onboarding_gate.dart:44
lib/domain/usecases/onboarding/onboarding_usecase.dart:12
lib/data/repositories/onboarding_repository.dart:16

Each call links to its operation in the API reference. Code locations are file:line in panly-app at 72aaffd, listed from the screen down to the line that sends the request.