Skip to main content

Introduction

The Competition Factory represents a fundamental shift in how tournament management systems are architected. By separating tournament operations from infrastructure concerns, it enables unprecedented flexibility in deployment architectures while ensuring data integrity and long-term accessibility.

Configurable Tournament Operations

The Competition Factory is a collection of functions for transforming and mutating tournament records. Core engines capture the types of state transitions fundamental to running tournaments - draw generation, participant assignments, matchUp scheduling, score recording, and outcome determination.

Rather than hardcoding tournament structures or embedding business rules in database stored procedures, the factory is configured through JSON policy definitions and JSON-described tournament structures. This architectural approach provides:

  • Deployment Flexibility: Operations can execute on standalone clients, servers, or both
  • Platform Independence: An entire tournament management solution can run in a browser, communicate with a server, or operate entirely offline
  • Scalable Architectures: Server deployments support highly scalable asynchronous processing models in Node.js
  • Configurable Behavior: Reasonable defaults for all operations, with extensive configuration options through policy definitions
  • Consistent Results: The same configuration produces identical tournament structures regardless of where operations execute
  • Zero Dependencies: The factory has no runtime dependencies — every utility, from date/time handling to timezone conversion, is built on platform APIs (Intl.DateTimeFormat, Date). This eliminates supply-chain risk, keeps bundle sizes minimal, and guarantees the factory runs anywhere JavaScript runs without version conflicts or transitive vulnerabilities

Cross-Sport Applicability

While the Competition Factory was originally inspired by the Tennis Open Data Standards (TODS), the data structures and configurable operations apply to tournaments across many sports. The factory has already been successfully deployed across five racquet sports, demonstrating the universality of its approach. This cross-sport reality is now reflected in CODES (Competition Open Data Exchange Standards), the factory's expanded data model.

State Management and Extensibility

The Competition Factory includes synchronous and asynchronous state engines that provide services for:

  • Managing tournament record state throughout event lifecycles
  • Publishing subscriptions for real-time data synchronization
  • Notifications and logging for audit trails
  • Middleware integration for custom business logic

This architecture enables both real-time tournament management during active events and comprehensive historical analysis of completed competitions.

Liberation from Legacy Constraints

Traditional tournament management systems have created significant operational and financial burdens:

  • Vendor Lock-In: Dependence on active maintenance contracts to access historical data
  • Database Complexity: Reliance on specific database platforms, versions, and licensing
  • Schema Evolution: Business logic tightly coupled to database schemas that evolve over time
  • Deployment Overhead: Complex infrastructure requirements including third-party database licenses
  • Data Migration: Painful transitions when systems are upgraded or replaced

The Competition Factory eliminates these constraints through document-based data standards and configurable tournament operations, providing organizations with complete control over their tournament data and operational infrastructure.

Draw Type Extensibility

Beyond the pre-defined draw types, the factory's linked structure architecture enables tournament topologies of arbitrary complexity. Structures can be connected in any configuration — multiple qualifying stages feeding into different rounds, consolation brackets with custom feed patterns, or entirely novel formats.

Draw Type Innovations

Beyond draw type extensibility, the factory introduces formats never before possible with traditional tournament management systems:

  • DrawMatic — A probabilistic pairing algorithm for flexible-round events that dynamically adjusts pairings based on skill ratings, avoids repeat opponents, and respects team boundaries
  • Lucky Draw — Supports any participant count without requiring power-of-2 draw sizes, automatically handling odd-count rounds through "lucky loser" advancement
  • Draft Draws — Gives participants agency over their draw positioning through a tiered preference system, where unseeded participants nominate preferred positions after seeds are placed and preferences are resolved with full transparency

Scheduling

The Competition Factory provides two complementary scheduling approaches. Garman scheduling is a fully automated algorithm that assigns match times across courts while respecting participant recovery periods, daily match limits, and court availability windows — ideal for multi-day tournaments where hundreds of matches need to be distributed efficiently. Pro scheduling offers grid-based control with fixed time slots and follow-on support, comprehensive conflict detection (court double-bookings, participant timing clashes, match ordering violations), and fine-grained court order assignments — the model used by professional tour events.

Both approaches are driven by scheduling policies that define match duration estimates, recovery times, and daily limits per format and category, and by scheduling profiles — declarative, persistent configurations that map specific rounds to dates and venues across the entire tournament. Profiles can be built incrementally, validated before execution, and adjusted as conditions change.

The Temporal Engine extends this further by modelling court availability as continuous capacity streams, enabling "what-if" scenario simulation — tournament directors can test scheduling changes, visualize capacity, and detect conflicts before committing to the tournament record.

Publishing and Embargo

The Competition Factory gives tournament directors precise control over what information is publicly visible and when. Publishing operates at every level of granularity — tournament, event, draw, stage, structure, and individual rounds — so an organizer can, for example, publish qualifying draws immediately while holding the main draw under embargo until 3 AM the following morning.

Embargo extends this with time-based visibility gates. An embargoed element is marked as published but remains hidden from public-facing queries until the embargo timestamp passes — no cron jobs, no second mutation. This enables workflows like finalizing the order of play in the evening and setting it to go live automatically at a specific hour, or coordinating draw releases with media partners. Embargoes can be applied independently at any level: a draw, a stage within a draw, a structure, or even a single round's schedule data.

All embargo timestamps require explicit timezone context (UTC or offset), ensuring consistent behavior regardless of where the client or server is running. Admin queries always see the full publish state including active embargoes, while public queries respect embargo gates transparently.

Ranking Points and Scale Engine

The Scale Engine computes ranking points in real time from tournament results using configurable ranking policies. Points are calculated from finishing positions, per-win bonuses, champion/finalist awards, and quality win bonuses for defeating ranked opponents — all scoped by event type, draw size, tournament level, category, and stage.

Built-in policies cover ATP, WTA, ITF, and national federation systems, but any custom point table can be defined as a JSON policy. The engine handles complex draw topologies (feed-in consolation, compass draws, qualifying stages) by normalizing finishing positions across structures and selecting the maximum award.

For ranking list generation pipelines, the Scale Engine supports multi-tournament aggregation with counting buckets, rolling period windows, and configurable tiebreak criteria. applyTournamentRankingPoints() persists computed awards as scale items on participant records, enabling bulk processing workflows where tournaments are fed through the pipeline sequentially to produce cumulative ranking lists.

Learn More