Leaderboard for the GTA West Clublink Invitational
The configuration is split into site-level and year-specific files so that the project can be reused across multiple seasons without touching historical data.
Contains information that applies across all seasons:
{
"league": {
"name": "West GTA Clublink Men's Invitational",
"currentYear": 2026,
"githubRepo": "owner/repo-name"
}
}| Field | Description |
|---|---|
league.name |
Display name of the league |
league.currentYear |
The active season year |
league.githubRepo |
owner/repo path used by the admin dues page to create GitHub issues |
Contains members, courses, and scoring rules for a single season:
{
"bonusRoundsCount": 3,
"members": [
{ "name": "Player Name", "individualId": 1234567, "cardId": "...", "paid": true }
],
"courses": [
{ "name": "Course Name", "clubId": "20599", "roundsCount": 1 }
]
}| Field | Description |
|---|---|
bonusRoundsCount |
Number of bonus rounds to count (default: 3) |
members[].individualId |
Golf Canada individual ID used to fetch score history |
members[].cardId |
Golf Canada card number (optional) |
members[].paid |
Whether the member has paid entry fees for this season |
courses[].clubId |
Golf Canada club ID |
courses[].roundsCount |
Required rounds at this course (0 = bonus-eligible only) |
At the end of a season, generate a static snapshot of the leaderboard by running:
# Set Golf Canada credentials, then:
npx astro build
# Copy the generated YearlyScores object into config/{year}/results.jsonWhen config/{year}/results.json is present, all future builds load the season data directly from that file without making any Golf Canada API calls. Only the season specified by currentYear in site.json makes live API requests.
Example structure:
{
"year": 2025,
"generatedAt": "2025-09-01T00:00:00.000Z",
"players": [...]
}- Increment
currentYearinconfig/site.json - Create
config/{newYear}/config.jsonwith the members, courses, and scoring rules for the new season - The previous year's pages will continue to build from their
results.jsonif one exists
npm install
npm run dev # local dev server
npm run build # production build (requires GOLFCANADA_USERNAME / GOLFCANADA_PASSWORD env vars)
npm run preview # preview the production build