You do not have permission to view the change log.
- A dark hero (logo, the “Helice Tournament Management System” tagline, a “Global Standard” badge, and Join Now / Learn More buttons).
- An “Elevating Helice” section (target photo + checklist: real-time scoring, tournament management, registration, financial reporting).
- A “For Clubs & Organizers” row of three cards (Tournament Management, Financial Control, Shooter Management) and a Competitors section with four benefit boxes (Live Scores, Registration, History, Rankings) plus a Create Your Profile button.
- The site front page, shown in the public shell. Join Now and Create Your Profile open the create-account page; Learn More opens the About page.
- A card per published tournament (name, dates, host club) with a search box and Upcoming / In Progress / Completed filter tabs, plus Grid/List view on desktop.
- Each card has View Tournament; completed events also show View Results and open events show Register.
- A single tournament page shows General Information, Ring Configuration, About, Schedule of Events (by day), Amenities & Pro Shop, competitor/event counts, registration status, flyers, lodging links, and competitor notes.
- Search and the status tabs filter the cards instantly. Register opens the public registration flow for that event; View Results jumps to its scores on the Results page.
- A card per scored tournament (name, dates, club) with search and Current / Past tabs.
- Opening one shows the same standings as the staff View Results: a tab per event plus USHA HOA, FITASC HOA, shootoffs, and Awards, each with a View dropdown (By Score / Concurrent / Gender / name) and a sortable table (rank, bib, name, class/gender, hits, targets, %).
- A toolbar with Print results, Save PDF, Save PNG, and Export CSV, plus a scope dropdown for one section or all.
- Only tournaments with posted scores appear. Tabs switch without leaving the page; the CSV export is meant for USHA-style reporting. Events with nothing scored say so.
- A card per club (logo, name, city/state, phone, email, View Club, and Website when set) with search and a Grid/List toggle.
- A club page shows Club Information (address, phone, email, website), an optional About, a Contacts list (name, role, email, phone), and a Tournaments list linking to that club’s events.
- Search filters as you type. Phone numbers are tap-to-call; email and website open mail or a new tab; tournament names link to each public event page.
- A card (logo, Get In Touch heading) with first name, last name, email, phone (optional), subject, and message fields and a Send Message button; a thank-you message replaces the form after sending.
- It validates the fields, saves the inquiry, and emails the team. If the email is new it can also create a contact record and a basic account. The message then appears under WP Admin → Helice Scores → Inquiries.
- A “Welcome Back” card: username-or-email, password (show/hide), a Remember me for 30 days checkbox, a Forgot Password? link, a Sign In button, and a Create Account link.
- A dedicated login page (not the default WordPress login). Success goes to My Dashboard; a failed attempt shows a message. After login the header switches to My Dashboard + Log Out and the HS Left Menu becomes available.
- Published counts for Clubs, Tournaments, Contacts, and Events (each links to its list), total users, the plugin version, and a note that the live app runs on the front-end portal.
- Editor-level and up.
- Title, Regions (filterable), and date columns; Add New opens a basic editor with a membership-plan picker (Free/Basic/Pro/Premier). There is no delete here — records are protected. Real club setup happens in the portal.
- Editor-level and up.
- Title, Tournament Status, and date columns; the editor is sparse (schedules, events, competitors, and scoring all live in the portal). Delete is removed. Handy for confirming a record exists.
- Editor-level and up.
- Opening one shows a Contact Details form (name, gender, date of birth, USHA number, email, phone, emergency contact, full address with zip lookup) and a link to the matching login. View opens the public profile. Delete is hidden. Registrars normally use Competitor Management instead of this screen.
- Editor-level and up.
- Title and date; the edit screen is minimal — event setup, rosters, and scores live in the portal’s Event Management. Delete is removed. Mainly used to verify a record exists.
- Editor-level and up.
- Columns for Subject, Name, Email, Phone, a Message preview, Status (New / Read / Replied), and Date. Opening one shows full details (including IP and links to a related contact or user), flips New to Read, and offers Reply via Email.
- Editor-level and up.
- A progress bar and dozens of grouped checkboxes (public site, portal walkthrough, admin items, reports, financial rules, profile checks) with a Notes area, Save Checklist, and Reset All.
- Administrators only.
- Editable Typography, Color Palette, Components, and Phone & Address Rules with live previews and per-section notes, a read-only specifications summary, and Save Design. Changes drive styling across the portal.
- Administrators only.
- Published/trashed counts per record type and a Run Fresh Start that archives clubs, tournaments, events, and purse options (and trashed contacts only). You must type the exact confirm phrase to enable it; it snapshots a backup first and archives rather than truly erasing.
- Administrators only.
- A Club Roster (plan, status, term-end date, payment provider, subscription ID, and an inline Override) and Payment & Gateway Settings (billing product IDs per tier, a webhook secret, and an auto-drop-lapsed-clubs-to-Free switch).
- Administrators only (editors who open it see a blank page).
- Four stat tiles (Total Score, Avg. Accuracy, Events Won, Rank), an “Average scores over last 3 months” chart, and a recent-events table.
- A static screen for now — values are placeholders and are not wired to live numbers yet. Administrators only.
- Four tiles (Total Clubs, System Alerts, Active Tournaments, Total Users), database/server status, a 24-hour activity log, a Management Actions panel (Create New Club, Find User, Duplicate Contacts Audit, View Public Home), and an Active Clubs list.
- The club/tournament/user counts and the Active Clubs list are live; the meters, alerts, and log are sample placeholders for now. Administrators only.
- A Re-scan button, summary counts, a Manual Merge area to compare two records, and suspected-duplicate groups with a reason badge (Same Email, Same Phone, Same Name, Similar Name, Nickname Match).
- A “Keep as Separate (Family)” option (Spouses, Parent & Child, Siblings, Other Family, Unrelated).
- On open it scans everyone and groups likely duplicates by email, phone, exact/close names, and nicknames.
- Merging moves the duplicate’s tournament entries, money, bib, and check-in onto the record you keep, re-links their login, fills blanks, and archives the duplicate (never permanently deleted).
- “Keep separate” remembers the relationship so it will not be flagged again. Administrators only.
- System Setup — templates for creating things: Club Registration, Create Tournament, Create Event, Purse Option Builder (standard daily/HOA/Calcutta purse templates), and the Design Specification reference.
- User Management — account/identity templates: Create Account, Login, Forgot Password, Tournament Entry, the full Competitor Registration flow (member search, events + purse options, payment summary), and the User Profile form.
- Reports & Forms — the printable Blank Registration Form (live) plus previews/placeholders for Shooter, Daily, HOA, FITASC HOA, and Calcutta reports (the working reports live on the Reports & Forms page).
- Operations & Scoring — interactive demos: the Score Entry Grid, Score Cards, the Payout Simulator and Tournament Simulator (test purse/payout math with sample shooters), and the Live Payout Monitor mock.
- Commerce & Shop — Add Inventory Item (the ProShop item form: name, category, price/cost/stock/SKU, tax mode, active/rental) and a Payment Manager placeholder.
- System — reference, not forms: Change Log (the audit trail), Constitution, AI Prompts, System Map (this page), and Handoff (the refactor documents).
- Tabs switch instantly; most panels are previews — real saving happens on the working pages. The Change Log tab is live and shows who changed what and when. Administrators only.
- A Club Roster table to set each club’s plan (Free, Basic, Pro, Premier), status, term-end date, and subscription reference.
- A Payment & Gateway Settings panel (billing product IDs for Basic/Pro/Premier, a billing webhook secret, an “enforce lapsed memberships” switch, and a “public plans page” switch).
- Plans normally update automatically when a club pays through the billing system, but you can override any club by hand here.
- Administrators bypass all plan limits, so this is also where plan-gated features are tested. Administrators only.
- Dashboard — tiles (My Tournaments, Avg Score, Ranking), a performance-history table, award/analytics shortcuts, upcoming events, and a “Club Owner?” prompt.
- Tournaments — Current / Upcoming / Past lists of the events you’re entered in; clicking one opens your statement for that tournament (My Competitions).
- Profile — your photo (with cropping), account status, and edit forms for personal, contact, and competition info.
- Shows the tournaments where you’re on the roster; saving your profile updates your record and syncs to the email/CRM system.
- No money changes here; Avg Score and Ranking are placeholders for now.
- Overview — your contact info and a scores summary for the selected tournament.
- Events & Options — the events and purse options you’re entered in, with editing where allowed.
- Scores — your per-race target grids.
- ProShop — a space to browse/pre-select shop items (no purchasing here).
- Financials — your breakdown, winnings, and read-only payment/payout history.
- A tournament picker at the top chooses which event you’re viewing; the page pulls together your entries, options, scores, and money.
- It’s view-only for the competitor — payment entry and shop purchasing are on the registrar/admin side.
- A label and a dropdown of your clubs (name + location). Picking one sets it as your active club for this browser, clears the tournament if it belonged to a different club, and opens the Club Dashboard.
- The choice is per-browser, so different staff or devices can work in different clubs at the same time.
- A header (club name, New Tournament), tiles (Active/Upcoming/Completed tournaments, average competitors), an Active Tournaments table with Current/Upcoming/Past filters and Select buttons, and a sidebar (management shortcuts, club status, quick-start steps).
- Lists the tournaments that belong to your active club; selecting one makes it active and opens the Tournament Dashboard. Available on every plan; a couple of tiles are placeholders.
- A club info card (address with map link, phone/email/website, inline editor with ZIP-to-city/state auto-fill), a Club Contacts card (roles, system access, add/edit, email/call), a list of the club’s tournaments, logo upload, club statistics, and quick-contact buttons.
- Everything applies to your active club and saves to that club’s record; contact roles stay in sync with their logins. Typing a ZIP auto-fills city and state.
- Dashboard — KPI tiles (Active Rentals, Items in Inventory, Sales Tax Collected, Today’s Revenue) and shortcuts to the other tabs.
- ProShop Items — your catalog with add/edit (name, category, price/cost/stock/SKU, tax mode), search/sort/grid-list, sales KPIs, and a Sales Tax Report.
- Rental Management — Overview / By Item / Calendar views of rental gear with status and a rentals table.
- Sales & Transactions — a point-of-sale “Make Sales” screen; customers come from the active tournament’s roster.
- Adjustments — comps, credits, and discounts.
- Sales Tax — a tax-rules table and an Add Tax Rule form (name, type, rate, categories).
- A Pro-plan feature (hidden on lower plans). Items and sales belong to the active club and can be filtered by the tournament you pick.
- A label and a dropdown of the active club’s tournaments (or a prompt to pick a club first). Picking one sets it active for this browser and opens the Tournament Dashboard.
- Because it’s per-browser, two registrars on different devices can each be in a different tournament at the same time.
- A header (name, dates, club, status, Edit Details), a Live Alerts widget, and five money tiles: Competitors, Fees (Entry/USHA), Purchases (taxable/sales tax), Purse Money, and Calcutta Pot (Entry/Purchases/Lucky Draw).
- Nine action cards (Event Management, Manage Competitors, ProShop, Financials, Reports & Forms, Scores, Shootoffs & Awards, Live Display, Communications), a tournament overview with ring status, a targets table with daily totals, the event list, and Checked-In / Registered competitor panels.
- All totals are for the active tournament and exclude canceled competitors. The Live Alerts widget refreshes itself every few seconds during the event.
- Read-only cards (general info, ring configuration, about, schedule of events, flyers, lodging, notes) and a stats sidebar.
- A full setup form: registration dates, practice/buffer days, rings, description, flyers, lodging links, the schedule, amenities, notes, international currency/exchange, online-registration discount, and USHA-fee options.
- “Create New Tournament” or “Edit Details” opens the form; saving writes the tournament’s settings. Available from the Basic plan up.
- An event list (name, date/time, practice, status, targets, entry/USHA fees, badges, Manage/Edit/Delete) with a purse-options quick look, plus the combined HOA Trophy, FITASC HOA, and Calcutta rows.
- An event detail view (stat cards, registered shooters/competitors, purse options, contributing events, full settings) and an inline Create Event form with a purse builder.
- Each event carries its date/time, status, targets, fees, category, which aggregates it feeds (HOA/FITASC/Calcutta), and its scores.
- Side-event and non-sanctioned events automatically drop the USHA fee. Available from the Basic plan up.
- Registered — everyone entered and active, with bib #, name, gender, age, status, and per-row actions.
- Pending — entries not yet completed or confirmed.
- Canceled — withdrawn competitors (bib freed) — can be restored.
- Guest — non-competing guests, e.g. Calcutta buyers.
- A top bar (tournament, status, Total Due) and a toolbar: search, classification + checked-in/registered filters, Batch Registration, Add Competitor, Export, Print Score Cards, Print List.
- Per-row action icons (open dashboard, edit profile, payments, registration, scores, check-in toggle, cancel/restore). Add Competitor opens the full registration form (contact search, events + purse options, payment summary, Add Another).
- Scoped to the active tournament; adding a competitor checks for duplicates and lets you reuse an existing person.
- Canceling frees the bib and removes them from batch registration, reports, Calcutta, and scoring (restorable). Available from the Basic plan up.
- An info card (basic details, registration, configuration) and report cards: shooter receipts (batch or individual), blank/filled/individual registration forms, score cards, shooter list, daily reports, HOA reports, FITASC HOA reports, Shootoffs & Awards, Calcutta reports, and financial tools (payout/tournament simulators, live payout monitor).
- Report windows let you pick the event, type, and size, then Print, Save PDF, or Save PNG.
- Daily reports come in several styles (event results, summary, shooter summary, detailed payouts, winners, by concurrent); HOA, FITASC HOA, and Calcutta have their own report types. All reports are for the active tournament.
- Enter Scores — the list-and-card method. Each registered shooter shows bib, name, age/gender class, and a running “15/30” hits total with an Edit Score button (or FINALIZED if locked). Editing opens a pop-out card that starts blank: tap the one miss on a line of five and the rest auto-fill as hits, or use Hit All / Miss All / Reset per line; each target is blank, green (hit), or red (miss). You can search and jump to another shooter inside the card, then Update & Close or Update & New to roll to the next. Search, sort (#/first/last/score), Print Score Cards, and Print List sit at the top.
- Live Scoring — the ring/tablet method for scoring at the line. The registrar’s hub has a Ring Setup panel (targets per ring, “cranks” and reload stops, a referee per ring, a bib range per ring) and one card per ring with View Ring (opens the tablet controller in a new tab) and a printable QR link so a referee can score without a WordPress login. The tablet view is a focused screen: a Now Shooting bar (bib/name/score, search or type a bib), a target grid for the current crank only (five per row, tap to cycle blank→hit→miss), and On Deck / In the Hole queues that advance automatically. The scorer taps Send to Competitor, the shooter confirms, and that crank’s hits merge into the official score. Call for Help and Refill Started page staff; help/refill/protest activity is logged per ring.
- View Results — live standings for every event plus USHA HOA, FITASC HOA, shootoffs, and award tabs. A View dropdown reorganizes the same scores (By Score, By Concurrent, By Gender, By name); tables show rank badges, bib, name, class/gender pills, hits, targets, and %. HOA tabs add a column per contributing day and a total. Print, Save PDF, Save PNG, and Export CSV are available, scoped to one event or everything.
- Shootoffs & Awards — resolve ties and assign trophies. Pick the events and places (1st–6th) that count; tied competitors are flagged (e.g. “2-WAY TIE”) with a shootoff-score field, and the highest shootoff hits wins. The Awards sub-tab sets a ceremony order and a Winner per category (with manual override) and prints ceremony-ready sheets. This never changes raw target scores — only tie-breaks and trophy assignments.
- Scores save per event and are the same numbers shown on the live TV board, public results, and competitor statements; canceled competitors and guests are excluded from entry lists.
- When an event is closed or finalized, its scores lock everywhere until a registrar reopens it.
- Scores feed the live TV/cast board (a Leaders sidebar plus an all-shooters grid with one column per crank) which refreshes every few seconds and can be cast full-screen.
- A toolbar (total pot, entered/unsold, refresh/import/reset/live display/reports/save) and a Live Auction Controller: what’s being bid on, cast-screen launchers, a panel to pick the shooter(s) to sell, an active-sale panel (bid amount, high bidder, SOLD/Clear/Undo, add a guest), and a Lucky Card Pot stepper.
- An Auction Entries table (shooter, buyer, amount, verified, paid, split), an Auction Stats sidebar (shooters sold, average/highest bid, buyer/shooter split, entry fees, totals, collected, to collect), and a Buyers panel.
- Works from the competitors enrolled in the Calcutta. As you sell, the totals and pot update live and the TV cast view shows a “SOLD” animation.
- Rows that are verified and paid lock so they can’t be changed. A Pro-plan feature; the controller requires a signed-in registrar.
- A card per event (targets, status, times, auto-rotate settings, View Live Scores; Calcutta events launch the live auction cast).
- Other cast views: schedule of events (with a notice editor), on-deck shooters, on-deck controller, tournament committees, role-alert QR stations, and the tablet ring-scoring view; plus usage tips.
- Launching opens a read-only scoreboard in a new tab that refreshes itself; you can set it to auto-rotate through shooters. A Pro-plan feature.
- Competitors: First-Time Login, register, request a number, statement, profile, results.
- Clubs: order of work, select club/tournament, create event (Daily Target 0, Walk-Up toggle, payment methods), events and purses, roster/bibs, Walk-Up day-of, money in, scoring, shootoffs, pay winnings, reports, Calcutta, Live TV/ProShop, standing rules.
- Each section is the job, in order, with the fields and rules that change money or eligibility. Any logged-in user sees Competitors. Clubs only if they can open Club Management. Contact Us stays next to it.
- First/last name, email, phone, subject, and message fields with a Send button, and a thank-you confirmation.
- Anyone can submit it (signed in or not). It creates a support inquiry (and, if the email is new, a contact record) and emails the Helice team.
- A single “Log Out” link at the bottom of the sidebar (also in the public header when you’re signed in).
- Standard sign-out — it clears your session and sends you to the site home.
- Competitor payments (entry / options / ProShop), payouts and winnings, complimentary credits, and a live payout monitor.
- A cashier station: daily till setup and daily reconciliation (open and close the drawer, count, receipts).
- Totals are server-confirmed and audit-logged. Entry, USHA, and ProShop money flows through the store checkout; purse-option and Calcutta money is tracked here as cash/manual. Basic plan and up; the fuller financial tools are a Pro feature.
- A branded email composer and an SMS sender aimed at the tournament’s roster.
- Sends through the site’s mail and the connected text service. Registration confirmations and admin notifications also send automatically from registration. A Premier-plan feature.
- Help calls (medical / machine / competitor), filed protests, and machine-refill events — each logged and resolvable.
- A notification-recipients list and role/QR opt-in so referees, refill duty, and the protest committee get the right pings (today on-screen and printable QR; group messaging is planned).
- Raised from the ring tablet (Call for Help, Refill Started, File Protest) and surfaced in the Tournament Dashboard Live Alerts widget and the staff-alert views. People opt in by scanning a QR code — no login needed.
- Junior / sub-junior eligibility, a grade level on the competitor, youth-specific scoring overrides, and a youth dashboard / awards view.
- Per-race toggles for whether an event counts youth and sub-junior, plus youth-specific event management.
- Age class comes from date of birth; the youth settings and grade levels adjust which awards a young shooter competes for. Set within event setup and the competitor record.
- Live scoreboard, on-deck shooters and an on-deck controller, the schedule of events (with a notice editor), tournament committees, role-alert QR stations, and the Calcutta live cast.
- Each opens read-only in its own tab, refreshes itself, and can auto-rotate.
- Driven by the registrar’s controllers; changes (scores, SOLD, on-deck) push to every cast screen, even across devices. A Pro / Premier feature.
- Backup Now, a list of snapshots (automatic / manual / pre-restore), Download, and Restore (type RESTORE to confirm — it snapshots first and only adds rows back, never deleting newer ones).
- A buried Emergency Permanent Purge (heavily guarded) for the rare true delete.
- A full snapshot runs automatically every day (kept about 30 days), with a catch-up if a day is missed. Nothing is ever hard-deleted — deletes become a hidden / archived status. Administrators only.
- A scan that finds orphaned events / scores and an execute step that recreates the tournament around them.
- A last-resort repair used alongside the Data Vault. Administrators only.
- Install / ‘Download for offline’, an online/offline banner and sync-status indicator, and a local copy of the tournament (events, options, roster, ledger, scores).
- Offline scoring, new walk-up registration, and option/bib edits queue locally and replay on reconnect.
- Queued actions carry a one-time key so a replay can never double-apply, and they record the real time they happened. Built for registrars; payments/payouts and two-registrar conflict handling are not offline yet.
- Create Account and Forgot Password (reached from Log In), the About page (Learn More on Home), and an optional public Plans / Pricing page when a club turns it on.
- All render in the public shell. Create Account makes a new login; the Plans page stays hidden unless it is enabled.
Cover note for Spencer
SPENCE-COVER-NOTE.md.# Cover note for Spencer — Helice Scores refactor handoff *(Julie → Spencer. Forward to Fernando with your own instructions. Plain-text version below the line for easy copy/paste into email.)* --- Spence — Here's the detailed handoff for Fernando we talked about. My dev agent produced it directly from the live codebase, so it's accurate and complete (not a guess from memory). **Two files, both in the GitHub repo for the plugin:** 1. **`HANDOFF-FOR-FERNANDO.md`** (repo root) — the full blueprint: what the product is, the personas, every workflow, the data model + proposed target schema, the business rules, the money/audit requirements, the offline architecture (what's built + what we learned), the UI/component plan, the platform integrations to adopt, and an honest "known fragilities" section. 2. **`docs/handoff/INVENTORY.md`** — a **machine-extracted, omission-free** inventory of everything in the plugin: all 7 CPTs, all 150 AJAX endpoints, 70 shortcodes, 436 post-meta keys, and 27 options. It's generated by `scripts/extract-handoff-inventory.py`, so Fernando can re-run it any time to re-verify against the code. **The short version of where it stands (matches your read on our call):** - It's feature-complete and field-validated at real money events — strong UX and breadth. - The architecture is the problem, not the behavior: **one 116k-line file**, and the "database" is **436 post-meta keys, many serialized PHP arrays** (roster, ledger, audit log), with **no schema and no admin UI** (that's why the Clubs screen looked empty — the data is there, just stored as unmanaged meta and surfaced only through the custom front end). - **The refactor target:** normalize those serialized blobs into real, append-only/versioned records (this also fixes the multi-registrar concurrency and dispute-audit needs), build a reusable component library to match our Design Style, and reuse the platform (FluentCRM, Stripe gateway, WhatsApp/Xernio, MinuteLaunch Mail) instead of the reinvented pieces. - **Non-negotiables** are spelled out in the doc: uncapped/exact payouts, append-only audit (who/what/when, incl. true offline time), full offline reliability with idempotent sync + temp→real ID reconciliation, and behavior parity first. The doc explicitly preserves the hard-won domain logic (uncapped payouts, tie handling, age/gender concurrents, race-start cutoffs, cancellation memory/restore, Calcutta/auction flow). The in-file changelog at the top of `helice.php` is effectively the full decision log if Fernando wants the "why" behind any rule. Whatever Fernando needs next — screen-by-screen screenshots, a per-shortcode UI map, or a deeper drill on any subsystem — say the word and I'll have it generated. — Julie --- ## Plain-text email version Subject: Helice Scores — refactor handoff for Fernando Spence, Here's the detailed handoff for Fernando. My dev agent generated it straight from the live codebase, so it's accurate and complete. Two files, both in the plugin's GitHub repo: 1) HANDOFF-FOR-FERNANDO.md (repo root) — the full blueprint: product overview, personas, every workflow, the data model + proposed target schema, business rules, money/audit requirements, the offline architecture (built + lessons), the UI/component plan, platform integrations to adopt, and a candid "known fragilities" section. 2) docs/handoff/INVENTORY.md — a machine-extracted, omission-free inventory: all 7 custom post types, 150 AJAX endpoints, 70 shortcodes, 436 post-meta keys, 27 options. Generated by scripts/extract-handoff-inventory.py so it can be re-verified against the code at any time. Where it stands (matches our call): - Feature-complete, field-validated at real money events; strong UX/breadth. - Architecture is the issue, not behavior: one ~116k-line file; the "database" is 436 post-meta keys, many serialized PHP arrays (roster, ledger, audit log), with no schema and no admin UI (that's the empty Clubs screen — data is present, just unmanaged meta surfaced only via the custom front end). - Refactor target: normalize those blobs into structured, append-only/versioned records (also fixes multi-registrar concurrency + dispute audit), build a reusable component library to match our Design Style, and reuse the platform (FluentCRM, Stripe gateway, WhatsApp/Xernio, MinuteLaunch Mail) instead of the reinvented pieces. - Non-negotiables in the doc: uncapped/exact payouts, append-only audit (who/what/when incl. true offline time), full offline reliability with idempotent sync + temp-to-real ID reconciliation, behavior parity first. The doc preserves the hard-won domain logic (uncapped payouts, tie handling, age/gender concurrents, race-start cutoffs, cancellation memory/restore, Calcutta/auction). The in-file changelog at the top of helice.php is the full decision log for the "why" behind any rule. If Fernando wants screenshots, a per-shortcode UI map, or a deeper drill on any subsystem, I can have it generated quickly. Thanks, Julie
Handoff document (for Fernando)
HANDOFF-FOR-FERNANDO.md.# Helice Scores — Refactor Handoff for Fernando
**Prepared by:** Julie Clark's development agent (the "current LLM developer")
**For:** Spencer Forman (CTO) → Fernando (refactor lead)
**Date:** 2026-06-26
**Current build:** v13.0.418 — single-file `plugin-files/helice.php`, **~117,100 lines, ~9.5 MB**
> **Purpose.** This document is the complete blueprint for rebuilding Helice Scores on a modern, component-based, properly-schema'd platform **without losing the hard-won domain logic and UX**. The product is feature-complete and field-validated at real money tournaments; what needs replacing is the *architecture* (single file, serialized post-meta as the database, bespoke-per-page UI), not the *behavior*.
>
> **Companion file:** [`docs/handoff/INVENTORY.md`](docs/handoff/INVENTORY.md) is a **machine-extracted, omission-free** list of every CPT, AJAX endpoint, shortcode, option, PHP class, REST route, cron event, custom hook, and post-meta key, generated by `scripts/extract-handoff-inventory.py` (re-run any time to re-verify). This narrative references it; that file is the authoritative inventory.
---
## How to read this document
1. **Sections 1–3** = what the product *is* and *does* (domain, roles, workflows). Read first.
2. **Sections 4–6** = the data model, business rules, and money/audit logic. This is where the refactor risk and value concentrate.
3. **Section 7** = offline requirements + everything we already learned building it.
4. **Section 8** = UI/UX and the component system to build.
5. **Sections 9–10** = platform integrations to adopt (kill duplication) and known fragilities ("where the bodies are buried").
6. **Section 11** = the data-protection / backup-restore / lifecycle subsystem (preserve these guarantees — this is the answer to "don't lose tournament data").
7. **Section 12** = remaining runtime/platform surfaces (classes, REST webhook, cron, admin menu, hooks, routing, user-profile/login integration, cross-device cast sync).
8. **Section 13** = the **complete feature surface** — all 150 endpoints grouped into 21 named modules (read this to confirm nothing is missing).
9. **Section 14** = controlled vocabularies, roles/capabilities, and the plan→feature matrix (the enums + access rules the new schema needs).
10. **Appendix A** = glossary (Fernando will not know shooting-sport terms — read it).
11. **Appendix B** = the inventory + how to regenerate it.
---
## 1. Executive overview
Helice Scores runs live shooting-sport tournaments end to end: clubs, events, competitor registration (registrar, walk-up, public self-serve, batch, CSV import w/ dedup), entry/option/race money, **live scoring on tablets at the firing line**, **shoot-offs**, a **live "review" auction / Calcutta** (large cash betting pools + lucky-draw), **payout calculation**, a **cashier/till**, a **ProShop** (FluentCart-backed), **specialized reports** (daily/HOA/FITASC/amenities/trophy/consolation), a **youth/junior program**, membership/billing, **communications (email + SMS)**, staff/protest/refill alerting, and a full **data-protection/backup-restore** layer. It is used at real events where a single Calcutta pool can exceed **$150,000** and a major event's prize can approach **$1,000,000**, so **financial correctness, auditability, and offline reliability are non-negotiable.** *(The complete module map is Section 13.)*
The system is a WordPress plugin. Today everything — data model, 150 AJAX endpoints, 70 shortcodes, all UI, the offline subsystem, membership/billing, notifications/alerts, and a full **data-protection/backup-restore** layer (§11) — lives in one PHP file. It works, but it has reached its architectural ceiling:
- The "database" is **~436 distinct `_helice_*` post-meta keys**, many holding **serialized PHP arrays** (rosters, ledgers, audit logs, schedules). There is **no schema, no relational integrity, and no usable admin UI** for the bulk of it. A few CPTs do register basic meta boxes (`club`, `contact`, `inquiry`, `purse_option`), but the core operational data — rosters, ledgers, scores, schedules stored as serialized blobs on the `tournament`/`race` — is **not surfaced anywhere in wp-admin**, which is why the admin shows "empty" club/tournament screens while the front end is full.
- The UI is **assembled per-page** rather than from reusable components, causing design drift and high change cost.
- Subsystems that the target platform already provides (CRM, payments, notifications, email) are **partially reinvented** here.
The refactor goal: **preserve the domain behavior + look/feel, replace the plumbing** with a structured data model, a component library, and platform integrations.
---
## 2. Personas & roles
| Role | What they do | Access pattern |
|---|---|---|
| **HS Admin** (Julie / platform owner) | Manages clubs, plans, global settings, audits, recovery tools. | Full admin; `edit_posts`+. |
| **Club** | An owning organization for tournaments; has branding/logo, membership plan. | Represented by the `club` CPT; tournaments reference `_helice_club_id`. |
| **Registrar(s)** | Run an event: create tournaments/races, register competitors, assign bibs, take entry/option money, score, run the auction, compute payouts. **There can be more than one registrar working the same event concurrently** (today usually one). | `edit_posts`; the primary offline user. |
| **Competitor / shooter** | Registers, enters races/options, pays, views their standings. May self-edit their own entry **until their race starts** (then locked out — only a registrar can change it). | Logged-in `customer`; optionally linked to a `contact`. |
| **Referee / line staff / protest committee** | Receive operational alerts (send-to-line, machine refill, protest filed) during the event, often via QR-code opt-in. | Notification recipients (future: WhatsApp groups). |
| **Cashier** | Runs the till / daily reconciliation, receipts, complimentary credits. | `edit_posts`; cashier station (§13.18). |
| **Cast / display screens** | Read-only big-screen views of live scoring and the auction, cast to TVs/tablets. | Public read views driven by registrar controllers. |
> Capability/access detail (custom caps `helice_registrar`/`helice_club_admin`, club "system access" levels **Club Administrator**/**Club Registrar**, and the plan-feature matrix) is in **§14**.
---
## 3. End-to-end workflows (what it does)
Each of these is implemented today as front-end UI (shortcodes) + AJAX handlers + serialized post-meta. The refactor must preserve the behavior; the inventory lists the exact endpoints behind each.
1. **Club & tournament setup.** Create a `club` (logo, details), create `tournament`s under it (`_helice_club_id`), set start date/time, schedule, and event details. Races (`race` CPT) belong to a tournament via `_helice_tournament_id`.
2. **Purse options & races.** Define `purse_option`s (money pools/side bets) tied to a tournament and often a specific race (`_helice_race_id`), each with fees and payout structure. Races have start date/time and a `race_status` (open → live → closed → finalized).
3. **Registration** — multiple paths:
- **Registrar add** (`helice_add_competitor`): add an existing or brand-new competitor, assign a bib, select races + options, compute entry/options totals, append a ledger row.
- **Walk-up** (offline-capable): same, created on the spot.
- **Batch registration / race batch add** (`helice_batch_race_registration`): add many competitors to races at once.
- **Public self-registration** (`helice_public_tournament_register`, nopriv): competitor signs themselves up.
- **Contact import** with duplicate analysis (`helice_analyze_import_contacts`).
4. **Check-in & bibs.** Mark checked-in; assign/auto-assign bib numbers; bib collisions are rejected (no two active competitors share a bib).
5. **Entry / option editing & money.** Edit a competitor's races/options (`helice_update_competitor_options`), edit bib (`helice_update_competitor_bib`); totals recomputed; **competitor self-edits are cut off once a race starts** (registrar bypasses). Every money/entry change is **audit-logged**.
6. **Live scoring.** Per-ring tablet interface (rings 1..N): how many targets per ring, send competitors "to the line", record hit/miss per target live (`helice_save_competitor_score`, `helice_save_ring_score`), **skip/no-show** a competitor, score-entry conveniences (blank-then-line auto-hit, default-hit, reset-clears behavior — see version history), advance the crank/rotation, cast to displays, call for help/refill alerts.
7. **Review live auction / Calcutta.** A controller drives a cast display where competitors are auctioned into a betting pool; bidders/buyers tracked; SOLD events pop out across cast screens; multi-day Calcutta supported; pools can be very large.
8. **Payouts / winnings.** Compute payouts per purse option/race from the payout structure (percentages by place), with **tie handling** and **age/gender concurrent** awards. **Payouts must be uncapped** (a competitor system's $20k cap forced manual recalculation of a $70k payout at a recent event — do not repeat that).
9. **Reports & printing.** Daily race reports, competitor lists, payout/winnings, proshop/sales-tax reports, **consolation-bracket cards**, **gender/age award & trophy sheets**, and print-with-age-override outputs (numerous report/print endpoints — see inventory).
10. **Membership & billing.** `Helice_Membership` gates features by plan; clubs pay annually. **Four plans** — `free` / `basic` / `pro` / `premier` (ranks 0–3) — with a per-feature minimum-plan matrix (see §14). Free defaults: 50 contacts, 1 active tournament.
11. **ProShop / commerce.** `helice_shop_item` CPT for shop items, per-item tax modes, discounts, comps/credits, sales-tax tracking.
12. **Notifications & alerts.** Staff/protest/line alerts today; **target future state = WhatsApp groups via the platform (Xernio)** + QR-code opt-in (see Section 9).
13. **Offline mode.** The entire registrar workflow (read, scoring, registration, option/bib edits) must work with **no internet**, then sync when reconnected (see Section 7).
14. **Audit log.** Dispute-grade record of **who changed what, when** for all money/entry actions (see Section 6).
15. **Recovery/admin tools.** Manual snapshots, tournament recovery, duplicate-contact merge, etc.
16. **Shoot-offs (tie-breakers).** Build and score shoot-off rounds when competitors tie (`helice_shootoff_builder_data`, `helice_save_shootoff_results`).
17. **Youth / Junior program.** Junior / sub-junior eligibility, grade levels, youth-specific scoring overrides and dashboard/awards (`helice_get_youth_dashboard`, `helice_save_youth_*`, `helice_save_competitor_grade_level`).
18. **Cashier / till.** Per-day cashier station: setup, daily reconciliation, receipts, complimentary credits (`helice_*_cashier_*`, `helice_save_comp_credit`).
19. **Communications.** Branded email + FluentCRM SMS to competitors; registration-confirmation and admin-notification emails (`helice_send_tournament_email/_sms`, `[helice-communications]`).
20. **Inquiries / leads.** Public inquiry intake (`helice_submit_inquiry`) → `inquiry` CPT with admin columns + meta box.
21. **Specialized reports.** High-Over-All (HOA), FITASC-HOA, amenities, review/Calcutta payout & race reports.
> **The full, exhaustive module map (all 150 endpoints grouped) is Section 13.** This list is the orientation; §13 + INVENTORY §2 are the complete enumeration.
---
## 4. Data model — current state + proposed target
### 4.1 Current state (the core refactor target)
There are **7 CPTs** and **~436 `_helice_*` post-meta keys** (full list in `docs/handoff/INVENTORY.md`). The five core CPTs are `public => true` but `show_in_menu => false`. A few CPTs register basic meta boxes (`club`, `contact`, `inquiry`, `purse_option` — see INVENTORY §8d), but there is **no `register_meta`** and the serialized operational blobs have no admin editor. All real data is written directly with `update_post_meta` from the 150 AJAX handlers and read back into bespoke front-end UI. Consequences:
- **No schema / no validation.** A meta key can hold anything; nothing enforces shape.
- **Serialized arrays as primary records.** Key entities are single serialized blobs on the tournament (see below), so a "row" is really an element inside a PHP array. This is **hard to query**, **hard to report on**, and **risky under concurrency** (two registrars saving the roster can clobber each other — directly relevant to multi-registrar offline).
- **Invisible to WordPress tooling.** No admin list/edit, no REST schema → hard to integrate, migrate, or debug (this is the "empty Clubs screen" Spencer saw).
- **No Helice custom DB tables.** Everything is `wp_posts` + `wp_postmeta` + `wp_options` (plus IndexedDB offline). The only `CREATE TABLE` in the codebase is a **repair utility that recreates FluentCRM's own `fc_companies` table** when missing — not a Helice table. A few hot paths use direct `$wpdb` SQL against core `wp_posts`/`wp_postmeta`.
- **Lifecycle/status + per-browser context also live in meta/options** (see §11/§12): `_helice_lifecycle_status`, `_helice_archived_at/_by_user_id/_context`, option `helice_status_audit_log`; and `Helice_Context` stores the active club/tournament per browser via cookies `helice_ctx_*` + user-meta `helice_ctx_sessions`.
**CPTs** (see INVENTORY §1 for flags):
| CPT | Role | Key relationships |
|---|---|---|
| `club` | Owning organization | tournaments reference it via `_helice_club_id` |
| `tournament` | An event | holds roster, ledger, schedule, change-log (serialized) |
| `contact` | A person (competitor/member) | linked to a WP user via `_helice_linked_user_id`; referenced by `contact_id` everywhere |
| `race` | A race within a tournament | `_helice_tournament_id`; has `race_status`, `start_date`/`start_time`, `_helice_race_scores` |
| `purse_option` | A money pool / side bet | `_helice_tournament_id`, `_helice_race_id`, fees, payout structure |
| `inquiry` | Contact-form inquiries (admin-visible) | standalone |
| `helice_shop_item` | ProShop item | commerce/tax |
### 4.2 The critical serialized structures (document & normalize these first)
These are the blobs that must become real tables/relations. Shapes below are taken directly from the code (line refs are approximate to v13.0.418).
**`_helice_competitors`** (on `tournament`) — the **roster**, an array of entries:
```
[ { contact_id:int, checked_in:0|1, bib:int,
canceled?:bool, pending_new?:bool, /* + cancellation-memory fields */ }, ... ]
```
**`_helice_registration_ledger`** (on `tournament`) — the **money/entry ledger**, an array of rows:
```
[ { contact_id:int, entry_total:float, options_total:float,
entered_option_ids:int[], entered_race_ids:int[], // pseudo: -1=Calcutta/Review, 0=HOA, -2=FITASC-HOA
review_day_ids:string[], cancelled_options_by_race:{race_id: option_id[]} }, ... ]
```
**`_helice_change_log`** (on `tournament`) + **`helice_change_audit_recent`** (global option) — the **audit trail** (capped FIFO, 5000 per tournament / 2000 global). Each entry:
```
{ ts, user_id, user_login, display_name, actor_role('registrar'|'competitor'|'public'),
tournament_id, contact_id, action, summary, before(json), after(json),
context, offline_ts, ip }
```
**`race` meta:** `race_status` (`open`/`live`/`closed`/`finalized`), `start_date` (+legacy `_helice_race_date`), `start_time`, `_helice_race_scores` (serialized scores), `_helice_tournament_id`.
**`contact` meta:** `_helice_first_name`, `_helice_last_name`, `_helice_nickname`, `_helice_email`, `_helice_phone`, `_helice_nsca_id`, `_helice_gender`, `_helice_dob`, `_helice_age_class`/`_helice_age_category`, address (`_helice_street`, `_helice_address_line2`, `_helice_city`, `_helice_state`, `_helice_zip`, `_helice_country`), `_helice_linked_user_id`.
**`purse_option` meta:** `_helice_tournament_id`, `_helice_race_id`, fee + payout-structure fields (place→percentage), review/daily fee fields. (Full key list in INVENTORY §10.)
**Offline options (v13.0.404–410):** `helice_offline_applied_ops` (idempotency: client_uuid → cached response, capped FIFO). Client-side IndexedDB stores: `tournaments, races, competitors, options, ledger, scores, payments, payouts, config, pending_ops, applied_uuids, meta`.
### 4.3 Proposed target data model (Fernando's call, this is the intent)
- **Promote each serialized blob to structured records**: `tournament_competitors` (roster), `registration_ledger_rows`, `change_log` (append-only), `race_scores`, `purse_options`, `payouts` — as **custom tables** (best for query/reporting/concurrency) or at minimum **registered + REST-exposed** entities with schema/validation.
- **Make money rows first-class and append-only/auditable** (no in-place array rewrites). This fixes the concurrency clobber risk and the dispute requirement at once.
- **Reuse the platform for contacts/members** (FluentCRM) and **payments** rather than `contact` meta + bespoke ledger where possible (Section 9).
- **Keep `contact_id` as the stable person key**; reconcile to FluentCRM/users.
---
## 5. Business rules & edge cases (the hard-won logic — preserve exactly)
These rules came from 400+ versions of real-event feedback. The authoritative history is the giant changelog block at the **top of `helice.php`** (read it — it is essentially a decision log). Highlights Fernando must not regress:
- **Payouts are UNCAPPED and exact.** Never cap a payout (the competitor's $20k cap is the anti-pattern). Round to cents; totals are server-authoritative.
- **Payout structure = places × percentages** per purse option/race, with **tie handling** (`helice_handle_ties` / `parsePayoutStructureClean`) — ties split the combined place money per long-standing rules; legacy and current paths must agree.
- **Concurrents (age & gender).** Awards computed for age categories (derived from DOB → `_helice_age_class`) and gender, in addition to overall. "DOB unknown" is supported with a flag prompting the registrar to capture the true DOB later.
- **Race-start cutoff (v13.0.398).** A competitor may self-edit their entry only until a touched race **starts** (`race_status` live/closed/finalized OR start datetime passed; pseudo races lock at tournament start; unknown dates fail open). **Registrars bypass.** Mirrored offline in v13.0.410.
- **Cancellation memory & restore (v13.0.301).** When a competitor is canceled, their option entries are archived per race (`cancelled_options_by_race`) and **restored if they re-enter**. Canceled competitors are removed from races, reports, Calcutta, entry-money, and bib displays (a series of v13.0.37x rules) — but the record is kept and the action is **reversible**.
- **Duplicate-contact protection.** On create, a global fuzzy match (name/DOB/email/phone) blocks accidental duplicates and offers "use existing" vs "create as separate" (`bypass_duplicate_check=1`); a Duplicate Contacts **merge tool** reconciles after the fact. Offline creation defers dedup to this tool.
- **Bib rules.** Auto-assign lowest free bib; honor requested bib if free; reject collisions with active (non-canceled) competitors.
- **Pseudo-race sentinels.** `0` = HOA Trophy Race, `-1` = Calcutta/Review, `-2` = FITASC-HOA — used throughout entry/option/payout logic.
- **Membership gating.** `Helice_Membership` enforces plan limits (e.g., free-plan **contact cap** blocks brand-new contacts but never blocks adding an existing one); HS admins/paid plans bypass.
- **FluentCRM sync.** New competitors are pushed to FluentCRM (`helice_ensure_fluentcrm_subscriber`) — a seam to expand in the refactor.
---
## 6. Financial & audit logic (dispute-grade)
**Why it matters:** these are cash payouts at events with six- and seven-figure pools and disputes happen ("who was in this option," "who won"). The system must answer **who did what, when** with certainty.
- **Money math** lives server-side: entry totals (`helice_calculate_registration_entry_total`), options totals, daily/review fees, payout computation. The client may compute and display totals, but the **server stores and re-confirms** them.
- **Audit logger** (`helice_log_change`, v13.0.397): every money/entry action (option/race edits, payments, payouts, add/cancel competitor, bib changes — 9+ instrumented handlers) writes an immutable-style entry capturing actor identity + role, before/after diffs (compact JSON), context, IP, and (v13.0.409) the **true offline timestamp** (`offline_ts`) so an action queued offline records *when it happened*, not just when it synced.
- **Idempotency** (v13.0.409): mutating offline ops carry a `client_uuid`; the server caches the result in `helice_offline_applied_ops` so a replay can never double-apply (e.g., add the same competitor twice).
- **Acceptance criteria for the refactor:** money is **exact, uncapped, reversible, and fully audited**; the audit log is **append-only** and **survives** export/migration; every mutating endpoint is **idempotent**; offline actions retain **actor + original timestamp**.
> **Refactor opportunity:** in the new model, the ledger and audit log should be **append-only tables**, not serialized arrays rewritten in place. That single change removes the biggest correctness risk (concurrent roster/ledger clobber) and satisfies the dispute requirement natively.
---
## 7. Offline requirements + lessons learned (read before designing the data layer)
**Real-world constraint:** many clubs are in remote locations with **no internet** (Starlink is only sometimes available), and they deliberately **do not want a live internet dependency while large cash flows through**. The registrar must run the **entire** workflow offline — read, live scoring, registration (incl. new walk-ups), option/bib edits — and have it sync cleanly when connectivity returns. **Multiple registrars** may work the same event (start with one, but design for more).
We built this incrementally on the monolith (v13.0.404–410). The new platform should provide it **natively (local-first)**, but here is exactly what we learned so Fernando can leapfrog it:
- **Phase 0 (v404):** PWA manifest + service-worker shell + IndexedDB (stores listed in §4.2) + connectivity banner + `navigator.storage.persist()`.
- **Phase 1 (v405/406):** read-only **snapshot endpoint** (`helice_ajax_offline_snapshot`, `edit_posts`+nonce) pulls a tournament's races/options/roster/ledger/contacts to IndexedDB; "Download for offline" + read-only offline viewer. **Note: offline is gated to registrars** (`edit_posts`), so registrars are the real offline users.
- **Phase 2 (v407):** offline **scoring capture** — a `window.fetch` wrapper intercepts score POSTs while offline, queues them in `pending_ops`, applies locally, returns a synthetic success, and **replays to the existing handlers on reconnect**. Score writes are naturally idempotent.
- **Phase 3a (v408):** offline **edit** of existing competitors (options + bib), exact echoed totals, local roster apply, offline bib-collision detection.
- **Phase 3b/3c (v409):** offline **new walk-up registration** — temporary local id (`tmp_<uuid>`), local bib assignment, queued with `bypass_duplicate_check=1`; on reconnect the **server returns the real `contact_id`**, and the client **maps temp→real across all dependent queued ops** and rewrites the local roster. Server-side **idempotency** (`client_uuid` + `helice_offline_applied_ops`) prevents double-creates; audit records the **offline timestamp**.
- **Phase 3d (v410):** competitor self-edit **race-start cutoff** enforced offline (registrars bypass) + **queue self-healing** (ops the server permanently rejects, e.g. locked, are dropped so the queue can't wedge; transient failures retry).
- **Gated / not built — Phase 4:** offline **payments/payouts** (touches money handlers; needs reconcile/review-before-commit, strict idempotency, reversibility). **Phase 5:** **multi-registrar concurrency** (per-record versioning, conflict detection + merge UI).
**Hard lessons for the new design:**
1. **Serialized-array records + offline + multiple writers = clobber risk.** Local-first sync wants **per-record, versioned, append-only** data — another reason to normalize (§4.3).
2. **Every mutating op needs a client-generated idempotency key end-to-end** (we retrofitted this; build it in from day one).
3. **Preserve the true action time** (offline_ts) and **actor** for audit, even when sync happens later.
4. **Temp-ID → real-ID reconciliation** is required for offline creation; design IDs so this is native (e.g., client-generated UUID primary keys reconciled server-side).
5. **Conflict resolution is a real feature**, not an afterthought, once two registrars are in play.
---
## 8. UI / UX specification
**Source of truth for styling:** the live **Design Style** page (Plugin Menu → Helice → Design Style, a.k.a. the `design-styles` page). It is **non-versioned and authoritative** — match it exactly. It defines the palette, typography, spacing, and the rule that only an approved icon set is used (today the monolith sometimes injects stray SVGs that fail to render — the new system should use a single icon set / plain characters, never ad-hoc SVGs).
**Current UI reality (what to improve):**
- Built **per page** via 70 shortcodes that emit HTML/CSS/JS inline — no shared component library, so the same element is re-implemented many times and drifts.
- Specific known debt called out in review: live-scoring **rings squished into 4 fixed columns** (should be **per-ring tabs or a repeater** that shows each ring in full), broken **SVG icons**, and design-style rules not consistently honored.
**Target: a component library** (the "Mr. Potato Head" model — assemble thousands of screens from a small set of reusable parts with global styles). Components to define at minimum:
- **Layout:** portal shell (header/footer/nav), card, section, tabs, repeater, modal/popout, toolbar.
- **Tables/lists:** competitor row, roster table, results/payout table, report tables, paginated lists.
- **Scoring:** ring panel (per-ring tab), target hit/miss grid, send-to-line control, crank/rotation advance, cast/display view.
- **Auction/Calcutta:** controller, bidder/buyer picker, SOLD popout, cast screen (multi-screen split), totals strip (Total Pot / Open Purse / Lucky Pot).
- **Status/feedback:** offline banner, sync-status pill, toast/notice, status pills (online/offline, race_status).
- **Forms:** competitor add/edit, options/races selector, bib field, payment entry, QR opt-in.
**Devices:** registrar laptop + **tablets at the firing line** + **cast to TVs**. Must be responsive and touch-friendly; cast views need TV-edge-safe padding and large legible type.
**Deliverable from us to support this:** screen-by-screen screenshots + the Design Style export (Julie can capture these; ask if you want the agent to enumerate every screen/shortcode with its purpose from the inventory).
---
## 9. Platform integrations to adopt (kill duplication)
**This is consolidation, not greenfield — significant integration already exists and must be preserved/migrated, not lost:**
- **FluentCRM (active, deep, bidirectional).** `helice_ensure_fluentcrm_subscriber()` creates/updates a subscriber via `FluentCrmApi('contacts')->createOrUpdate()` on **all 7 contact-creation paths** (register, inquiry, add competitor, public register, add review bidder, role-sync, import). Registration **prefills** from FluentCRM (`getContact`), there is a **backfill utility** (`?helice_sync_contacts_to_fluentcrm=run`), and a **table-repair utility** that recreates FluentCRM's `fc_companies` table when missing. Keep a stable `contact_id` ↔ subscriber mapping.
- **FluentCart (active payment rail).** Via `helice_fc_is_active()` + internal `rest_do_request()` (no HTTP). The plugin **auto-creates FC products** for each race entry fee + USHA fee (tagged `_helice_club_id`/`_helice_tournament_id`/`_helice_fee_type`) and for **club-scoped ProShop items**, processes **credit-card payments through FC checkout**, and hooks `fluent_cart/order_paid_done` to **reconcile the payment back into the Helice competitor ledger** (`pro_shop_purchases` + payment record). **Important boundary:** entry fees, USHA fees, and ProShop go through FC; **purse options and Review/Calcutta fees/sales stay internal to Helice** (cash/manual ledger). Refund + subscription-cancel hooks (`fluent_cart/order_refunded`, `.../subscription_canceled`) are also wired.
- **Membership/billing (`Helice_Membership`).** Driven by **FluentCart subscriptions** (`fc_order_paid_membership`, `fc_subscription_canceled`, `fc_order_refunded`) **plus** a **Stripe/ML webhook** (`POST helice/v1/membership/webhook`, HMAC-signed, **still a stub**). Tiers gate usage via filters: `helice_membership_free_contact_limit`, `helice_membership_free_active_tournament_limit`, `helice_membership_bypass_gates`, `helice_membership_checkout_url`, etc.
- **Communications (active).** Branded HTML **email via `wp_mail`** (registration confirmations + admin notifications + broadcast) and **SMS via FluentCRM** (`/fluent-crm/v2/sms/...`), surfaced on the `[helice-communications]` page.
The monolith still reinvents some things the target platform provides. Consolidation map:
| Current (bespoke / partial in `helice.php`) | Consolidate onto | Notes |
|---|---|---|
| `contact` CPT + 436 meta keys for people/members | **FluentCRM** (contacts, segments, lists) | Already deeply wired (above). Migrate the meta to structured CRM fields; keep `contact_id` mapping. |
| Membership gating (`Helice_Membership`), club annual plans | Platform membership/billing | Already FC-subscription-driven + Stripe webhook stub; finish wiring + structure the tiers/limits. |
| Entry/option/payout money + ledger | **Stripe / MinuteLaunch Stripe Gateway (+ FluentCart)** | Entry/USHA/ProShop already flow through FluentCart; purse + Review money is internal cash/manual today. Keep the domain payout math (§6); unify on one gateway + a real ledger schema. |
| Staff/line/protest alerts (custom) | **WhatsApp via Xernio** (MinuteLaunch Social) + QR opt-in | WhatsApp chosen over SMS to avoid Twilio/2FA/legal overhead and for international reach; QR-code group opt-in. |
| (none yet) two-way email | **MinuteLaunch Mail** (agentic + 2-way through Fluent) | For club/registrar ↔ competitor comms. |
| Bespoke per-page UI | **MinuteLaunch component/canvas system** | The component library + auto-setup (header/footer/canvas pages) shown in the Health Portal / Ask Fernando reference apps. |
**Reference architectures to mirror:** the **Health Portal** (single self-contained plugin: membership + sales pages + dashboards + AI + charts, no setup) and **Ask Fernando** (QR → mobile, microphone, membership, remarketing). Helice Scores should become the same shape: one self-contained, component-based, platform-integrated app that is also **custom-capable** per client.
---
## 10. Known fragilities / "where the bodies are buried"
Be honest with Fernando so he doesn't step on the same rakes:
- **Single ~9.5 MB file.** Editing it has caused **silent truncation twice** (lost ~12k lines, broke activation). Our current safe workflow: **Python patch scripts only**, never editor string-replace, with `php -l` linting on the live file, the archived copy, **and** the extracted zip before every release. (See `.cursor/rules/helice-plugin-workflow.mdc` and `scripts/`.)
- **Serialized-array records** rewritten in place → **concurrency clobber risk** (two saves race), no schema, no validation. Top normalization priority.
- **Operational data invisible to wp-admin** (core CPTs `show_in_menu => false`; only a few basic meta boxes exist for `club`/`contact`/`inquiry`/`purse_option`; the serialized blobs have no editor; no `register_meta`). Hard to inspect/migrate. The data is **present**, just unsurfaced — not lost.
- **Design drift / stray SVGs** because UI is per-page, not componentized.
- **Offline money (Phase 4) and multi-registrar concurrency (Phase 5) are NOT built** and are the highest-risk remaining areas — design them into the new data layer rather than bolting on.
- **Versioning discipline matters:** every change is a new version, archived under `old-versions/vX.X.X/` with a `CHANGELOG.md`; the giant in-file changelog is the decision log.
---
## 11. Data protection, backup/restore & lifecycle (CRITICAL — preserve the guarantees)
This subsystem (built v13.0.122–124 after a catastrophic data-loss incident) is **central to the product's promise** and directly addresses Julie's #1 fear ("running offline and the data ends up not being there"). Fernando must carry the *guarantees* forward, even if the implementation changes.
- **No hard deletes, ever.** No Helice CPT row (`tournament`, `contact`, `club`, `race`, `purse_option`, `helice_shop_item`) is ever permanently removed by the plugin or the WP admin. `pre_delete_post` + `pre_trash_post` filters intercept **every** delete/trash (plugin, WP-Admin row/bulk action, third-party, WP-CLI) and convert it to a **status flip**. WP-Admin Trash/Delete row + bulk actions are stripped for these CPTs.
- **Lifecycle status model:** `_helice_lifecycle_status` ∈ {active, inactive, cancelled, archived}; non-active rows are stored as `draft` (hidden from public queries, retained forever). Audit meta: `_helice_archived_at`, `_helice_archived_by_user_id`, `_helice_archived_context`; capped status-change log in option `helice_status_audit_log` (last 500, FIFO).
- **Snapshots / backups:** full-snapshot JSON files written to `/wp-content/uploads/helice-backups/` (subdirs `auto/`, `manual/`, `pre-restore/`, `pre-fresh-start/`, `pre-delete/`; `.htaccess` Deny-from-all). Each snapshot = every protected CPT row (all columns + all meta) + key options. Schema: `{snapshot_version, plugin_version, created_at, created_by, type, name, site_url, cpts:{...}, options:{...}}`.
- **Daily auto-backup cron** (`helice_daily_backup`, scheduled on `init`, daily) → `helice_cron_run_daily_backup` → 30-day rolling retention. **Missed-backup catch-up** on `admin_init` if >25h since last (`helice_last_snapshot_at`) — covers hosts with unreliable wp-cron.
- **Data Vault UI** — `[helice-data-vault]` shortcode on an auto-created `/data-vault/` page (`manage_options`): Backup Now, snapshot list (auto/manual/pre-restore badges), Download (Blob save), **Restore** (type-to-confirm `RESTORE`, takes a pre-restore snapshot first, re-creates rows by original ID via `wp_insert_post(import_id)`; **additive** — never deletes newer rows), and a buried **Emergency Permanent Purge** (`manage_options` + 30-day-archived + type-to-confirm `PERMANENTLY DELETE`, snapshots first, sets `HELICE_INTERNAL_PERMANENT_PURGE` so the Layer-1 filter allows the single delete).
- **Tournament Recovery Tool** (v13.0.123) — rebuilds a force-deleted tournament from surviving orphan race/score data.
- **Fresh Start** — destructive reset gated behind type-to-confirm `PERMANENTLY DELETE ALL DATA` + a `pre-fresh-start` snapshot.
> **Refactor implication:** the new platform should provide equivalent guarantees natively — soft-delete/lifecycle states, append-only history, scheduled backups, and one-click restore — ideally easier with a real schema. **Do not regress to hard deletes.** Related AJAX endpoints: `helice_create_manual_snapshot`, `helice_list_snapshots`, `helice_download_snapshot`, `helice_restore_snapshot`, `helice_emergency_purge` (all in the inventory).
---
## 12. Runtime & platform surfaces (so nothing is missed)
WordPress integration points beyond CPTs/AJAX/shortcodes (all in `docs/handoff/INVENTORY.md`):
- **PHP classes (4):** `Helice_Scores_Stripped` (the ~116k-line main singleton — everything hangs off it), `Helice_Membership` (plan gating/billing), `Helice_Context` (**per-browser/per-device session context** — active club/tournament via cookies `helice_ctx_*` + user-meta `helice_ctx_sessions`; this is how multiple registrars/devices each keep their own working context), `Helice_Left_Sidebar_Widget` (a `WP_Widget`).
- **REST route (1):** `POST helice/v1/membership/webhook` — ML/Stripe **membership billing webhook** (HMAC-SHA256 `X-Helice-Signature`), funnels into `apply_membership()`. **Currently a stub — must be wired before production billing.**
- **Cron (1):** `helice_daily_backup` (daily) + `admin_init` missed-backup catch-up (see §11).
- **Lifecycle:** `register_activation_hook` / `register_deactivation_hook` (CPT registration + rewrite flush + cron scheduling on activate). No `register_uninstall_hook`.
- **~36 custom extensibility hooks** (`do_action`/`apply_filters`, all `helice_*`) — notable ones reveal subsystems to preserve:
- **Operational alerts/notifications:** `helice_help_call_created`/`_resolved`, `helice_protest_filed`, `helice_refill_started`/`_completed`, `helice_notification_dispatched` (the "call for help / protest committee / machine refill" alerting → target WhatsApp in §9).
- **Membership/billing:** `helice_membership_applied`, `helice_membership_status_changed`, `helice_membership_free_contact_limit`, `helice_membership_free_active_tournament_limit`, `helice_membership_bypass_gates`, `helice_membership_checkout_url`, etc.
- **Theme-bypass / public-marketing routing:** `helice_theme_bypass_*`, `helice_public_*` — the plugin renders its own full-page shell (header/footer/left-rail) and bypasses the active theme for its routes; it also has public marketing pages. This is a whole routing/templating layer.
- **Account/user creation policy:** `helice_allow_competitor_create_user`, `helice_allow_club_contact_create_user`, `helice_is_legit_email`, `helice_create_account_url`.
- **Front-end routing & auto-created pages:** the plugin **auto-creates its own pages** on first admin load (one-shot option flags), e.g. `/data-vault/`, the cast pages (`/review-live/`), `/design-styles/`, `/admin-forms/`, and public marketing/results pages, then renders them via shortcodes inside its own theme-bypass shell.
- **Cross-device live sync (cast):** the live scoreboard/auction cast uses **`BroadcastChannel` + `localStorage` (138 refs) + server polling** to push SOLD/score/picker changes to all cast surfaces (including cross-device) without relaunching — a real-time layer the new architecture should replace with a proper channel (websockets/SSE/platform realtime).
- **Transients** (light caching) and **enqueued assets** (mostly inline; few `wp_enqueue_*`) — most CSS/JS is emitted inline per shortcode (the per-page UI debt from §8).
- **Direct `$wpdb` SQL** is used in a few hot paths (contact lookup by name/email for duplicate detection) against core `wp_posts`/`wp_postmeta` — no Helice custom tables (see §4 correction).
- **Raw email:** branded `wp_mail` sends (registration/admin/broadcast); target = MinuteLaunch Mail (§9).
- **Admin menu (`Helice Scores`, 11 entries):** Dashboard, Clubs, Tournaments, Contacts, Races, Inquiries, **Finalization Checklist**, **Design Style** (the live style guide), **Fresh Start**, and **Memberships** (registered by `Helice_Membership`). The CPT submenus point at native `edit.php` lists (which appear empty due to the no-meta-box data model). Full list: INVENTORY §8b.
- **WP user-profile integration:** Helice fields are added to the WordPress user edit screen (`show_user_profile`/`edit_user_profile` + `*_profile_update`), and there's a **custom login flow** (`login_redirect`, `login_form_lostpassword`) and `show_admin_bar` control.
- **Full front-end template control:** `template_include`, `template_redirect`, `the_content`, `pre_get_document_title`, `query_vars`, `pre_get_posts`, `body_class` — the plugin takes over rendering for its routes (the theme-bypass shell). `manage_inquiry_posts_columns`/`_custom_column` customize the inquiry admin list.
- **`save_post_*` hooks** for `club`, `contact`, `tournament`, `purse_option` (meta persistence from the few meta-box editors).
- **Constants (5):** `HELICE_VERSION`, `HELICE_PLUGIN_DIR`, `HELICE_PLUGIN_URL`, `HELICE_PLUGIN_BASENAME`, `HELICE_INTERNAL_PERMANENT_PURGE` (the purge-bypass flag from §11).
- **Full WP-hook surface (47 distinct, excl. AJAX):** INVENTORY §8a — the complete list of lifecycle events the plugin attaches to.
---
## 13. Complete feature surface — every subsystem (all 150 endpoints mapped)
So nothing is implied-but-unnamed, here is the **entire** feature surface, every endpoint grouped. (Authoritative endpoint→callback table: INVENTORY §2.) Each group is a module the new platform must reproduce.
1. **Auth, accounts & session/context** — `helice_login`, `helice_register`, `helice_save_profile`, `helice_set_profile_photo`, `helice_upload_profile_photo`, `helice_set_active_club`, `helice_set_active_role`, `helice_set_active_tournament`, `helice_sync_club_contact_roles`. Plus a **WP user-profile integration** (Helice fields on the WP user edit screen via `show_user_profile`/`edit_user_profile`/`*_update`) and a **custom login flow** (`login_redirect`, `login_form_lostpassword`). Active club/tournament are per-browser via `Helice_Context` (§12).
2. **Clubs** — `helice_save_club`, `helice_get_club`, `helice_update_club` (+ `save_post_club` meta box).
3. **Tournaments** — `helice_create_tournament`, `helice_update_tournament` (+ `save_post_tournament`).
4. **Races & rings setup** — `helice_create_race`, `helice_update_race`, `helice_delete_race`, `helice_get_races`, `helice_save_tournament_rings`, `helice_save_ring_config`, `helice_save_tournament_referee`, `helice_save_ring_ref`.
5. **Competitor registration & lifecycle** — `helice_add_competitor`, `helice_public_tournament_register`, `helice_batch_race_registration`, `helice_get_tournament_competitors`, `helice_remove_competitor_from_tournament`, `helice_set_competitor_canceled`, **`helice_toggle_competitor_checkin` (check-in)**, `helice_update_competitor_bib`, `helice_update_competitor_options`, `helice_save_competitor_contact`.
6. **Contacts: dedup / merge / import** — `helice_search_contacts`, `helice_search_contacts_for_merge`, `helice_check_duplicate_contact`, `helice_find_duplicate_contacts`, `helice_mark_contacts_not_duplicate`, `helice_merge_duplicate_contacts`, `helice_import_contacts`, `helice_analyze_import_contacts`, `helice_upload_parse_contacts` (CSV import + duplicate analysis).
7. **Purse options** — `helice_create_purse_option_for_race`, `helice_get_purse_option`, `helice_get_purse_options`, `helice_update_purse_option`, `helice_delete_purse_option`, `helice_delete_all_purse_options_for_race`, `helice_load_purse_templates_for_race`, `helice_get_race_existing_purse_templates`, `helice_save_purse_display_order_mode`.
8. **Live scoring & rings** — `helice_save_competitor_score`, `helice_save_ring_score`, `helice_save_ring_current`, `helice_save_ring_crank_starts`, `helice_advance_ring_crank`, `helice_get_ring_state`, `helice_search_competitors_for_ring`, `helice_get_ring_qr` (QR to a ring tablet), `helice_get_competitor_scores`, `helice_upload_score_card`, `helice_delete_score_card`.
9. **Shoot-offs (tie-breakers)** — `helice_shootoff_builder_data`, `helice_save_shootoff_results`.
10. **On-deck / live board / cast** — `helice_get_on_deck`, `helice_save_on_deck`, `helice_get_live_board`, `helice_save_cast_schedule_notice`, `helice_refresh_monitor` (the read-only display layer; see cross-device sync §12).
11. **Staff alerts / help / protest / refill + recipient routing** — `helice_save_help_call`, `helice_resolve_help_call`, `helice_get_help_calls`, `helice_save_protest`, `helice_get_protests`, `helice_save_refill_event`, `helice_get_staff_alerts`, `helice_acknowledge_staff_alert`, `helice_get_active_alerts`, `helice_save_notification_recipient`, `helice_get_notification_recipients`, `helice_get_recipient_alert_link`, `helice_get_role_alert_link` (who gets pinged for what; target WhatsApp in §9).
12. **Review / Calcutta auction** — `helice_add_review_bidder`, `helice_save_review_sale`, `helice_undo_review_sale`, `helice_get_review_sale_nonce`, `helice_set_review_flag`, `helice_save_review_auction_state`, `helice_get_review_live_state`, `helice_get_review_revision`, `helice_save_review_picker_prefs`, `helice_save_review_day_fees`, `helice_save_review_day_registration`, **`helice_save_review_lucky_draw` (lucky-draw pot)**, `helice_save_review_split_pct`, `helice_update_review_entry_fee`, `helice_reset_review_data`, `helice_record_review_auction_payment`, `helice_get_review_contributing_races`, `helice_review_payout_report`, `helice_review_race_report`.
13. **Payments, payouts, credits & cashier** — `helice_save_competitor_payments`, `helice_save_competitor_payouts`, `helice_get_live_payouts`, `helice_get_competitor_receipt`, `helice_get_batch_receipts`, **`helice_save_comp_credit` / `helice_delete_comp_credit` (complimentary credits)**, **`helice_get_cashier_data` / `helice_save_cashier_daily` / `helice_save_cashier_setup` (cashier station / daily till)**.
14. **ProShop, sales & tax** — `helice_proshop_save_product`, `helice_proshop_get_products`, `helice_proshop_delete_product`, `helice_proshop_reorder_product`, `helice_proshop_adjustments_list`, `helice_proshop_sales_history`, `helice_proshop_sales_summary`, `helice_proshop_save_tax_rate`, `helice_proshop_save_tax_rule`, `helice_proshop_delete_tax_rule`, `helice_save_dashboard_purchase`, `helice_edit_dashboard_purchase`, `helice_delete_dashboard_purchase`, `helice_upload_flyer`, `helice_get_flyer_thumbs` (ProShop is backed by **FluentCart** — see §9).
15. **Reports** — `helice_daily_race_report`, **`helice_hoa_race_report` / `helice_get_hoa_contributing_races` (High-Over-All aggregate)**, **`helice_fitasc_hoa_race_report` / `helice_get_fitasc_hoa_contributing_races` (FITASC discipline)**, **`helice_get_amenities_report`**, `helice_review_payout_report`, `helice_review_race_report` (+ consolation/trophy/print outputs from §3.9).
16. **Youth / Junior program** *(previously undocumented)* — `helice_get_youth_dashboard`, `helice_get_youth_settings`, `helice_save_youth_settings`, `helice_save_youth_score_override`, `helice_save_race_youth_include`, `helice_save_race_include_sub_junior`, `helice_save_competitor_grade_level` (junior/sub-junior eligibility, grade levels, youth-specific scoring/awards).
17. **Trophies & awards** — `helice_save_trophy_award_series` (+ gender/age award sheets, §3.9).
18. **Communications (email + SMS)** *(previously understated)* — `helice_send_tournament_email`, `helice_send_tournament_sms`, plus registration-confirmation + admin-notification emails fired from registration handlers. Backed by `wp_mail` + **FluentCRM SMS** (`[helice-communications]` page).
19. **Inquiries / leads (CRM intake)** — `helice_submit_inquiry` (+ `inquiry` CPT admin columns + Inquiry Details meta box).
20. **Data protection / backup / restore / recovery** — `helice_create_manual_snapshot`, `helice_list_snapshots`, `helice_download_snapshot`, `helice_restore_snapshot`, `helice_emergency_purge`, `helice_recover_scan`, `helice_recover_execute` (see §11).
21. **Offline** — `helice_offline_snapshot` (+ the client sync engine, §7).
> If a group above is unfamiliar, it is still **fully enumerated** in INVENTORY §2 (endpoints) and the changelog header inside `helice.php` (per-version behavior). Nothing in the running plugin is outside these 21 modules.
---
## 14. Controlled vocabularies, roles/capabilities & plan-feature matrix (schema inputs)
These are the **enums and access rules** a real schema needs. Pulled from the live code; flagged where the data is inconsistent.
### 14.1 Roles, capabilities & access levels
- **WordPress capabilities used as gates:** `manage_options` (HS Admin / platform owner), `edit_posts` (registrar-level, the main operational gate — ×127), `edit_users`/`create_users` (account provisioning), plus standard `upload_files`/`publish_posts`.
- **Custom capabilities referenced:** `helice_registrar` (×20) and `helice_club_admin` (×20). ⚠️ No `add_cap`/`add_role` call grants these in-file — Fernando should verify how they're granted (likely a role/`user_has_cap` mapping or legacy data) and formalize the role model in the rebuild.
- **Club "system access" levels** (chosen on the Add/Edit-Club contact form, stored in `_helice_club_access`): **Club Administrator**, **Club Registrar**.
- **Contact "club role"** (free-text-ish, stored in `_helice_club_role`): President, Treasurer, etc.
- **Event/operational roles** seen in code: `competitor`/`shooter`, `referee`, `cashier`, `registrar`, `official`. The active role per browser is set via `helice_set_active_role` (see `Helice_Context`, §12).
### 14.2 Plan → minimum-feature matrix (`Helice_Membership::feature_minimum_plan_map()`)
The exact gate as it ships (rebuild should keep this as data/config, not hard-code):
| Min plan | Features unlocked at this level |
|---|---|
| **free** | club_dashboard, club_management, manual_scoring, tournament_create |
| **basic** | competitor_management, race_management, tournament_details, reports_forms, batch_registration, payment_manager |
| **pro** | digital_scoring, ring_scoring, live_tv_display, review_dashboard, print_score_cards, proshop_sales, financial_reporting |
| **premier** | calcutta, shootoff, consolation, cast_displays, live_scoring_staff_hub, financials_full, proshop_adjustments, communications, api_access, custom_branding |
Plan stored on club meta `_helice_club_membership_plan`; checkout URLs via options `helice_membership_checkout_basic|pro|premier` (or filter `helice_membership_checkout_url`). Gating can be bypassed for HS admins / via `helice_membership_bypass_gates`.
### 14.3 Domain controlled vocabularies (enums to model)
- **Age classes / categories:** Sub-Junior, Junior, Senior, Veteran, Master (used for category awards). *(Sub-junior/junior are the "youth" program, §13.16.)*
- **Gender / special class:** male / female + a **Lady** award class.
- **Disciplines:** **Helice** (the primary sport — live pigeon/helice ring shooting) and **FITASC** (the FITASC-HOA report path). Architect for additional disciplines.
- **Race status lifecycle:** `open` → `live`/`in_progress` → `closed`/`completed` → `finalized`.
- **Record lifecycle status** (`_helice_lifecycle_status`, §11): `active` / `inactive` / `cancelled` / `archived` (stored as WP `draft` when non-active).
- **Payment status:** `paid` / `pending` / unpaid.
- **Fee types** (`_helice_fee_type`): `entry_fee`, `usha_fee` (USHA = U.S. sanctioning-body fee), purse/option fees, and Review/Calcutta day fees. *(Entry + USHA flow through FluentCart; purse + Review stay internal — §9.)*
- ⚠️ **Data inconsistency to clean up in migration:** both `canceled` (×69) and `cancelled` (×3) spellings exist in the code/data for the same concept. Normalize during the rebuild.
> These vocabularies are currently **implicit** (string literals scattered across the file), which is exactly why a typed schema is the win. INVENTORY §10 lists the meta keys that store them.
---
## Acceptance criteria (non-negotiables for the rebuild)
1. **Financial correctness:** payouts exact, **uncapped**, reversible; server-authoritative totals; tie + concurrent rules preserved.
2. **Auditability:** append-only `who/what/when` (incl. true offline time + actor) that survives migration/export.
3. **Offline reliability:** full registrar workflow offline (read, score, register, edit), **no data loss**, idempotent sync, temp→real ID reconciliation, conflict resolution for multiple registrars.
4. **Structured data:** no serialized-blob primary records; schema + validation + queryable; REST-exposed where useful.
5. **Component-based UI** matching the Design Style spec exactly, responsive across laptop/tablet/cast.
6. **Platform reuse:** FluentCRM, Stripe gateway, WhatsApp/Xernio, MinuteLaunch Mail — no reinvented CRM/payments/notifications.
7. **Role-based access:** HS admin / club / registrar(s) / competitor / staff, with the registrar-bypass and competitor-cutoff rules intact.
8. **Behavior parity first:** preserve the validated workflows and UX; refactor the plumbing beneath them.
---
## Appendix A — Glossary (domain terms)
- **Helice / pigeon shoot / flyers:** live shooting-sport events; competitors shoot at targets.
- **Calcutta / Review:** an auction/betting pool on competitors; can be very large ($150k+ seen, ~$1M at the biggest). Pseudo-race id `-1`.
- **HOA (High Overall):** trophy race across the event; pseudo-race id `0`.
- **FITASC-HOA:** a discipline-specific high-overall; pseudo-race id `-2`.
- **Ring:** a physical shooting station/lane; events run multiple rings (e.g., 4–6) concurrently.
- **Bib:** a competitor's number for the event (assigned at check-in; unique among active competitors).
- **Concurrent:** a sub-classification for awards (by **age** category derived from DOB, and by **gender**) in addition to overall placing.
- **Option / Purse Option:** a money side-bet/pool a competitor can enter; payouts computed by place × percentage.
- **Entry total / Options total:** the money a competitor owes for races vs options.
- **Walk-up:** a competitor registered on the spot at the event (often offline).
- **Cast:** read-only big-screen display (TV/tablet) of live scoring or the auction.
- **Send to the line:** dispatch the next competitor(s) to shoot.
- **Registrar:** the person operating the system at the event.
## Appendix B — Technical inventory (authoritative, machine-extracted)
The complete, omission-free lists live in **[`docs/handoff/INVENTORY.md`](docs/handoff/INVENTORY.md)** and are regenerated by:
```bash
python3 scripts/extract-handoff-inventory.py > docs/handoff/INVENTORY.md
```
Summary (v13.0.418):
- **7 CPTs:** `club`, `tournament`, `contact`, `race`, `purse_option`, `inquiry`, `helice_shop_item`.
- **150 authenticated AJAX actions** (19 also exposed to non-logged-in users) — full action→callback table in INVENTORY §2.
- **70 shortcodes** — INVENTORY §3.
- **27 `helice*` options** — INVENTORY §4.
- **4 PHP classes** — INVENTORY §5.
- **1 REST route** (`helice/v1/membership/webhook`) — INVENTORY §6.
- **1 cron event** (`helice_daily_backup`) — INVENTORY §7.
- **activation + deactivation hooks** — INVENTORY §8.
- **47 WP hooks attached to** (lifecycle behavior surface) — INVENTORY §8a.
- **11 admin menu pages** — INVENTORY §8b.
- **4 FluentCart integration hooks** — INVENTORY §8c.
- **registered meta boxes** (club/contact/inquiry/purse_option) — INVENTORY §8d.
- **5 defined constants** — INVENTORY §8e.
- **~36 custom extensibility hooks** (`helice_*` do_action/apply_filters) — INVENTORY §9.
- **436 `_helice_*` post-meta keys** — full list in INVENTORY §10 (this is the data model to normalize).
The 150 endpoints are mapped to 21 named modules in **Section 13**; the enums, roles/capabilities, and plan-feature matrix are in **Section 14**.
**Other source-of-truth files in this repo:**
- `plugin-files/helice.php` — the plugin; its **header changelog** is the full decision log.
- `old-versions/vX.X.X/` — every shipped version + per-version `CHANGELOG.md`.
- `.cursor/rules/helice-plugin-workflow.mdc` — the safe build/versioning workflow.
- `AUDIT-MANDATORY-CHECKLIST.md`, `Instructions-from-Spence/AI-CONSTITUTION.md` — operating rules.
- The live **Design Style** page (`design-styles`) — authoritative UI spec.
Club Registration ID: add-club
Onboard a new gun club into the system.
Creates a new club entity. Requires at least one admin contact. Auto-populates city/state from zip.
Tournament Setup ID: tournament-setup
Create or edit tournament configuration with rings, dates, and classifications.
Creates tournament with dates, rings, age classifications. Auto-calculates age ranges based on tournament start year. Sub-Junior classification optional. Form template for FluentML Site Builder; actual CPT saving happens in production pages.
Create New Tournament
General Information
Basic configuration for the main tournament.
Daily Event Configuration ID: create-daily-race
Setup for individual event events (Friday 30 Bird, etc.).
Links to a tournament. Defines targets, pricing, and sanctioning. Form template for FluentML Site Builder; actual CPT saving happens in production pages.
Create Event
Setup individual event details.
Purse Option Builder ID: purse-options
Template builder for money divisions and payouts.
Supports Percentage-based and Entry-based payout logic. Form template for FluentML Site Builder; actual purse management happens in production Tournament Details pages.
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total |
|---|---|---|---|---|---|---|---|
| 1-5 | 100% | - | - | - | - | - | 100% |
| 6-10 | 60% | 40% | - | - | - | - | 100% |
| 11-+ | 50% | 30% | 20% | - | - | - | 100% |
- Each row defines payout percentages for a specific entry count range
- Leave "Max" blank (showing "+") for open-ended ranges (e.g., 11+)
- All percentage rows must total exactly 100%
| Entry Range | 1st | 2nd | 3rd | 4th | 5th | 6th | Total | Actions |
|---|---|---|---|---|---|---|---|---|
|
-
|
100% |
|
||||||
|
-
|
100% |
|
||||||
|
-
|
100% |
|
Create Account Page ID: auth-register
Full page registration flow with split layout.
Full page registration flow with split layout.
Create Account
Enter your details to get started.
Already have an account? Log In
Login Page ID: login
Sign in form. POSTs to WordPress; redirect_to My Dashboard.
WordPress login. Use shortcode [helice_log_in] on Log In page. Plugin login_redirect sends users to My Dashboard.
Welcome Back
Sign in to your Clay Scores account.
Forgot Password ID: forgot-password
Reset password flow: user enters email, WordPress sends reset link.
POSTs to WordPress lost password. Use shortcode [helice_forgot_password] on Forgot Password page.
Reset Password
Enter your email address and we'll send you a link to reset your password.
User Profile ID: user-registration-edit-profile
Single form for new user/competitor registration and for editing profile. Context (public registration, My Profile, or Shooter Management) determines required/read-only fields and API target.
One form: registration and edit. Personal Identity (name, gender, DOB, age class badges, competitor number, member ID), Contact (email, mobile phone with country code), Mailing Address (street, line 2, city, state, zip, country). Account Credentials (registration only). Competitor number: lowest-available-gap assignment; canceled numbers reused.
User Profile
Register a new user/competitor or update an existing profile. Same form; context determines required fields and API.
Blank Registration Form ID: blank-registration-form
Printable Legal-size form for walk-up competitor registration. Blank until events added to tournament.
Form is blank until events are added to a tournament. Tournament Dashboard → Reports & Forms → Print Blank Forms opens this form. Events and purse options populate dynamically when configured. Per Blank Registration Form Master Spec v1.1.
Practice Score Sheet ID: practice-score-sheet
Blank Helice score sheet for practice. Letter landscape. Same sheet on screen and on paper.
Copy of the blank Helice Score Sheet. 27 shooter rows, targets 1–30 with a heavier line every five targets, separate Score column, and the barrel legend. Do not restyle it.
Sign In Sheet ID: sign-in-sheet
Blank shoot-order sheet. The club chooses the columns. No shooter number is assigned.
Opens with Name, Phone, Practice, # Practice Birds, 30 Bird Race, and 10 Bird Race. Email stays off until it is checked. Activity cells are the mark — no inner checkbox. Phone and email are wider; activity columns are narrower. Drag a column edge to change its width. 25 lines, filling the page, portrait or landscape. Nothing is saved and no shooter number is assigned.
Sign In Sheet
| Order | Name | Phone | Practice | # Practice Birds | 30 Bird Race | 10 Bird Race |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 | ||||||
| 9 | ||||||
| 10 | ||||||
| 11 | ||||||
| 12 | ||||||
| 13 | ||||||
| 14 | ||||||
| 15 | ||||||
| 16 | ||||||
| 17 | ||||||
| 18 | ||||||
| 19 | ||||||
| 20 | ||||||
| 21 | ||||||
| 22 | ||||||
| 23 | ||||||
| 24 | ||||||
| 25 |
10 Bird Race Entries ID: ten-bird-race-entries
Kay's 10 Bird Race - Entries sheet. Letter landscape. Blank write-in. Nothing is saved.
Columns from Kay's sheet: Shooter Name, Mobile Number, Shoot #, Pot $, targets 1-10, Score, Payout $, By Who. Twenty-five numbered lines. Race Pot Total at the bottom. Date and race time can be filled from a 10-bird race. Nothing is saved.
10 Bird Race - Entries
| Shooter Name | Mobile Number | Shoot # | Pot $ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Score | Payout $ | By Who | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | |||||||||||||||||
| 2 | |||||||||||||||||
| 3 | |||||||||||||||||
| 4 | |||||||||||||||||
| 5 | |||||||||||||||||
| 6 | |||||||||||||||||
| 7 | |||||||||||||||||
| 8 | |||||||||||||||||
| 9 | |||||||||||||||||
| 10 | |||||||||||||||||
| 11 | |||||||||||||||||
| 12 | |||||||||||||||||
| 13 | |||||||||||||||||
| 14 | |||||||||||||||||
| 15 | |||||||||||||||||
| 16 | |||||||||||||||||
| 17 | |||||||||||||||||
| 18 | |||||||||||||||||
| 19 | |||||||||||||||||
| 20 | |||||||||||||||||
| 21 | |||||||||||||||||
| 22 | |||||||||||||||||
| 23 | |||||||||||||||||
| 24 | |||||||||||||||||
| 25 |
Practice Sheet ID: practice-entries
Practice Sheet. Letter portrait or landscape. Blank write-in. Nothing is saved.
Title is Practice Sheet, not Sign In. Shooter Name, # Birds, targets 1-20 as squares. The barrel legend from the Practice Score Sheet prints under the grid. Portrait 34 lines; landscape 18. Date is on the right. Nothing is saved. This is not the Practice Score Sheet.
Practice Sheet
| Shooter Name | # Birds | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ||||||||||||||||||||||
| 2 | ||||||||||||||||||||||
| 3 | ||||||||||||||||||||||
| 4 | ||||||||||||||||||||||
| 5 | ||||||||||||||||||||||
| 6 | ||||||||||||||||||||||
| 7 | ||||||||||||||||||||||
| 8 | ||||||||||||||||||||||
| 9 | ||||||||||||||||||||||
| 10 | ||||||||||||||||||||||
| 11 | ||||||||||||||||||||||
| 12 | ||||||||||||||||||||||
| 13 | ||||||||||||||||||||||
| 14 | ||||||||||||||||||||||
| 15 | ||||||||||||||||||||||
| 16 | ||||||||||||||||||||||
| 17 | ||||||||||||||||||||||
| 18 | ||||||||||||||||||||||
| 19 | ||||||||||||||||||||||
| 20 | ||||||||||||||||||||||
| 21 | ||||||||||||||||||||||
| 22 | ||||||||||||||||||||||
| 23 | ||||||||||||||||||||||
| 24 | ||||||||||||||||||||||
| 25 | ||||||||||||||||||||||
| 26 | ||||||||||||||||||||||
| 27 | ||||||||||||||||||||||
| 28 | ||||||||||||||||||||||
| 29 | ||||||||||||||||||||||
| 30 | ||||||||||||||||||||||
| 31 | ||||||||||||||||||||||
| 32 | ||||||||||||||||||||||
| 33 | ||||||||||||||||||||||
| 34 |
Shooter Reports ID: shooter-reports
Generate customizable shooter lists with selected details.
Placeholder. Buildout: roster reports, shooter lists with selected columns.
Daily Reports ID: daily-reports
Generate winner lists and trophy reports for daily events.
Placeholder. Buildout: daily winner lists, trophy reports.
HOA Reports ID: hoa-reports
Print USHA HOA trophy standings and shootoff sheets.
Placeholder. Buildout: HOA trophy standings, shootoff sheets.
FITASC HOA Reports ID: fitasc-hoa-reports
Print FITASC HOA trophy standings and shootoff sheets.
Placeholder. Live print UI ships in Reports Hub (v13.0.306 modal). Custom multi-race awards, trophy presentation, and shootoff persistence ship in Reports Hub → Shootoffs & Trophies (v13.0.308).
Calcutta Reports ID: review-reports
Print Calcutta standings and payouts.
Placeholder. Buildout: Calcutta standings and payouts.
Score Entry Grid ID: score-entry
Digital score sheet for checking targets.
Grid layout for touch devices. Updates live leaderboard immediately.
Score Entry - Shooter Name
Score Cards ID: score-cards
Generate printable score cards for tournament events.
Placeholder. Buildout: printed score cards for physical use at rings (separate from Score Entry Grid).
Payout Simulator ID: payout-simulator
Tool for estimating purse payouts.
Client-side onlyN/AUsed by admins to verify purse settings before finalizing.
Event Simulation Engine
Test purse outcomes with simulated shooters and scores.
Tournament Simulator
Current View: Championship Purse (1st,2nd,3rd) — Purse: $1,350 — Pays: Rank 1: 50%, Rank 2: 30%, Rank 3: 20%
| Name | Rk | Spl | % | Win |
|---|---|---|---|---|
| No data. | ||||
| Showing top 20 results | ||||
Live Payout Monitor
Payouts below are calculated directly from the current entries and scores for this tournament and event. Use this view on a monitor or TV to keep competitors updated throughout the day.
Championship Purse (1st,2nd,3rd)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 2
#000
Shooter Name 3
#000
|
XX/XX
XX/XX
|
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 4
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
JUMBO Purse (1st,2nd,3rd)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 2
#000
Shooter Name 3
#000
|
XX/XX
XX/XX
|
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 4
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Consolation Purse (4th,5th,6th)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
4th Place
50% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
5th Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX
XX/XX
|
$XXX.XX
($XXX.XX ea)
|
|
6th Place
20% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Each Set of 10s Purse (One Money)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
100% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX
XX/XX
|
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
100% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Each Set of 15s Purse (Two Money)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
40% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX
XX/XX
|
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
4th Place
40% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Long Run Front Purse (One Money)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Long Run Back Purse (One Money)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Longest Run Purse (One Money)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Lady's Purse**
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
40% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Sub-Junior (up to 15)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
40% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Junior (ages 16-20)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
40% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Men's ages 21+**
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
40% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Senior's ages 56+**
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
40% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Veteran's ages 66+**
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
40% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Master's ages 73+**
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
60% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
40% of purse
|
Shooter Name
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
HOA Open Purse (1st, 2nd, 3rd)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker One
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker Two
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 1
#000
Tie Breaker Three
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
HOA Lady's Purse
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker One
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker Two
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 1
#000
Tie Breaker Three
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
HOA Sub-Junior (up to 15)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker One
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker Two
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 1
#000
Tie Breaker Three
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
HOA Juniors (ages 16-20)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker One
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker Two
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 1
#000
Tie Breaker Three
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
HOA Men's Purse (ages 21 and up)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker One
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker Two
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 1
#000
Tie Breaker Three
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
HOA Senior's Purse (ages 56 and up)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker One
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker Two
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 1
#000
Tie Breaker Three
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
HOA Veteran's Purse (ages 66 and up)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker One
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker Two
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 1
#000
Tie Breaker Three
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
HOA Master's Purse (ages 73 and up)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker One
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
Tie Breaker Two
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
3rd Place
20% of purse
|
Shooter Name 1
#000
Tie Breaker Three
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Calcutta Open Purse (1st, 2nd, 3rd)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
50% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
|
2nd Place
30% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Calcutta Lady's Purse
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Calcutta Sub-Junior (up to 15)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Calcutta Juniors (ages 16-20)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Calcutta Men's Purse (ages 21 and up)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Calcutta Senior's Purse (ages 56 and up)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Calcutta Veteran's Purse (ages 66 and up)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Calcutta Master's Purse (ages 73 and up)
| Place | Shooter(s) | Score | Payout |
|---|---|---|---|
|
1st Place
100% of purse
|
Shooter Name 1
#000
Shooter Name 2
#000
|
XX/XX |
$XXX.XX
($XXX.XX ea)
|
Tournament Name
Competitor Information
Search for existing member or register new competitor
Contact Information
Stored as full international format (e.g. +1 (512) 555-0199). US: auto-format (XXX) XXX-XXXX.
Enter zip first — auto-populates City and State (US).
Default: United States. Priority: US, Canada, Mexico; then A–Z.
Event Selection
Select events and purse options for this competitor
No events for this tournament.
Payment Summary
Protocol v8.0 Source of Truth — Design Guide (live)
1. Typography
Font Family (editable):
2. Color Palette & Structure
A. Brand & Functional (Solid) — D. Brand Transparency under each (editable %)
Adjust the transparency percentage (0–1, e.g. 0.125 = 12.5%) for each color to check how it looks.
B. Alpha Scale (Transparent) — C. Solid Tints (Same Percentages)
Side-by-side: Transparent (Alpha) | Solid (Tint) — both editable
B. Alpha Scale (Transparent)
C. Solid Tints (Same Percentages)
3. Components
Sizing
Badge radius, button height/radius, card radius, border thickness.
1. Buttons (Height: 40px, Radius: 6px) — Editable
Edit background, border, and font color for each button. Save Design Style to apply.
2. Status Badges & Tags (Radius: 6px — No Pills) — Editable
Edit background, border, and font color for each badge. .hs-badge default: blue background, white font (STEP 1 style). Save Design Style to apply.
.hs-badge, .hs-tag { border-radius: 6px !important; background: var(--helice-badge-step-bg); color: var(--helice-badge-step-color); } /* STRICT: DO NOT USE PILL SHAPE. Default: blue background, white font. */
4. Card Geometry & Accents — Editable
MANDATORY: Accents MUST use native CSS borders (3.5px) on the card container. Do NOT use absolute positioned bars.
Standard Card
Radius: 8px
Shadow: 0 1px 2px rgba(0,0,0,0.05)
Example card — Accent colors editable below
5. Icons — Editable
Implementation: Position absolute (right side of date input), size 18x18px, cursor pointer.
Functionality: JavaScript click handler calls
input.showPicker() to trigger calendar popup.Styling: Hide browser's native calendar icon via CSS (
::-webkit-calendar-picker-indicator { display: none; }).Color: Default rgba(28,37,53,0.50), hover rgba(28,37,53,0.75).
Implementation: Position absolute (right side of time input), size 18x18px, cursor pointer. Add class
hs-race-time-icon for JavaScript targeting.Functionality: JavaScript click handler calls
input.showPicker() to trigger time picker popup.Styling: Hide browser's native time picker icon via CSS (
::-webkit-calendar-picker-indicator { display: none; }).Color: Default rgba(28,37,53,0.50), hover rgba(28,37,53,0.75).
Implementation: Used in dropdown menus and action buttons. Size typically 14-16px for menus, 24px for standalone buttons.
Usage: Appears in purse template menus (Edit/Duplicate/Delete), form registries, and data management tables.
SVG Path: Two overlapping rectangles representing "copy" action — front rect with rounded corners, back rect offset to show layering.
Color: Default #6b7280 (gray), inherits stroke color from parent context.
Specific action icons used in management tables, color-coded to function. Edit color below each icon.
6. Demographic Classification Badges — Editable
Standardized demographic tags using 12.5% opacity backgrounds. Radius: 6px. Edit color below each badge.
7. Award Ribbons (Places 1-6) — Brand Coordinated — Editable
Phone & Address Rules
All forms (Add Club, Edit Club, Club Management, Club Contacts, Add/Edit Contact, etc.) follow these rules. Reference: Design Guide
Phone
- Display (UI): US/Canada (+1) shown as
(XXX) XXX-XXXX(e.g. (512) 394-4419). Applies everywhere: club phone, contact phone, view and edit. Legacy or malformed values (e.g. 12 digits with double 1) are normalized for display. - Storage: E.164-style; US stored as
+1 (XXX) XXX-XXXX. Strip non-numeric on save; 11- or 12-digit with leading 1(s) normalized to 10 digits so no duplicate country code. - Input masking: US/Canada
(###) ###-####. On blur, format to (XXX) XXX-XXXX. Placeholder: (555) 123-4567. Min 7 digits, max 15 (excluding country code).
Address / Zip
- Zip: US 5-digit (
78701) or Zip+4 (78701-1234). On blur, 5+ digit US zip triggers city/state auto-populate (e.g. zippopotam). International: alphanumeric allowed (max 10 chars). - State/Province: Stored as 2-letter ISO (
TX,CA). US states + DC + territories (PR, VI, GU, MP, AS). - Country: ISO 3166-1 alpha-2; default United States (US).
6. Key Specifications Summary
| Property | Value |
|---|---|
| Card border-radius | 8px |
| Card border | 1px solid #D2D3D7 |
| Card shadow | 0 1px 2px rgba(0,0,0,0.05) |
| Accent bar thickness | 3.5px |
| Badge border-radius | 6px — NO PILLS |
| Badge background | 12.5% opacity of brand color |
| Button height | 40px |
| Button border-radius | 6px |
| Page background | #F4F4F5 (Tint 5%) |
| Card background | #FBFBFB |
| Left menu background | #131B31 (dark sidebar) |
| Active menu item | Orange #E67700 |
| Gender: “Lady” capitalization | Always title case — “Lady”, never “lady” |
| Gender: “Man” display | Hidden in reports (blank/dash); visible in profile badges |
Accent Card Styles — Where Each Style Goes
Three accent positions. Use the right position for the right purpose — Top = info only, Left = main actions, Bottom = info + clickable links. Accent weight: 3.5px. Native CSS borders only.
Design Guide (source of truth): https://helicescores.com/design-styles/
1. Top Accent — Information, Forms & Data, Header Sections
Rule: NO action with these. Display only: stats, forms, section headers. Buttons/links inside the card are fine; the accent itself is not an action.
Examples: Welcome card, My Tournaments / Avg Score / Ranking stat cards; Competitors, Fees, Purchases, Purse, Review stat row; Add New Club form; Tournament Setup (General Information, Ring Configuration); Tournament Overview & Targets; Tournament Events & Leaderboards section headers.
Color here: Blue = basic stats, Orange = edit/add, Red = warnings/shooter lists/scores, Green = financials.
2. Left Accent — Main Action Items (Clickable)
Rule: These are clickable and take you to another page or section. Use for: tournament title/header, and for action cards (Event Management, Reports, Enter Scores, Pro Shop, etc.).
Examples: Tournament Dashboard header (e.g. "White Winged Open 2025" with Edit Details); Event Management, Manage Contacts, ProShop, Payments, Reports & Forms, Enter Scores, View Results, Live Display.
3. Bottom Accent — Information Sections with Clickable Links
Rule: Information + a link for more. Card shows a stat/summary; the link at the bottom goes to more detail or management.
Examples: Admin Dashboard (Total Clubs, System Alerts, Active Tournaments, Total Users) with "Manage clubs →", "View logs →", etc.; Club Dashboard (Active Tournaments, Upcoming Events, Completed Events, Avg. Shooters) with "View active →", "View calendar →", etc.
Color: Blue = basic stats, Orange = edit/add, Red = warnings/shooter/scores, Green = financials.
Summary — Accent Style and Where It Goes
| Accent | Purpose | Examples |
|---|---|---|
| Top | Information, forms, data, header sections. NO action with the accent (display only). | Welcome card, stat cards (My Tournaments, Avg Score, Ranking, Competitors, Fees, Purse, Review), Add New Club form, Tournament Setup blocks, Tournament Overview, Tournament Events section |
| Left | Main action items. Clickable — take you to another page/section. Also: tournament title/header. | Tournament Dashboard header (tournament name + Edit Details), Event Management, Manage Contacts, ProShop, Payments, Reports & Forms, Enter Scores, View Results, Live Display |
| Bottom | Information section with a clickable link for more information. | Admin Dashboard (Total Clubs → Manage clubs, System Alerts → View logs, etc.); Club Dashboard (Active Tournaments → View active, Upcoming → View calendar, etc.) |
Accent Colors — Total List
All four accent colors in one place. Unless otherwise listed or changed:
| Color | Hex | Use for |
|---|---|---|
| Blue / Navy | #232F43 | Basic stats. Club info, counts, structure, Live Display. Tournament status: Upcoming = Blue. |
| Orange | #E67700 | Edit/add data. Tournament header, ProShop, filters, forms, CTAs, View Results, Event Management. Tournament status: Active = Orange. |
| Red | #883730 | Warnings, shooter lists, scores. Alerts, Manage Contacts, Enter Scores, score cards, ranking. Tournament status: Past = Red. |
| Green | #405639 | All financials. Purse, Payments, Review, fees, purchases, receipts, Reports & Forms, payouts, financial reports & tools. |
Quick reference (same colors):
- Blue #232F43 — Basic stats. Upcoming = Blue.
- Orange #E67700 — Edit/add data. Active = Orange.
- Red #883730 — Warnings, shooter lists, scores. Past = Red.
- Green #405639 — All financials.
Resolved Decisions
- Reports & Forms — Green (main card). Optional: Green for financial report links, Red for score-card/shooter-list links inside the page.
- View Results — Orange (primary action).
- Calcutta — Green (financial).
- Fees / Purchases (stat cards) — Green (financials).
- Contact Management (filters + table) — Red (shooter list).
- Tournament status (stat cards) — Blue = Upcoming, Orange = Active, Red = Past.
- Ranking (stat) — Red (scores-related).
- Event Management — Orange (edit/setup).
Design Guide (source of truth): https://helicescores.com/design-styles/
Accent weight: 3.5px. Native borders only.
Add Inventory Item ID: add-inventory-item
Create product or service for Pro Shop.
Items will live in WooCommerce or FluentCart when installed. No CPT for now—placeholder infrastructure only. ProShop table shows fake/placeholder items until integration. Required: Item Name, Category, Price. Stock -1 = unlimited. Active toggle controls visibility in shop; Rental Item enables daily rental pricing.
Add ProShop Item
Create a product or service for the Pro Shop.
Payment Manager ID: payment-manager
Record payments, payouts, and manage tournament financials.
Placeholder. Buildout: Payout Simulator, Tournament Simulator, Live Payout Monitor links; Record Payment, Record Payout.