Version v0.1 · Design draft · Covers player identity, standard clubs, private clubs, and tournament data
Modular monolith first, evolvable to dedicated databases · AI-assisted, deterministic execution
Core principles: establish clear tenant boundaries, data ownership, a unified access interface, and a verifiable migration workflow first; do not deploy a separate database per club at the outset.POFA's global identity domain stores player login accounts, external identity references (e.g., DUPR ID links), the organization directory, and tenant data routing. Standard clubs may use a shared database; clubs with higher privacy or deployment requirements may later migrate to a dedicated database or a supported customer-hosted environment.
A private club's membership roster, contact details, match records, and files must be stored and accessed within its authorization boundary. Files are typically kept in isolated object storage rather than placed directly in the relational database.
POFA Web / API
│
├── Identity & Authorization (global identity & authorization)
├── Tenant Router (club_id → data location)
│ ├── Shared PostgreSQL (shared schema + RLS)
│ └── Dedicated PostgreSQL (on-demand dedicated DB)
├── Object Storage (tenant-scoped file access)
├── Migration Runner (versioned migrations, validation, rollback)
└── Audit & Event Outbox (auditing & reliable sync)
| Data Category | Authoritative Location | Design Notes |
|---|---|---|
| Accounts, login identities | Global identity domain | A person may join multiple clubs; do not maintain separate, duplicated credential stores |
| DUPR ID linkage | Global identity domain | External identifiers must have verified ownership; they are not equivalent to internal primary keys |
| Club directory, tenant routing | Master database | Routing records store location, status, and version; database credentials are never stored in plaintext |
| Membership rosters, contact details | Owning club's data domain | Isolated via club_id and access controls |
| Matches, scores, draws/brackets | Owning tournament's data domain | Define authoritative records and cross-domain sharing rules |
| Uploaded files | Object storage | Managed per tenant authorization, encryption, and retention periods |
club_id; global user and global routing tables need not be forced to carry it. Composite unique constraints and foreign keys must match tenant boundaries.Freeze or restrict tenant writes → take a consistent snapshot → import into the target database → validate record counts, relationships, permissions, and business invariants → apply incremental changes → atomically switch routing → monitoring and rollback window → purge old copies per retention policy.
Pre-check UUIDs, tenant IDs, duplicate accounts, and business conflicts → import into a staging area → transform using reviewed mappings → validate foreign keys and business rules such as scores → switch routing → monitor → clean up the old database and replicas. Copying data and editing routing alone is not sufficient for a successful migration.
First verify the requester's identity and processing authority, identify applicable legal retention obligations, then carry out access revocation, primary database deletion, key destruction (where applicable), and backup expiry cleanup. Copies in caches, object storage, logs, and authorized shared locations must be handled separately. Whether crypto-erasure is effective depends on key isolation and how all copies are managed.
Compliance boundary: GDPR, CCPA/CPRA and similar deletion rights do not unconditionally cover all records; physical deletion in customer-hosted environments cannot be guaranteed by POFA cloud instructions alone. Controller, processor, and contractual responsibilities must be explicitly defined.A player may belong to multiple clubs. The global identity layer provides only a stable reference; private club data must not automatically enter public rankings merely because it shares the same player ID. Cross-database rankings and results aggregation require explicit authorization, data minimization, and withdrawal mechanisms.
Authoritative data such as scores remains in the owning tournament database. External synchronization uses Outbox events, idempotent consumers, and replayable processing records, avoiding any assumption that multiple databases can commit atomically together.
AI can read de-identified schemas, field comments, and permitted samples to propose field mappings, type conversions, duplicate identity candidates, and anomaly checks. It cannot infer from field names alone that club_id and organization_id are equivalent, and confidence scores cannot serve as migration acceptance criteria.
Schema / de-identified samples → AI proposes mappings
→ human review of ambiguous & sensitive mappings
→ versioned mapping rules
→ deterministic migration program (dry-run first)
→ record counts / foreign keys / hashes / score rules / permission checks
→ approved cutover + audit logSample data involving personal information must follow minimization principles, with the model service's data handling scope made explicit; high-risk fields should default to synthetic or de-identified samples.
| Phase | Implementation | Acceptance Criteria |
|---|---|---|
| V1 | Modular monolith, shared PostgreSQL, RLS, UUID, club_id, unified API | Cross-tenant access is denied; core tournament workflow passes end-to-end |
| V1.5 | Tenant routing abstraction, export/import, dry-run, migration auditing | Migrations are repeatable; failed validation blocks cutover |
| V2 | Dedicated databases on demand, independent keys, backup and restore, Outbox synchronization | Recoverable, rollback-capable, isolation is verifiable |
| Enterprise | Controlled customer self-hosting, explicit responsibility boundaries, deployment and upgrade agreements | Maintainable, auditable, compliant with customer contract requirements |
Status: design draft, not yet validated in POFA production. Recommend revalidating against real tournament workflows during the web implementation phase, once exam preparation concludes.