ProjectR Docs
Screen MapDashboard

Users

Dashboard: every screen, state and flow in Users.

18 screens and overlays, 70 states, 2 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

Users administration

Step 1
User Management (Web)
User table with search and row selection
Open a user
Step 2
User Detail (Web)
User detail with tabs
Edit User
Step 3
Edit User (Web)
Edit form for profile and role
Save
Step 4
Wireframe

Edit User

Success

User updated

Toast then redirect to detail

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

Toast: updated, back to detail

Branches and edge cases

Edgefrom step 1
Change User Status (Web)
Change Status
Edgefrom step 1
Change User Role (Web)
Change Role
Gatefrom step 1
Delete User (Web)
Delete
Edgefrom step 1
Wireframe

Restore User

Needs data: Needs a user with status deleted

Restore a deleted user
Errorfrom step 1
Wireframe

Change User Role

Edge

Self target blocked

Toast: Cannot modify your own role

Not captured yet

Action on own row
Edgefrom step 1
Bulk Edit, Selected users preview (Web)
Select rows: Bulk Edit
Gatefrom step 1
Confirm Bulk Action, Warning copy (Web)
Bulk Apply asks to confirm
Edgefrom step 1
Wireframe

Bulk Edit

Success

Bulk result

Toast: N processed, M failed

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

Bulk result: N processed, M failed
Gatefrom step 2
Reset campaign progress? (Web)
Loyalty tab: Reset progress
Gatefrom step 2
Revoke voucher? (Web)
Loyalty tab: Revoke voucher
Edgefrom step 3
Wireframe

Edit User

Edge

No changes detected

Info toast when nothing changed

Not captured yet

Nothing changed
Errorfrom step 3
Wireframe

Edit User

Error

Update failed

Failure toast or inline destructive alert

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

Server refuses
Flow diagram

Routine steps

Step 1
Routine Steps Configuration (Web)
Routine steps list per tab
Add Step
Step 2
Wireframe

Add or Edit Routine Step

Edge

New step order

New steps get max display order + 1 per routine

Not captured yet

Step form with the next order number
Save
Step 3
Wireframe

Routine Steps Configuration

Success

Order updated

Toast after drag reorder

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

Drag reorder saved, toast
Delete a step
Step 4
Delete Routine Step (Web)
Confirm delete of an unused step

Branches and edge cases

Emptyfrom step 1
Wireframe

Routine Steps Configuration

Empty

No steps configured

AM and PM tables with create CTA

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

No steps configured
Errorfrom step 1
Wireframe

Routine Steps Configuration

Error

Reorder failed

Toast: Failed to update order

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

Reorder fails
Errorfrom step 2
Wireframe

Add or Edit Routine Step

Error

Save failed

Toast via mutationErrorMessage

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

Save fails
Errorfrom step 4
Wireframe

Delete Routine Step

Error

Step in use

Server refuses when products are tagged with the step

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

Products tagged: cannot delete
Errorfrom step 4
Wireframe

Routine Steps Configuration

Error

Delete blocked

Server: products are assigned to this routine step

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

Delete blocked toast
Flow diagram

Screens and states

User Management

User Management (Web)
Screendashboard/users

User Management

Search, filter and administer accounts.

src/app/dashboard/users/page.tsx

Entry

  • Sidebar Users
  • Audit log target user links
  • Detail back buttons

Exits

  • View → /dashboard/users/id
  • Edit → /dashboard/users/id/edit
  • Row menu → status, role, delete dialogs
  • Bulk edit → drawer
  • Export → ExportDialog

States · 8

Loading
Table skeleton · loading.tsx plus table skeletonsrc/features/user-management/components/user-tables/index.tsx:93
Empty
No users found · Also shown for filters with no resultssrc/features/user-management/components/user-tables/index.tsx:105
Edge
Search mode · Role, status filters applied client side; loyalty filters ignored, hint shownsrc/features/user-management/components/user-listing.tsx:140
Edge
Pagination · Server side via page and perPage URL params, counter badgessrc/features/user-management/components/user-listing.tsx:319
Edge
Loyalty sort page only · Loyalty sort re-ranks only the loaded pagesrc/features/user-management/components/user-listing.tsx:180
Edge
Rows selected · Selection badge N selected and Bulk edit buttonsrc/features/user-management/components/user-listing.tsx:350
Edge
User with no app profile · Shown as role apps, status active, loyalty em dashsrc/features/user-management/components/user-listing.tsx:188
Gate
Admin required · AccessDenied below adminsrc/app/dashboard/users/page.tsx:16

Change User Status

Change User Status (Web)
DialogChangeUserStatusDialog

Change User Status

Confirm suspend or activate of one account.

