--- type: guide title: Admin — Categories description: How an admin lists, creates, edits, and deletes challenge categories from the /admin/categories page, including system-row protection and challenge-attached protection. tags: [guide, admin, categories, tester] timestamp: 2026-07-22T12:00:00Z --- # When this view is available The Categories admin page renders at `/admin/categories` for users with `role === 'admin'`. It is reached from the [Admin Shell](/guides/admin-shell.md) side-nav (categories are also embedded inside the General settings page). | Layer | File | Check | |------------------|----------------------------------------------------------------------------|------------------------------------------------------| | Client route | `frontend/src/app/app.routes.ts` | `/admin/categories` child of `adminGuard`. | | Client component | `frontend/src/app/features/admin/categories/categories.component.ts` | `AdminCategoriesComponent.ngOnInit` fetches the list. | | Client modals | `frontend/src/app/features/admin/categories/category-form-modal.component.ts` | Create / edit modal. | | | `frontend/src/app/features/admin/categories/category-delete-modal.component.ts` | Delete confirmation modal. | | Server route | `backend/src/modules/admin/admin-categories.controller.ts` | `GET/POST /api/v1/admin/categories`, `PUT/DELETE /:id`. | # How to access (tester steps) 1. Sign in as an admin user. 2. Open **Admin area** → **Categories** in the side-nav, or visit `/admin/categories` directly. (The page also renders below the General settings form at `/admin/general`.) 3. The page shows `Loading categories...` (`data-testid="cat-loading"`) while the list request is in flight, then renders one row per category sorted alphabetically by (lowercased) abbreviation. # Visual elements | Element | Selector | Purpose | |------------------------|--------------------------------------------|---------| | Page section | `[data-testid="admin-categories"]` | Root container. | | Add button (`+`) | `[data-testid="cat-add"]` | Opens the create modal. | | Loading | `[data-testid="cat-loading"]` | "Loading categories..." placeholder. | | Load error | `[data-testid="cat-error"]` | Red error text. | | List | `[data-testid="cat-list"]` | `