# DYC Race Officer & Governor's Operational Guide
**Dahlgren Yacht Club — Invitational Regatta Hub Operations & Memory Manual**

This document serves as the permanent operational manual and "memory" for the **DYC Race Governor**, **Race Committee**, and **Principal Race Officers (PRO)** managing DYC Invitational Regattas (such as the *Dahlgren Cup* and *Under the Guns Regatta*).

---

## 🧭 Quick Reference & Key Links

| Resource | URL / Access | Purpose |
| :--- | :--- | :--- |
| **Live Regatta Hub** | [dahlgrenyachtclub.org/race/invitational-hub.html](https://dahlgrenyachtclub.org/race/invitational-hub.html) | Public notice board, online registration, live scratch sheet, scores, and photo gallery. |
| **Race Officer Console** | Live Hub → **⚙️ Race Officer** tab | Broadcast delays, post bulletins, dispatch batch emails, archive events. |
| **Race Officer PIN** | **`7171`** *(or `1369`)* | Unlocks the web console on phone, tablet, or desktop. |
| **Google Sheets Roster & Scorer** | [DYC Regatta Management Sheet](https://docs.google.com/spreadsheets/d/1CGOPkB_qEIIVuq6MeTXTcE14K-_9n8UQ1mGez7XyYCQ/edit) | Master database: registrations, standing prospective list, scoring, and history. |
| **Google Drive Photos Folder** | [DYC Regatta Photos Drive Folder](https://drive.google.com/drive/folders/1KQDrFcCTf4i8ByAVCfZLgu-AISIkt3qL) | Stores high-resolution photos uploaded by participants and spectators. |
| **Apps Script Web API** | `https://script.google.com/macros/s/AKfycbw0e_OS5X4_foLgUyLxp2DtXR2V3Kv3rUGnZNBTricLrJRIIAbWEPo841JKZXTnJqfY/exec` | Backend microservice connecting the web page to Google Sheets and Drive. |

---

## 🏛️ System Architecture Overview

```
 [Competitors & Visiting Clubs]
         │ (Mobile Browser)
         ▼
 ┌────────────────────────────────────────────────────────┐
 │   DYC Invitational Regatta Hub                         │
 │   (/race/invitational-hub.html)                        │
 │                                                        │
 │  📢 Notice Board       📝 Online Registration          │
 │  ⛵ Scratch Sheet      🏆 Results & Scoring             │
 │  📸 Photo Gallery      ⚙️ Race Officer Console          │
 └───────────────────────────┬────────────────────────────┘
                             │ JSONP / REST
                             ▼
 ┌────────────────────────────────────────────────────────┐
 │   Google Apps Script Web App Engine                    │
 │   (/race/invitationals-apps-script.gs)                 │
 └─────────────┬───────────────────────────┬──────────────┘
               │                           │
               ▼                           ▼
 ┌───────────────────────────┐ ┌──────────────────────────┐
 │   Google Sheets Database  │ │   Google Drive Media     │
 │   ("DYC Regatta Mgmt")    │ │   ("DYC Regatta Photos") │
 │                           │ │                          │
 │ • Config                  │ │ Full-resolution boat &   │
 │ • Registrations (Active)  │ │ finish line photographs  │
 │ • ProspectiveRacers (★)   │ └──────────────────────────┘
 │ • Announcements (Live)    │
 │ • Results (Scoring)       │
 │ • Archives (History)      │
 └───────────────────────────┘
```

---

## 📋 The Standing Tab: `ProspectiveRacers`

In the [Google Sheet](https://docs.google.com/spreadsheets/d/1CGOPkB_qEIIVuq6MeTXTcE14K-_9n8UQ1mGez7XyYCQ/edit), there is a permanent standing tab named **`ProspectiveRacers`**.

### What It Is
* Unlike the `Registrations` tab (which gets archived and reset between races), **`ProspectiveRacers` is permanent and is never cleared**.
* It stores the master contact roster of regional skippers, invited clubs, past participants, and prospective racers across the Potomac and Chesapeake regions.

### Structure (Row 1 Headers)
| `name` | `email` | `club` | `notes` |
| :--- | :--- | :--- | :--- |
| Mark Liersch | liersch.mark@gmail.com | DYC | Race Governor |
| Chip Warder | 4warders@gmail.com | DYC | Freedom 35 |
| Jane Doe | jane.doe@example.com | DISC | J/24 Skipper |
| John Smith | jsmith@example.org | MVYC | Express 27 |

> [!TIP]
> The email extractor is flexible: column names can be `email`, `Email`, `emailAddress`, or `skipperEmail`. Any valid email address in that row will be automatically included.

---

## 🚀 Race Officer Operational Workflows

### Phase 1: Announcing an Upcoming Regatta (3–4 Weeks Out)

1. Open the [Regatta Hub](https://dahlgrenyachtclub.org/race/invitational-hub.html).
2. Go to the **⚙️ Race Officer** tab and enter PIN **`7171`** (or `1369`).
3. Scroll to the **📨 Announce Race / Email Prospective Racers** card.
4. Select the target audience:
   * **📋 Prospective Racers Standing List**: Dispatches exclusively to your master list in Google Sheets.
   * **📢 Combined List**: Dispatches to both the standing list and any early registrants (automatically deduplicated).
5. The system automatically pre-populates an email subject and body with:
   * Event Name & Date
   * VHF Working Channel
   * Notice of Race (NOR) hyperlink
   * Live Regatta Hub & Registration link
6. *(Optional)* Edit or add custom notes to the message body.
7. Leave **"Also post this announcement to the Live Notice Board"** checked.
8. Click **🚀 Dispatch Race Announcement Email**.
   * The script delivers emails in safe batches of 15 recipients with 1.5-second pauses, preventing ISP throttling and spam filters.

---

### Phase 2: Monitoring Registrations & Scratch Sheet

1. Visiting skippers visit the **📝 Register Boat** tab on their phones or computers.
2. They select their home club (DYC, DISC, MVYC, ODBC, QYC, SMCM, or enter their own custom club).
3. The moment a skipper submits:
   * The entry appears immediately on the public **⛵ Scratch Sheet** tab.
   * A confirmation email is automatically sent to the skipper.
   * A new row is recorded in the **`Registrations`** tab of the Google Sheet.
4. **Assigning PHRF Ratings**: If an entrant has an unknown rating, the Race Governor can open the Google Sheet and update the `rating` cell directly.

---

### Phase 3: Race Morning & On-the-Water Logistics

The Race Officer Console works entirely on mobile phones and tablets from the committee boat or dock.

#### 1. Checking the Working Channel
* **Dahlgren Cup**: VHF Channel **71**
* **Under the Guns Regatta**: VHF Channel **72**

#### 2. Posting Weather Bulletins or Delays (AP Flag)
1. Open **⚙️ Race Officer** tab → Enter PIN **`7171`**.
2. Under **📡 Broadcast Status Update to Fleets**:
   * Change **Race Status** to:
     * 🟢 **ON SCHEDULE** *(Racing as Planned)*
     * 🟡 **POSTPONED / AP FLAG UP** *(Wind/Weather Delay)*
     * 🔴 **ABANDONED / RESCHEDULED**
     * 🔵 **RACING COMPLETED** *(Scores Posted)*
   * Enter the bulletin title (e.g., *"1-Hour AP Delay due to light breeze"*).
   * Enter instructions (e.g., *"Next announcement at 11:30 AM on VHF 72. Starting area moving south."*).
   * Check **"Dispatch automated batch email alert"**.
   * Select audience: **⛵ Current Registered Skippers Only** (recommended on race morning).
3. Click **📢 Post Bulletin & Update Status**.
   * The live status ribbon on the public hub updates instantly with color-coded badges.
   * All registered skippers receive the notification on their mobile phones.

---

### Phase 4: Scoring & Publishing Results

1. Open the [Google Sheet (`DYC Regatta Management`)](https://docs.google.com/spreadsheets/d/1CGOPkB_qEIIVuq6MeTXTcE14K-_9n8UQ1mGez7XyYCQ/edit).
2. Click the **`Results`** tab.
3. Fill in the race scoring:
   * `fleet`: *PHRF Spinnaker*, *PHRF Non-Spinnaker*, etc.
   * `place`: *1*, *2*, *3*, etc.
   * `boatName`, `sailNumber`, `skipperName`, `club`
   * `elapsedTime`, `correctedTime`, `points`
4. When finished, switch to the **⚙️ Race Officer** console on the website:
   * Set Race Status to 🔵 **COMPLETED (Scores Posted)**.
   * Post a final bulletin thanking all participating clubs and announcing trophies.
5. The public **🏆 Results** tab on the Hub immediately displays the formatted scoreboard broken down by fleet.

---

### Phase 5: Participant Photo Dropzone

1. Competitors and spectators can tap the **📸 Photos** tab on the hub.
2. They select a photo from their camera roll, type their name/caption, and tap **Upload to Regatta Gallery**.
3. Photos upload directly into the [DYC Regatta Photos Drive Folder](https://drive.google.com/drive/folders/1KQDrFcCTf4i8ByAVCfZLgu-AISIkt3qL) and appear in the website gallery with lightbox zoom.

---

### Phase 6: Archiving & Resetting for the Next Regatta

When a regatta is concluded and you are ready to prepare the website for the next event:

1. Open the **⚙️ Race Officer** console.
2. Scroll to **🗄️ Archive Event & Prepare Next Race**.
3. Enter:
   * **Next Event Title**: (e.g., *Dahlgren Cup 2027*)
   * **Next Event Date**: (e.g., *Saturday, August 21, 2027*)
4. Click **📦 Archive & Reset for Next Race**.

#### What Happens Behind the Scenes:
* A complete snapshot of all competitor entries, scores, bulletins, and photos is permanently stamped into the **`Archives`** sheet tab for historical records.
* The active `Registrations`, `Results`, `Announcements`, and `Photos` tabs are wiped clean for the new race.
* **The `ProspectiveRacers` master list is NEVER erased.**
* The live website updates its titles and schedule to the new event.

---

## 🛠️ Troubleshooting & Google Cloud Administration

### 1. Board Members See "Someone needs access to 'DYC Regatta Management'"
* **Cause**: Google Drive permissions on the spreadsheet are set to "Restricted".
* **Fix**:
  1. Open the [Google Sheet](https://docs.google.com/spreadsheets/d/1CGOPkB_qEIIVuq6MeTXTcE14K-_9n8UQ1mGez7XyYCQ/edit).
  2. Click the blue **Share** button in the top right.
  3. Under **General access**, set to **"Anyone with the link"** and select **Editor** (or add individual BOG member emails).
  4. Repeat for the [Google Drive Photo Folder](https://drive.google.com/drive/folders/1KQDrFcCTf4i8ByAVCfZLgu-AISIkt3qL) (set to **Viewer**).

### 2. Website Shows "0 contacts" for Prospective Racers
* **Cause**: Google Apps Script web apps run immutable deployments. If the script was edited without deploying a "New version", it runs the older build.
* **Fix**:
  1. In the Google Sheet, open **Extensions** > **Apps Script**.
  2. Ensure the code matches [`race/invitationals-apps-script.gs`](file:///c:/dyc_development/public_html/race/invitationals-apps-script.gs).
  3. Click **Deploy** > **Manage deployments**.
  4. Click the **Pencil (Edit)** icon.
  5. In the **Version** dropdown, choose **"New version"**.
  6. Click **Deploy**.

### 3. Changing the Race Officer PIN
* The default PIN is configured in Google Sheet tab **`Config`** under key `adminPin` (`7171` or `1369`).
* You can change the PIN in the sheet at any time; the website and backend will recognize the new PIN immediately.

---

## 📅 Annual DYC Invitational Racing Calendar

| Regatta | Typical Timeframe | Primary Fleets | Default VHF | Notice of Race |
| :--- | :--- | :--- | :--- | :--- |
| **Dahlgren Cup** | Mid-to-Late August | PHRF Spinnaker, Non-Spin, Cruising | VHF 71 | [`/race/invitrace/DahlgrenCupNOR.html`](file:///c:/dyc_development/public_html/race/invitrace/DahlgrenCupNOR.html) |
| **Under the Guns Regatta** | Early-to-Mid October | PHRF Spinnaker, Non-Spin | VHF 72 | [`/race/invitrace/UtgNOR.html`](file:///c:/dyc_development/public_html/race/invitrace/UtgNOR.html) |

---
*Maintained by Dahlgren Yacht Club (DYC) — Dahlgren, Virginia.*  
*Last updated: October 2026.*