src/features/user-management/components/user-tables/cell-action.tsx:396

Entry

  • Row menu Change Status (admin)

Exits

  • Confirm → ban or unban
  • Cancel

States · 3

Success
Status changed · Toast: name is now statussrc/features/user-management/components/user-tables/cell-action.tsx:124
Error
Server refused · Toast with server message; admin target needs super_adminsrc/features/user-management/components/user-tables/cell-action.tsx:126
Edge
Self target blocked · Toast: Cannot modify your own account statussrc/features/user-management/components/user-tables/cell-action.tsx:103

Change User Role

Change User Role (Web)
DialogChangeUserRoleDialog

Change User Role

Confirm a role change (super_admin only).

src/features/user-management/components/user-tables/cell-action.tsx:433

Entry

  • Row menu Change Role (super_admin)

Exits

  • Confirm → update role
  • Cancel

States · 3

Success
Role changed · Toast: name is now rolesrc/features/user-management/components/user-tables/cell-action.tsx:157
Edge
Self target blocked · Toast: Cannot modify your own rolesrc/features/user-management/components/user-tables/cell-action.tsx:139
Error
Server refused · Only super_admin may grant admin tiers or edit admin targetspackages/backend/convex/auth/mutations.ts:2166

Delete User

Delete User (Web)
DialogDeleteUserDialog

Delete User

Soft delete an account (super_admin in UI).

src/features/user-management/components/user-tables/cell-action.tsx:461

Entry

  • Row menu Delete (super_admin)

Exits

  • Confirm → soft delete
  • Cancel

States · 2

Success
User deleted · Toast: name has been deletedsrc/features/user-management/components/user-tables/cell-action.tsx:187
Edge
Self target blocked · Toast: Cannot delete your own accountsrc/features/user-management/components/user-tables/cell-action.tsx:172

Permanently Delete User

Permanently Delete User (Web)
DialogHardDeleteUserDialog

Permanently Delete User

Irreversible delete (super_admin only).

src/features/user-management/components/user-tables/cell-action.tsx:519

Entry

  • Row menu Permanently Delete

Exits

  • Confirm → hard delete
  • Cancel

States · 2

Success
Permanently deleted · Toast: has been permanently deletedsrc/features/user-management/components/user-tables/cell-action.tsx:217
Edge
Self target blocked · Toast: Cannot delete your own accountsrc/features/user-management/components/user-tables/cell-action.tsx:202

Restore User

Wireframe

Restore User

Needs data: Needs a user with status deleted

DialogRestoreUserDialog

Restore User

Restore a deleted account.

src/features/user-management/components/user-tables/cell-action.tsx:489

Entry

  • Row menu Restore (status deleted)

Exits

  • Confirm → restore
  • Cancel

States · 2

Success
User restored · Toast: has been restoredsrc/features/user-management/components/user-tables/cell-action.tsx:249
Edge
Self target blocked · Toast: Cannot restore your own accountsrc/features/user-management/components/user-tables/cell-action.tsx:234

Bulk Edit

Bulk Edit (Web)
SheetBulkActionsSheet

Bulk Edit

Apply activate, suspend, restore or delete to up to 500 users.

src/features/user-management/components/bulk-actions-sheet.tsx:130

Entry

  • Bulk edit button with rows selected

Exits

  • Apply → Confirm Bulk Action dialog
  • Cancel

States · 4

Edge
Selected users preview · List of selected users before applyingsrc/features/user-management/components/bulk-actions-sheet.tsx:158
Success
Bulk result · Toast: N processed, M failedsrc/features/user-management/components/bulk-actions-sheet.tsx:103
Error
Bulk failed · Toast with server messagesrc/features/user-management/components/bulk-actions-sheet.tsx:115
Edge
Rows skipped by server · Self, admins (non-super), super_admins, and User not found per rowpackages/backend/convex/auth/mutations.ts:2686

Captured states

Bulk Edit, Selected users preview (Web)
Selected users preview

Confirm Bulk Action

Confirm Bulk Action (Web)
DialogBulkConfirmDialog

Confirm Bulk Action

Required confirm for all four bulk actions.

src/features/user-management/components/bulk-actions-sheet.tsx:299

Entry

  • Apply in Bulk Edit drawer

Exits

  • Confirm → bulk update
  • Cancel

States · 1

Edge
Warning copy · Suspend and delete show a warning in the confirmsrc/features/user-management/components/bulk-actions-sheet.tsx:327

Captured states

Confirm Bulk Action, Warning copy (Web)
Warning copy

User Detail

User Detail (Web)
Screendashboard/users/[id]

User Detail

Read-only 360 view of one account with five tabs.

