Admin Documentation

Documentation for the BattleScore admin backend utilities and supporting infrastructure.
Admin Backend Restricted Access
/public_html/admin/

The admin area is currently a backend-focused utility surface used for maintaining core data, tournament configuration, and user records. It is less mature than the app and TO areas and does not yet have a dedicated frontend UI layer.

Overview

This documentation section covers the current admin endpoints that support:

  • runtime/bootstrap infrastructure
  • authentication and access control foundations
  • core game data management
  • tournament configuration
  • user account administration

Current architecture

Infrastructure
├── _bootstrap.php
├── _auth.php
└── login.php

Core Data
├── races.php / race_edit.php
├── factions.php / faction_edit.php
└── faction_units.php / faction_unit_edit.php

Configuration
└── tournaments.php / tournament_edit.php

Identity
└── users.php / user_edit.php

Admin categories

Category Description Examples
Infrastructure Runtime and security foundations for admin execution _bootstrap, _auth, login
Core Data Maintains the hierarchical game reference model races, factions, faction_units
Configuration Controls tournament-level setup and behaviour tournaments
Identity Manages user accounts and access-sensitive records users, user_edit

Hierarchy of core data

Race
└── Faction
    └── Faction Unit

This hierarchy underpins multiple areas of the system, including imports, army building, filtering, and gameplay-related interpretation.

Key characteristics

  • endpoint-driven rather than UI-driven
  • directly impacts live system data
  • currently lacks dedicated role-based admin enforcement
  • well-suited for future expansion into a proper admin UI

Current risks

  • no role-based access control separation between standard users and admins
  • limited auditability of changes
  • no consistent soft delete / lifecycle strategy across entities
  • high-impact write endpoints for users and tournaments

Recommended next steps

  • introduce explicit admin role enforcement
  • add audit logging for all write endpoints
  • define delete / soft delete / lock strategies
  • build a dedicated admin frontend over this endpoint layer

How to use this documentation

  • use the left navigation to browse endpoint groups
  • review infrastructure files first
  • then move through core data, configuration, and identity
  • treat write endpoints as high-risk operational tools