Panly API docsstaging

Screens / Sign in and join

Sign in and join

Two tabs (PAN-136 refined design): Owner signs in with Google; a new owner then names the first business and picks its business code, checked live (PAN-107/120/121). Employee signs in with employee ID and password, with a Forgot password link. The language chip (English, Bahasa Indonesia, follow device) is kept on the device and saved on the account once signed in (PAN-93). After sign-in an owner whose setup is not finished goes to /onboarding (PAN-78); a lapsed plan routes to /premium or /business-paused (PAN-114/116). The footer no longer promises a Free plan.

App routes
/sign-in /join
Access
guest
Screen code
lib/screens/auth/auth_page.dart
lib/screens/auth/auth_controller.dart
lib/screens/auth/enter_session.dart
lib/screens/auth/widgets/auth_role_tabs.dart
lib/screens/auth/widgets/auth_owner_form.dart
lib/screens/auth/widgets/auth_employee_form.dart
lib/screens/auth/widgets/business_setup_form.dart
lib/screens/business_code/business_code_controller.dart
Source
elmermj/panly-app @ pre-staging-test (72aaffd)

API calls (5)

CallWhy the screen makes itWhere in the app code
POST /v1/auth/google
Token exchange (Google)
Exchange the Google ID token (merchant_name or invite_token)
The token answer carries the permission keys of the member's role (PAN-88).
lib/screens/auth/auth_controller.dart:190
lib/screens/auth/auth_controller.dart:219
lib/domain/usecases/auth/auth_usecase.dart:20
lib/data/repositories/auth_repository.dart:46
GET /v1/me
Get the signed-in account, its role here and the current merchant
Enrich the new session lib/data/repositories/auth_repository.dart:401
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/auth/enter_session.dart:12
lib/core/navigation/onboarding_gate.dart:44
lib/domain/usecases/onboarding/onboarding_usecase.dart:12
lib/data/repositories/onboarding_repository.dart:16
POST /v1/auth/employee/login
Staff sign-in (employee ID + password)
Employee tab: sign in with employee ID and password lib/screens/auth/auth_controller.dart:256
lib/domain/usecases/auth/auth_usecase.dart:29
lib/data/repositories/auth_repository.dart:65
GET /v1/merchant-codes/{code}/availability
Check whether a business code is free (public)
New owner: live business code check in the first-business form lib/screens/business_code/business_code_controller.dart:100
lib/domain/usecases/business_code/business_code_usecase.dart:14
lib/data/repositories/business_code_repository.dart:14

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.