Admin Panel
The admin panel provides platform-level management tools for system administrators. It is separate from guild officer tools and requires the isAdmin flag on the user record.
Access Control
Admin routes are protected by @RequireAbilities({ action: Action.Manage, subject: 'all' }), which resolves to the platform admin check. Regular guild officers cannot access admin features.
Features
User Management
View and search all platform users. Displays:
- Display name, linked accounts (Discord, Battle.net)
- Last login timestamp
- Admin flag status
Organization Overview
Lists all organizations with:
- Name, type, alias
- Active/archived status
- Member count
- Creation date
Sync Triggers
Manually trigger background sync jobs:
| Trigger | Description |
|---|---|
| Journal Sync | Re-sync expansion, instance, and encounter data from Blizzard |
| Roster Sync (per guild) | Force refresh guild roster from Battle.net API |
Sync operations run as background jobs and report progress via WebSocket.
Platform Feature Flags
Admins can toggle platform-wide feature flags that control whether certain capabilities are available to all users. Flags are stored in a singleton PlatformConfig row with a JSON features column.
| Flag | Description | Default |
|---|---|---|
guildCreation | Allow users to create new guilds | false |
characterCreation | Allow users to create new characters | false |
When a flag is disabled:
- The corresponding create button is hidden from the UI
- Direct navigation to the create route redirects away
- New flags default to
false(opt-in)
The GET /admin/features endpoint is public (no auth required) so the frontend can check flags before the user logs in. The PATCH /admin/features endpoint requires admin privileges and accepts a partial object that is merged with existing flags.
Job Queue Monitoring
View the status of background jobs:
- Active/waiting/completed/failed counts
- Individual job details and error messages
- Retry failed jobs
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /admin/features | Public | Get platform feature flags |
| PATCH | /admin/features | Admin | Update feature flags |
| GET | /admin/users | Admin | List all users |
| GET | /admin/organizations | Admin | List all organizations |
| POST | /admin/sync/journal | Admin | Trigger journal data sync |
| POST | /admin/sync/roster/:orgId | Admin | Trigger roster sync |
| GET | /admin/jobs | Admin | List background jobs |
Frontend
The admin panel is accessible at /admin and includes:
- Feature flag toggles (guild creation, character creation)
- Dashboard with platform statistics
- User list with search
- Organization list
- Sync controls with real-time progress indicators
- Job queue viewer
All admin pages are wrapped in an admin route guard that checks user.isAdmin before rendering.