src/app/dashboard/users/[id]/page.tsx

Entry

  • Users list View
  • Recent Sales link
  • Audit log target links
  • Loyalty, voucher, stamp rows

Exits

  • Back to Users → /dashboard/users
  • Edit User → /dashboard/users/id/edit
  • Stamp row → /dashboard/orders/id
  • Campaign row → /dashboard/loyalty/campaigns/id

States · 13

Loading
Skeleton · Skeleton plus Suspense fallbacksrc/features/user-management/components/user-detail-client.tsx:49
Error
User not found or error · Alert with Back to Users; no userProfiles row gives not foundpackages/backend/convex/auth/queries.ts:812
Gate
Admin required · AccessDenied: You need permission to view user detailssrc/features/user-management/components/user-detail-client.tsx:54
Empty
No campaigns joined · Loyalty tab, Active Campaignssrc/features/user-management/components/sections/campaigns-section.tsx:67
Empty
No seasonal claims yet · Loyalty tabsrc/features/user-management/components/sections/seasonal-section.tsx:54
Empty
No stamps earned yet · Loyalty tab, Stamp Historysrc/features/user-management/components/sections/stamp-history-section.tsx:68
Empty
No vouchers in this filter · Vouchers Held filter tabssrc/features/user-management/components/sections/vouchers-held-section.tsx:119
Empty
No purchase history · Activity tabsrc/features/user-management/components/sections/purchases-tab.tsx:158
Empty
No engagement activity · Activity tabsrc/features/user-management/components/sections/engagement-tab.tsx:205
Empty
No security information · Security tabsrc/features/user-management/components/sections/security-tab.tsx:19
Empty
No notifications sent yet · Settings tabsrc/features/user-management/components/sections/notifications-tab.tsx:157
Edge
Award bonus stamps disabled · Admin actions menu item is permanently disabled, tagged soonsrc/features/user-management/components/sections/admin-actions.tsx:22
Edge
Shopify link badge · Integrations shows Linked or Unlinkedsrc/features/user-management/components/sections/integrations-tab.tsx:49

Reset campaign progress?

Reset campaign progress? (Web)
DialogResetCampaignProgressDialog

Reset campaign progress?

Reset one user's stamps and position in a campaign.

src/features/user-management/components/sections/campaigns-section.tsx:272

Entry

  • Campaign row More actions menu

Exits

  • Confirm → reset progress
  • Cancel

States · 3

Success
Progress reset · Toast: Campaign progress resetsrc/features/user-management/components/sections/campaigns-section.tsx:136
Error
Reset failed · Failure toastsrc/features/user-management/components/sections/campaigns-section.tsx:139
Edge
No client role gate · Only the admin page gate protects it; server needs adminpackages/backend/convex/gamificationLoyalty/mutations.ts:2091

Revoke voucher?

Revoke voucher? (Web)
DialogRevokeVoucherDialog

Revoke voucher?

Delete a voucher held by the user.

src/features/user-management/components/sections/vouchers-held-section.tsx:294

Entry

  • Held voucher row action

Exits

  • Confirm → revoke voucher
  • Cancel

States · 3

Success
Voucher revoked · Toast: Voucher revokedsrc/features/user-management/components/sections/vouchers-held-section.tsx:180
Error
Revoke failed · Failure toastsrc/features/user-management/components/sections/vouchers-held-section.tsx:183
Success
Code copied · Copy-code button toastsrc/features/user-management/components/sections/vouchers-held-section.tsx:170

Stamp History

Wireframe

Stamp History

Needs data: Needs a user with stamps

SheetStampHistorySheet

Stamp History

Read-only side sheet listing all stamps.

src/features/user-management/components/sections/stamp-history-section.tsx:76

Entry

  • Loyalty tab Stamp History View all

Exits

  • Row → /dashboard/orders/id

States · 1

Empty
No stamps earned yet · No stamp rowssrc/features/user-management/components/sections/stamp-history-section.tsx:68

All Vouchers

All Vouchers (Web)
SheetAllVouchersSheet

All Vouchers

Read-only side sheet listing all held vouchers.

src/features/user-management/components/sections/vouchers-held-section.tsx:131

Entry

  • Loyalty tab Vouchers Held View all

Exits

  • Redeemed row → /dashboard/orders/id

States · 1

Empty
No vouchers in this filter · Filter tab has no rowssrc/features/user-management/components/sections/vouchers-held-section.tsx:119

Edit User

Edit User (Web)
Screendashboard/users/[id]/edit

Edit User

Edit one account's profile, role, status and preferences.

src/app/dashboard/users/[id]/edit/page.tsx

Entry

  • Users list Edit
  • Detail Edit User (admin)

