Tournament Organiser (TO) Documentation
Documentation for all TO-facing pages and workflows within BattleScore.
Frontend
TO
Workflow Driven
/public_html/TO/
Overview
The TO (Tournament Organiser) section provides a dedicated interface for managing events, entrants, and armies outside of the standard user experience.
It is architecturally separate from the main app UI but shares:
- Authentication system
- API layer
- Data model
Structure
- One documentation page per TO feature
- HTML + JavaScript documented together
- Shared infrastructure via
_api.js
Core workflow
Events
└── Event Edit
└── Entrants
└── Entrant Army
└── Units
The TO interface is structured as a hierarchical workflow, with each page progressively drilling into more detailed management tasks.
Page types
| Type | Description | Examples |
|---|---|---|
| Navigation Hub | Top-level entry point | Events |
| CRUD Page | Create/update entities | Event Edit |
| Management Hub | Controls sub-workflows | Entrants |
| Workflow Controller | Complex multi-step interactions | Entrant Army |
| Infrastructure | Shared technical layer | _api.js |
Core dependencies
TO/_api.js– API + auth helperapp_config.js– environment configuration- Shared header/footer fragments
- TO stylesheet
Design principles
- Workflow-first navigation
- Single-responsibility pages (where possible)
- Shared infrastructure layer
- Consistent API interaction patterns
Future enhancements
- Split complex workflow pages into components
- Add pagination for large datasets
- Introduce server-side filtering
- Unify app and TO shared infrastructure