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.dartlib/screens/bootstrap/bootstrap_controller.dartlib/core/navigation/onboarding_gate.dart- Source
- elmermj/panly-app @ pre-staging-test (72aaffd)
API calls (3)
| Call | Why the screen makes it | Where in the app code |
|---|---|---|
POST /v1/auth/refreshRotate refresh token |
Exchange the stored refresh token (single use) for a new session | lib/screens/bootstrap/bootstrap_controller.dart:50lib/data/repositories/auth_repository.dart:198 |
GET /v1/meGet 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:189lib/data/repositories/auth_repository.dart:426 |
GET /v1/merchants/me/onboardingGet 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:102lib/core/navigation/onboarding_gate.dart:44lib/domain/usecases/onboarding/onboarding_usecase.dart:12lib/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.