Skip to main content

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:

TriggerDescription
Journal SyncRe-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.

FlagDescriptionDefault
guildCreationAllow users to create new guildsfalse
characterCreationAllow users to create new charactersfalse

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

MethodPathAuthDescription
GET/admin/featuresPublicGet platform feature flags
PATCH/admin/featuresAdminUpdate feature flags
GET/admin/usersAdminList all users
GET/admin/organizationsAdminList all organizations
POST/admin/sync/journalAdminTrigger journal data sync
POST/admin/sync/roster/:orgIdAdminTrigger roster sync
GET/admin/jobsAdminList 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.