ProjectR Docs
Screen MapDashboard

Sign-in & access

Dashboard: every screen, state and flow in Sign-in & access.

4 screens and overlays, 17 states, 3 flows. Frames show a real screenshot where one was captured and a wireframe card where the state needs data or conditions a device run cannot produce.

Flows

Sign in and land

Step 1
Sign In (Web)
Email and password form for staff
Submit credentials
Step 2
Wireframe

Sign In

Success

Signed in

Toast Signed in successfully! then redirect

Needs data: Needs specific backend rows, a role, or a submitted write on a disposable record

Toast: Signed in successfully, then redirect
Redirect
Step 3
Hi, Welcome back (Web)
Overview lands with stats and recent sales

Branches and edge cases

Gatefrom step 1
Auth guard, Redirecting to sign in (Web)
Visit dashboard URL signed out
Edgefrom step 1
Wireframe

Sign In

Edge

Submitting

Button reads Signing in... and is disabled

Not reachable on a device: Needs a server error, crash, race or code change

Submit in flight
Errorfrom step 1
Wireframe

Sign In

Error

Field validation

Zod errors shown per field

Not captured yet

Field validation fails
Errorfrom step 1
Wireframe

Sign In

Error

Sign-in failed

Inline red text plus error toast, user stays on page

Not captured yet

Wrong credentials
Gatefrom step 1
Wireframe

Sign In

Gate

Role apps lands on denied

Valid apps account signs in, then sees AccessDenied and empty sidebar

Needs data: Needs specific backend rows, a role, or a submitted write on a disposable record

Role apps signs in
Gatefrom step 1
Wireframe

Access Denied

Gate

No permission

Default text: You don't have permission to access this feature

Needs data: Needs specific backend rows, a role, or a submitted write on a disposable record

Role apps: AccessDenied, empty sidebar
Edgefrom step 1
Reset Password (Web)
Forgot password
Edgefrom step 1
Create Account (Web)
Create account
Flow diagram

Sign up and wait for access

Step 1
Create Account (Web)
Sign-up form
Submit
Step 2
Wireframe

Create Account

Success

Account created

Toast says an administrator must grant dashboard access

Needs data: Needs specific backend rows, a role, or a submitted write on a disposable record

Toast: account created, admin must grant access
Sign in
Step 3
Wireframe

Access Denied

Edge

Role box

Shows Your role; Required role only when minRole is passed (no page does)

Needs data: Needs specific backend rows, a role, or a submitted write on a disposable record

AccessDenied shows the account role as apps
Admin raises the role
Step 4
Change User Role (Web)
Admin changes the role from the Users list
Next sign-in
Step 5
Hi, Welcome back (Web)
Overview opens with the new role

Branches and edge cases

Errorfrom step 1
Wireframe

Create Account

Error

Sign-up failed

Inline error text plus toast

Not captured yet

Sign-up fails
Edgefrom step 1
Privacy Policy and Terms of Service, Coming soon (Web)
Footer links to Terms and Privacy
Gatefrom step 2
Wireframe

Create Account

Gate

New account is role apps

Redirect lands on AccessDenied with empty sidebar; no pending screen

Needs data: Needs specific backend rows, a role, or a submitted write on a disposable record

New account is role apps
Flow diagram

Password reset

Step 1
Reset Password (Web)
Enter email to request a reset link
Submit email
Step 2
Wireframe

Reset Password

Success

Request sent

Generic text, does not reveal if the account exists

Needs data: Needs specific backend rows, a role, or a submitted write on a disposable record

Generic sent message, no account hint
Open the email link
Step 3
Reset Password, Token present (Web)
New password form opens with the token
Submit new password
Step 4
Wireframe

Reset Password

Success

Password reset

Confirmation with Return to sign in

Needs data: Needs specific backend rows, a role, or a submitted write on a disposable record

Confirmation, link back to sign in
Back to sign in
Step 5
Sign In (Web)
Sign in with the new password

Branches and edge cases

Errorfrom step 1
Wireframe

Reset Password

Error

Request failed

Inline: Could not send the reset email

