## Description
Add a new "Formats" management page to the admin section (
/admin/formats
) that allows team administrators to create, edit, activate/deactivate, and delete game formats for their team. This should mirror the existing Archetypes admin page (
/admin/archetypes
) in terms of functionality and UI patterns.
Formats are team-scoped entities that define different ways to play a game (e.g., Standard, Modern, Legacy for MTG). Currently, formats can be managed via the API but lack a dedicated admin UI.
## Technical Context
Backend (Already Complete):
  • The
    Format
    model exists at
    /apps/backend/apps/games/models/format.py
  • Full CRUD API is available via
    FormatViewSet
    at
    /apps/backend/apps/games/views/format.py
  • API endpoints:
    GET/POST /api/v1/formats/
    ,
    GET/PUT/PATCH/DELETE /api/v1/formats/{id}/
  • Format model fields:
    name
    ,
    slug
    (auto-generated),
    description
    ,
    game
    (FK),
    is_active
  • The model inherits from
    TenantModel
    (team-scoped) and
    ActivatableMixin
  • Missing:
    The backend ViewSet does NOT have
    activate
    and
    deactivate
    custom actions (unlike ArchetypeViewSet)
Frontend (To Be Created):
  • Need new page at
    /apps/frontend/src/app/(app)/admin/formats/
  • Follow the established pattern from
    /apps/frontend/src/app/(app)/admin/archetypes/
## Acceptance Criteria
  • [ ] Backend:
    FormatViewSet
    has
    activate
    and
    deactivate
    POST actions
  • [ ] Frontend:
    /admin/formats
    page renders with SSR prefetch
  • [ ] Frontend: DataTable displays formats with name, game, description, status columns
  • [ ] Frontend: "Create Format" dialog allows adding new formats
  • [ ] Frontend: "Edit Format" dialog allows updating name and description
  • [ ] Frontend: Activate/Deactivate toggle works with optimistic updates
  • [ ] Frontend: Delete confirmation dialog works
  • [ ] Frontend: Status filter (Active/Inactive/All) works
  • [ ] Navigation: "Formats" tab appears in admin sub-nav
  • [ ] Design System: Page follows gaming-inspired design (sharp corners, borders, neon colors)
## Questions for Stakeholder
  1. Permissions:
    Should formats management require a new
    formats.manage
    permission?
  2. Delete behavior:
    Should deleting a format be allowed if decks/archetypes are associated?
  3. Ordering in nav:
    Where should "Formats" appear in the admin sub-nav?
## Estimated Complexity
M (Medium)
- Follows established archetype pattern