Admin Guide
Platform administration and company management.
Role Hierarchy
LokkoLabs uses a three-tier role system. Higher roles inherit all permissions from lower roles.
Platform Roles
System-wide access for platform management:
| Role | Permissions |
|---|---|
super_admin | Full system access. Manage all companies, users, content, billing. Access system settings and diagnostics. |
admin | Manage companies and users. View system-wide analytics. Cannot access billing or system settings. |
Company Roles
Per-company access for organization management:
| Role | Permissions |
|---|---|
owner | Full company access. Manage team members, billing, settings. Can transfer ownership. All organizer permissions. |
organizer | Create and run events. Manage attendees and teams. Access event analytics. All content_editor permissions. |
content_editor | Edit event content and scripts. Manage audio assets. Preview but not run events. |
Event Roles
Per-event participation levels:
| Role | Permissions |
|---|---|
team_leader | Team coordination. Submit team completion. Help teammates. All attendee permissions. |
attendee | Participate in event. Access content. Submit help requests. Participate in hunt game. |
observer | View-only access to event progress. Cannot participate. Useful for stakeholders watching remotely. |
Company Management
Creating a Company
Platform admins can create new companies:
- Navigate to Admin → Companies
- Click Create Company
- Enter company details:
- Name - Company display name
- Slug - URL-friendly identifier
- Owner Email - Initial owner account
- Click Create
Managing Members
Company owners can invite and manage team members:
Invite Members
Go to Company Settings → Team. Enter email and select role. User receives invite email with setup link.
Change Roles
Click member name in team list. Select new role from dropdown. Changes take effect immediately.
Remove Members
Click member name, then Remove from Company. User loses all company access but account remains.
Transfer Ownership
Current owner can transfer ownership to another member:
- Go to Company Settings → General
- Scroll to Transfer Ownership
- Select new owner from member list
- Confirm transfer (requires password)
Warning: Ownership transfer cannot be undone. You will become an organizer after transfer.
Content Management
Content Templates
Content is organized into templates that define the event experience:
- Segments - Individual content units (audio + media)
- Phases - Groups of segments (briefing, training, etc.)
- Templates - Complete event flows
Audio Assets
Audio is managed through the content editor:
| Asset Type | Description | Generation |
|---|---|---|
| Base Clips | Complete narration segments | ElevenLabs TTS |
| Team Segments | "Team One", "Team Two", etc. | Atomic segments |
| Action Suffixes | "...has completed training" | Atomic segments |
Generating Audio
- Navigate to Admin → Audio
- Select content to generate
- Click Generate
- System uses ElevenLabs API to create audio
- Audio is cached and reused across events
Platform Administration
User Management
Super admins can manage all platform users:
- View all users across companies
- Assign platform roles (admin, super_admin)
- Disable/enable accounts
- Reset passwords
System Settings
Available only to super_admin:
- API Keys - ElevenLabs, analytics, etc.
- Email Config - SMTP settings for notifications
- Feature Flags - Enable/disable platform features
- Rate Limits - API and audio generation limits
Diagnostics
Monitoring and debugging tools:
- Real-time connection status
- Audio generation queue
- Error logs
- Performance metrics
Analytics
Company Analytics
Owners and organizers can view:
- Total events and attendees
- Completion rates
- Popular event times
- Team performance trends
Event Analytics
Per-event metrics include:
- Check-in timing and rate
- Phase completion times
- Help request frequency
- Team rankings and times
- Attendee engagement scores
Platform Analytics
Platform admins see aggregate data:
- Total platform usage
- Company activity
- Audio generation costs
- System performance
Security
Access Control
Security is enforced at multiple levels:
- Authentication - Supabase Auth with email/password
- Authorization - Row Level Security (RLS) policies
- API Routes - Role checks on all protected endpoints
- Event Access - Code-based for attendees, authenticated for organizers
Best Practices
- Use strong, unique passwords
- Grant minimum necessary permissions
- Regularly audit team member access
- Remove access when roles change
- Monitor unusual activity patterns
Troubleshooting
User can't access company
Verify they accepted the invite email. Check their role in team settings. Try removing and re-adding them.
Audio generation failing
Check ElevenLabs API key is valid. Verify rate limits aren't exceeded. Check system logs for specific errors.
Events not syncing
Verify real-time connections are active. Check browser console for errors. Try refreshing or reconnecting.
Next Steps
- Review the Architecture reference
- Understand the Audio System
- Explore the API Reference