Not reachable on a device: Needs a server error, crash, race or code change

Request fails
Errorfrom step 1
Reset Password, Token error banner (Web)
Link has an error param
Errorfrom step 3
Wireframe

Reset Password

Error

Reset failed

Inline: Could not reset your password. Try again.

Not captured yet

Reset fails
Flow diagram

Screens and states

Sign In

Sign In (Web)
Screenauth/sign-in

Sign In

Email and password sign in for staff.

src/app/auth/sign-in/[[...sign-in]]/page.tsx

Entry

  • AuthGuard redirect with callbackUrl
  • Sign-out redirect
  • User menu Sign in

Exits

  • Submit → callbackUrl or /dashboard/overview
  • Forgot your password? → /auth/forgot-password
  • Create an account → /auth/sign-up

States · 7

Edge
Submitting · Button reads Signing in... and is disabledsrc/features/auth/components/sign-in-form.tsx:140
Error
Sign-in failed · Inline red text plus error toast, user stays on pagesrc/features/auth/components/sign-in-form.tsx:134
Error
Field validation · Zod errors shown per fieldsrc/features/auth/components/sign-in-form.tsx:56
Success
Signed in · Toast Signed in successfully! then redirectsrc/hooks/use-auth.ts:145
Gate
Role apps lands on denied · Valid apps account signs in, then sees AccessDenied and empty sidebarsrc/hooks/use-auth.ts:151
Edge
Suspended account not rejected · Client does not check suspended or banned status at sign-insrc/hooks/use-auth.ts:137
Edge
Password toggle · Show or hide password buttonsrc/features/auth/components/sign-in-form.tsx:110

Create Account

Create Account (Web)
Screenauth/sign-up

Create Account

Self sign up with name, email and password.

src/app/auth/sign-up/[[...sign-up]]/page.tsx

Entry

  • Create an account link on sign-in

Exits

  • Submit → /dashboard/overview
  • Sign in to your account → /auth/sign-in
  • Privacy and Terms links → /privacy, /terms

States · 3

Success
Account created · Toast says an administrator must grant dashboard accesssrc/hooks/use-auth.ts:179
Gate
New account is role apps · Redirect lands on AccessDenied with empty sidebar; no pending screenpackages/backend/convex/auth.ts:98
Error
Sign-up failed · Inline error text plus toastsrc/features/auth/components/sign-up-form.tsx:56

Reset Password

Reset Password (Web)
Screenauth/forgot-password

Reset Password

Request a reset email, or set a new password via token.

src/app/auth/forgot-password/page.tsx:12

Entry

  • Forgot your password? on sign-in
  • Email link with ?token=

Exits

  • Request → email sent confirmation
  • Set password → reset confirmation
  • Return to sign in → /auth/sign-in

States · 6

Edge
Token present · New-password form is shown instead of request formsrc/features/auth/components/password-reset-form.tsx:134
Error
Reset failed · Inline: Could not reset your password. Try again.src/features/auth/components/password-reset-form.tsx:97
Success
Password reset · Confirmation with Return to sign insrc/features/auth/components/password-reset-form.tsx:128
Success
Request sent · Generic text, does not reveal if the account existssrc/features/auth/components/password-reset-form.tsx:254
Error
Token error banner · ?error= param shows a banner above the request formsrc/features/auth/components/password-reset-form.tsx:276
Error
Request failed · Inline: Could not send the reset emailsrc/features/auth/components/password-reset-form.tsx:68

Captured states

Reset Password, Token present (Web)
Token present
Reset Password, Token error banner (Web)
Token error banner

Privacy Policy and Terms of Service

Privacy Policy and Terms of Service (Web)
Screenprivacy-terms

Privacy Policy and Terms of Service

Placeholder legal pages.

src/app/privacy/page.tsx

Entry

  • Sign-up form footer links

Exits

  • None

States · 1

Edge
Coming soon · Both pages show a coming soon text onlysrc/app/terms/page.tsx

Captured states

Privacy Policy and Terms of Service, Coming soon (Web)
Coming soon

On this page