Admin Journeys
This document maps all user journeys for system administrators of the SCORM API.
Overview
User Type: System Administrators
Entry Point: /admin (requires system admin privileges)
Primary Goals: Monitor system health, manage tenants, oversee operations, track SaaS metrics
Journey 1: Admin Monitoring System Health
Persona: System administrator
Task: Check overall system health and status
Entry Point: /admin
Path
graph TD
A[Sign In] --> B[Admin Dashboard /admin]
B --> C[View System Health Section]
C --> D[Check database status]
D --> E[Check storage backends]
E --> F[Check rate limiting]
F --> G[View active sessions]
G --> H[Check API key activity]
H --> I{Issues found?}
I -->|Yes| J[Investigate issue]
I -->|No| K[Continue monitoring]
J --> L[Take corrective action]
Detailed Steps
- Start: Admin signs in and navigates to
/admin - Admin Dashboard:
/adminloads - System Health Section: View health status:
- Database Status: Connection health, response times
- Storage Backends: R2 and Supabase storage accessibility
- Rate Limiting: Distributed vs local rate limiting status
- Active Sessions: Total and active session counts (24h, 7d)
- API Key Activity: Total, active, and recently used API keys
- System Metrics: Memory usage and uptime
- Auto-refresh: Metrics refresh every 30 seconds
- Status Indicators: Color-coded status (green/yellow/red)
- Action: If issues detected, investigate further or take corrective action
Buttons/Actions
- "Admin Dashboard" link (navigation, admin-only)
- Auto-refresh (every 30 seconds)
- Status indicators (click for details)
Exit Point
/admin (continues monitoring) or issue resolution pages
Journey 2: Admin Viewing SaaS Metrics
Persona: System administrator
Task: Review business metrics and revenue
Entry Point: /admin
Path
graph TD
A[Admin Dashboard /admin] --> B[Scroll to SaaS Metrics]
B --> C[View revenue metrics]
C --> D[MRR and ARR]
D --> E[Average revenue per tenant]
E --> F[Monthly churn rate]
F --> G[View subscription metrics]
G --> H[Total subscriptions]
H --> I[Active, trialing, past due]
I --> J[View revenue trends]
J --> K[12-month MRR chart]
K --> L[View usage metrics]
L --> M[Package uploads, storage, sessions]
Detailed Steps
- Start: Admin on
/admindashboard - SaaS Metrics Section: Scroll to SaaS metrics
- Revenue Metrics:
- Monthly Recurring Revenue (MRR)
- Annual Recurring Revenue (ARR)
- Average Revenue per Tenant
- Monthly Churn Rate
- Subscription Metrics:
- Total subscriptions
- Active, trialing, past due, cancelled, incomplete
- Subscription tier distribution with MRR breakdown
- Trial conversion rates
- Revenue Trends: MRR trends over last 12 months (chart)
- Usage Metrics:
- Package uploads
- Storage usage
- Session activity
- API key usage
- Analysis: Review trends and identify patterns
Buttons/Actions
- Scroll to SaaS Metrics section
- Chart interactions (if interactive)
- Export data (if available)
Exit Point
/admin (metrics reviewed)
Journey 3: Admin Identifying At-Risk Tenants
Persona: System administrator
Task: Identify tenants at risk of churning
Entry Point: /admin
Path
graph TD
A[Admin Dashboard /admin] --> B[Scroll to Tenant Activity]
B --> C[View activity summary]
C --> D[Total tenants]
D --> E[Active tenants 7d/30d]
E --> F[New tenants 7d/30d/90d]
F --> G[Inactive tenants 30d/60d]
G --> H[At-risk tenants count]
H --> I[Click 'View Tenants']
I --> J[Tenants Page /admin/tenants]
J --> K[View tenant table]
K --> L[Filter by risk level]
L --> M[Review at-risk tenants]
M --> N[Take action if needed]
Detailed Steps
- Start: Admin on
/admindashboard - Tenant Activity Section: Scroll to tenant activity
- Activity Summary:
- Total tenants
- Active tenants (7d, 30d)
- New tenants (7d, 30d, 90d)
- Inactive tenants (30d, 60d)
- At-risk tenants count
- Churn Indicators: View risk assessment:
- Low risk
- Medium risk
- High risk
- Action: Click "View Tenants" or navigate to
/admin/tenants - Tenants Page:
/admin/tenantsloads - Tenant Table: View all tenants with:
- Tenant name
- Risk level
- Last activity
- Subscription status
- Package count
- Storage usage
- Filter: Filter by risk level (high, medium, low)
- Review: Review at-risk tenants and take action if needed
Buttons/Actions
- "View Tenants" link (tenant activity section)
- "Tenants" link (admin navigation)
- Filter dropdown (risk level)
- Search input (tenant name)
- Sort controls (table headers)
Exit Point
/admin/tenants (tenants reviewed)
Journey 4: Admin Managing Tenant API Keys
Persona: System administrator
Task: View and manage API keys for all tenants
Entry Point: /admin/api-keys
Path
graph TD
A[Admin Dashboard /admin] --> B[Click 'API Keys All Tenants']
B --> C[API Keys Page /admin/api-keys]
C --> D[View all API keys]
D --> E[Filter by tenant]
E --> F[View key details]
F --> G{Action needed?}
G -->|Revoke| H[Click 'Revoke']
G -->|View usage| I[View usage stats]
G -->|No| J[Continue monitoring]
H --> K[Confirm revocation]
K --> L[Key revoked]
Detailed Steps
- Start: Admin on
/admindashboard - Action: Click "API Keys (All Tenants)" in admin navigation
- API Keys Page:
/admin/api-keysloads - View All Keys: See API keys from all tenants:
- Key name
- Tenant name
- Scopes
- Created date
- Last used date
- Status (active/revoked)
- Filter: Filter by tenant using dropdown
- Key Details: Click key to view:
- Full key information
- Usage statistics
- Recent activity
- Actions:
- Revoke: Click "Revoke" to disable key
- View Usage: See usage patterns and statistics
- Monitor: Continue monitoring key activity
Buttons/Actions
- "API Keys (All Tenants)" link (admin navigation)
- Filter dropdown (tenant selection)
- "Revoke" button (key card)
- "View Details" link (key card)
Exit Point
/admin/api-keys (keys managed)
Journey 5: Admin Viewing All Packages
Persona: System administrator
Task: Browse and manage packages across all tenants
Entry Point: /admin/packages
Path
graph TD
A[Admin Dashboard /admin] --> B[Click 'Packages All Tenants']
B --> C[Packages Page /admin/packages]
C --> D[View all packages]
D --> E[Filter by tenant]
E --> F[Search packages]
F --> G[Click package]
G --> H[Package Details /admin/packages/[id]]
H --> I[View package info]
I --> J[View distribution]
J --> K[View versions]
K --> L[Manage package]
Detailed Steps
- Start: Admin on
/admindashboard - Action: Click "Packages (All Tenants)" in admin navigation
- Packages Page:
/admin/packagesloads - View All Packages: See packages from all tenants:
- Package title
- Tenant name
- SCORM version
- File size
- Created date
- Filter: Filter by tenant using dropdown
- Search: Search packages by title or ID
- Package Details: Click package to view:
- Full package information
- Distribution settings
- Version history
- Manage:
- View distribution settings
- View version history
- Manage package metadata
Buttons/Actions
- "Packages (All Tenants)" link (admin navigation)
- Filter dropdown (tenant selection)
- Search input (package search)
- Package card (click to view details)
- "View Distribution" link (package details)
- "View Versions" link (package details)
Exit Point
/admin/packages/[id] (package details) or /admin/packages (package list)
Journey 6: Admin Generating Custom Reports
Persona: System administrator
Task: Create custom reports across all tenants
Entry Point: /admin/reports/custom
Path
graph TD
A[Admin Dashboard /admin] --> B[Click 'Custom Reports All Tenants']
B --> C[Custom Reports /admin/reports/custom]
C --> D[Select data source]
D --> E[Apply filters]
E --> F[Select tenant filter]
F --> G[Choose visualization]
G --> H[Click 'Generate Report']
H --> I[View results]
I --> J[Export if needed]
Detailed Steps
- Start: Admin on
/admindashboard - Action: Click "Custom Reports (All Tenants)" in admin navigation
- Custom Reports Page:
/admin/reports/customloads - Select Data Source: Choose from:
- All sessions (all tenants)
- All packages (all tenants)
- All xAPI statements (all tenants)
- Apply Filters:
- Date range
- Tenant (optional, can select multiple)
- Package (optional)
- Completion status
- Other relevant filters
- Choose Visualization: Select report type:
- Table view
- Chart view
- Summary statistics
- Generate: Click "Generate Report" button
- View Results: Review generated report
- Export: Export report if needed (CSV, PDF, etc.)
Buttons/Actions
- "Custom Reports (All Tenants)" link (admin navigation)
- Data source selector (dropdown)
- Filter controls (date pickers, dropdowns, multi-selects)
- Visualization selector (radio buttons or dropdown)
- "Generate Report" button
- "Export" button (if available)
Exit Point
/admin/reports/custom (report generated and viewed)
Journey 7: Admin Reviewing Audit Logs
Persona: System administrator
Task: Review system activity and audit trail
Entry Point: /admin/audit-logs
Path
graph TD
A[Admin Dashboard /admin] --> B[Click 'Audit Logs']
B --> C[Audit Logs Page /admin/audit-logs]
C --> D[View log entries]
D --> E[Filter by event type]
E --> F[Filter by tenant]
F --> G[Filter by date]
G --> H[Search logs]
H --> I[View log details]
I --> J[Export logs if needed]
Detailed Steps
- Start: Admin on
/admindashboard - Action: Click "Audit Logs" in admin navigation
- Audit Logs Page:
/admin/audit-logsloads - View Logs: See chronological list of system events:
- Timestamp
- Event type
- Tenant (if applicable)
- User (if applicable)
- Action details
- Result (success/failure)
- Filter: Apply filters:
- Event type (package upload, session creation, API key creation, etc.)
- Tenant
- Date range
- User
- Search: Search logs by keyword
- Log Details: Click log entry to view full details:
- Complete event data
- Request/response information
- Error details (if applicable)
- Export: Export logs for compliance or analysis
Buttons/Actions
- "Audit Logs" link (admin navigation)
- Filter dropdowns (event type, tenant, user)
- Date range picker
- Search input
- Log entry (click to view details)
- "Export" button (if available)
Exit Point
/admin/audit-logs (logs reviewed)
Journey 8: Admin Managing Webhooks (All Tenants)
Persona: System administrator
Task: Monitor webhook deliveries across all tenants
Entry Point: /admin/webhooks
Path
graph TD
A[Admin Dashboard /admin] --> B[Click 'Webhooks All Tenants']
B --> C[Webhooks Page /admin/webhooks]
C --> D[View all webhooks]
D --> E[Filter by tenant]
E --> F[View delivery status]
F --> G[View delivery logs]
G --> H[Identify failed deliveries]
H --> I[Investigate failures]
Detailed Steps
- Start: Admin on
/admindashboard - Action: Click "Webhooks (All Tenants)" in admin navigation
- Webhooks Page:
/admin/webhooksloads - View All Webhooks: See webhooks from all tenants:
- Webhook URL
- Tenant name
- Event type
- Status (active/inactive)
- Last delivery status
- Delivery count
- Filter: Filter by tenant using dropdown
- Delivery Status: View delivery statistics:
- Success rate
- Failed deliveries
- Pending deliveries
- Delivery Logs: Click webhook to view delivery history:
- Delivery attempts
- Status codes
- Error messages
- Retry attempts
- Investigate: Identify and investigate failed deliveries
Buttons/Actions
- "Webhooks (All Tenants)" link (admin navigation)
- Filter dropdown (tenant selection)
- Webhook card (click to view details)
- "View Deliveries" link (webhook details)
Exit Point
/admin/webhooks (webhooks monitored)
Common Admin Navigation Patterns
Pattern 1: Daily Health Check
- Admin Dashboard → System Health → SaaS Metrics → Tenant Activity
- Time: 5-10 minutes
- Path:
/admin→ Review all sections
Pattern 2: Tenant Investigation
- Admin Dashboard → Tenant Activity → Tenants → Filter by Risk → Review
- Time: 10-15 minutes
- Path:
/admin→/admin/tenants→ Filter → Review
Pattern 3: Package Oversight
- Admin Dashboard → Packages → Filter by Tenant → View Details
- Time: 5-10 minutes
- Path:
/admin→/admin/packages→ Filter → Details
Pattern 4: Reporting Workflow
- Admin Dashboard → Custom Reports → Build Report → Generate → Export
- Time: 10-20 minutes
- Path:
/admin→/admin/reports/custom→ Build → Generate
Navigation Elements Available
Admin Navigation (System Admin Only)
- Admin Dropdown:
- Admin Dashboard →
/admin - Reports (All Tenants) →
/admin/reports/learner-progress - Custom Reports (All Tenants) →
/admin/reports/custom - Packages (All Tenants) →
/admin/packages - Webhooks (All Tenants) →
/admin/webhooks - Tenants →
/admin/tenants - API Keys (All Tenants) →
/admin/api-keys - System →
/admin/system - Audit Logs →
/admin/audit-logs
- Admin Dashboard →
Technical Notes
- Admin access requires system admin privileges (checked via
requireClerkAdmin()) - All admin pages show data from all tenants (no tenant isolation)
- System health metrics auto-refresh every 30 seconds
- Audit logs provide complete system activity trail
- SaaS metrics calculated from subscription and usage data