Exits

  • Save → /dashboard/users/id
  • Cancel → detail (unsaved check)
  • Back to Users → /dashboard/users

States · 9

Loading
Skeleton · Edit form skeletonsrc/features/user-management/components/user-edit-client.tsx:36
Error
User profile not found · Destructive alertsrc/features/user-management/components/user-edit-client.tsx:58
Gate
Admin required · AccessDenied: You need permission to edit userssrc/features/user-management/components/user-edit-client.tsx:40
Edge
Own profile locked · Role and status read-only on your own profilesrc/features/user-management/components/forms/user-edit-form.tsx:141
Edge
Role options limited · Admin sees all but super_admin; pending and deleted status disabledsrc/features/user-management/components/forms/user-edit-form.tsx:240
Edge
No changes detected · Info toast when nothing changedsrc/features/user-management/components/forms/user-edit-form.tsx:87
Success
User updated · Toast then redirect to detailsrc/features/user-management/components/forms/user-edit-form.tsx:125
Error
Update failed · Failure toast or inline destructive alertsrc/features/user-management/components/forms/user-edit-form.tsx:130
Edge
Unsaved changes · UnsavedChangesDialog on dirty form leavesrc/features/user-management/components/forms/user-edit-form.tsx:722

Create New User

Create New User (Web)
Screendashboard/users/new

Create New User

Explainer page; dashboard does not create users.

src/app/dashboard/users/new/page.tsx

Entry

  • None found, URL only

Exits

  • Back to Users → /dashboard/users
  • Manage Existing Users → /dashboard/users

States · 4

Gate
Super admin required · AccessDenied: You need permission to create users; plain admin deniedsrc/app/dashboard/users/new/page.tsx:28
Empty
Onboarding steps only · Page explains three steps; there is no form submitsrc/features/user-management/components/forms/user-create-form.tsx:55
Edge
Dead success handler · Toast and redirect code in page is unreachablesrc/app/dashboard/users/new/page.tsx
Edge
Unreachable inner denial · isAdmin branch text is unreachable in practicesrc/features/user-management/components/forms/user-create-form.tsx:25

Routine Steps Configuration

Routine Steps Configuration (Web)
Screendashboard/users/routine-steps

Routine Steps Configuration

Configure skincare routine steps used by the mobile beauty profile.

src/app/dashboard/users/routine-steps/page.tsx

Entry

  • Sidebar Users > Routine Steps

Exits

  • Add Step → step form dialog
  • Row menu Edit, enable, Delete
  • Drag handle → reorder
  • Active switch → toggle

States · 8

Loading
Auth loading · Loading... while auth resolvessrc/app/dashboard/users/routine-steps/page.tsx:207
Gate
Admin required · Route gate plus a redundant inline Access Denied blocksrc/app/dashboard/users/routine-steps/page.tsx:226
Empty
No steps configured · AM and PM tables with create CTAsrc/app/dashboard/users/routine-steps/_components/routine-table.tsx:128
Empty
All tab empty · All-steps table empty textsrc/app/dashboard/users/routine-steps/_components/all-steps-table.tsx:76
Success
Order updated · Toast after drag reordersrc/app/dashboard/users/routine-steps/_components/routine-table.tsx:102
Error
Reorder failed · Toast: Failed to update ordersrc/app/dashboard/users/routine-steps/_components/routine-table.tsx:104
Error
Invalid routine step · Create validates the step name against a fixed listsrc/app/dashboard/users/routine-steps/page.tsx:101
Error
Delete blocked · Server: products are assigned to this routine steppackages/backend/convex/beauty/mutations.ts:562

Add or Edit Routine Step

Add or Edit Routine Step (Web)
DialogStepFormDialog

Add or Edit Routine Step

Create or update one routine step.

src/app/dashboard/users/routine-steps/_components/step-form-dialog.tsx:105

Entry

  • Add Step button
  • Row menu Edit

Exits

  • Submit → create or update step
  • Cancel

States · 2

Edge
New step order · New steps get max display order + 1 per routinesrc/app/dashboard/users/routine-steps/page.tsx:110
Error
Save failed · Toast via mutationErrorMessagesrc/app/dashboard/users/routine-steps/page.tsx

Delete Routine Step

Delete Routine Step (Web)
DialogDeleteRoutineStepDialog

Delete Routine Step

Confirm deleting a step; may affect tagged products.

src/app/dashboard/users/routine-steps/page.tsx:389

Entry

  • Row menu Delete

Exits

  • Confirm → delete step
  • Cancel

States · 1

Error
Step in use · Server refuses when products are tagged with the steppackages/backend/convex/beauty/mutations.ts:562

On this page