Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/orchestrate-tickets/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ You drive; the agents do the work. Never implement, review, run `check.sh` or ed
- A dependent starts only once its parent's PR is ready for review, so the code it builds on has stopped moving; it stacks on the parent's branch. Two unmerged parents means it waits for the user to merge one. In a `merge on` run there is no stacking: a dependent waits until its parent has merged and starts from `main`. `$R ready` enforces all of this.
- Only you merge, only with `$R merge`, and only in a run started with `--merge`. Agents never merge or push to `main`. You may commit and push your own fixes to the ticket tooling (`.claude/`, `docs/tickets/`) straight to `main` as you go, never site code.
- When a parent changes or merges under a stacked child still in flight, send the child's reviewer (or implementer) to rebase with the `gh-stack` skill, then `check.sh` and `ship.sh`.
- Every push costs a Netlify build on the free plan, and parallel agents multiply Google Sheet requests (INSTRUCTIONS.md §4). Keep `--parallel` at 3 or below unless the user asks.
- Every push costs a Netlify build on the free plan, and parallel agents multiply them. Keep `--parallel` at 3 or below unless the user asks.
- The hard rules in `docs/tickets/INSTRUCTIONS.md` §5 apply to every agent; a reviewer that finds one broken reports it as critical and the loop fixes it like any other finding.
- `/tickets` is the same loop one ticket at a time on the main checkout; `/ticket` is one ticket in your own session.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ jobs:
- run: pnpm typecheck
- run: pnpm build
env:
SHEET_CSV_URL: ${{ vars.SHEET_CSV_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
PAYLOAD_SECRET: ${{ secrets.PAYLOAD_SECRET }}
36 changes: 14 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-4-06B6D4?style=flat-square&logo=tailwindcss&logoColor=white)](https://tailwindcss.com/)
[![Three.js](https://img.shields.io/badge/Three.js-0.187-black?style=flat-square&logo=three.js&logoColor=white)](https://threejs.org/)

A dynamic Next.js website for the 6-piece funk/pop band Clark's Bowling Club, featuring bilingual content, interactive 3D elements, and content management via Google Sheets.
A dynamic Next.js website for the 6-piece funk/pop band Clark's Bowling Club, featuring bilingual content, interactive 3D elements, and content managed in Payload CMS.

## Table of Contents

Expand All @@ -33,15 +33,15 @@ A dynamic Next.js website for the 6-piece funk/pop band Clark's Bowling Club, fe
🎤 **Lyrics Display**: Searchable lyrics organised by album
🔍 **SEO Optimised**: Automatic sitemap generation, robots.txt, and LLMs.txt
♿ **Accessibility**: ARIA labels, keyboard navigation, reduced motion support
📊 **Dynamic Content**: Pages populated from Google Sheets CMS
📊 **Dynamic Content**: Pages populated from the Payload CMS

## Tech Stack

- **Framework**: [Next.js 16](https://nextjs.org/) with TypeScript
- **Styling**: [Tailwind CSS](https://tailwindcss.com/) with custom fonts
- **3D Graphics**: [Three.js](https://threejs.org/) for interactive elements
- **Email**: [Nodemailer](https://nodemailer.com/) for contact forms
- **Data**: Google Sheets as CMS via CSV exports
- **Data**: [Payload CMS](https://payloadcms.com/) on Neon Postgres
- **Icons**: [React Icons](https://react-icons.github.io/react-icons/) (Font Awesome 6)
- **State**: React Context for language switching
- **Deployment**: [Netlify](https://www.netlify.com/)
Expand Down Expand Up @@ -109,8 +109,16 @@ src/
Create a `.env.local` file in the root directory:

```bash
# Google Sheets Configuration
SHEET_CSV_URL=https://docs.google.com/spreadsheets/d/[SHEET_ID]/export?format=csv
# Payload Configuration
DATABASE_URL=postgres://user:password@host/db
PAYLOAD_SECRET=a_long_random_string

# Media storage (S3-compatible, Neon object storage)
S3_ENDPOINT=https://storage.example.com
S3_REGION=eu-central-1
S3_BUCKET=media
S3_ACCESS_KEY_ID=your_access_key_id
S3_SECRET_ACCESS_KEY=your_secret_access_key

# Site Configuration
NEXT_PUBLIC_SITE_URL=https://clarksbowlingclub.com
Expand All @@ -125,23 +133,7 @@ EMAIL_PASSWORD=your_app_password

## Content Management

Content is managed via Google Sheets with specific tab GIDs:

- **About Page**: GID 0 (title, content)
- **Music**: GID 1713768433 (embedded media, categories)
- **Lyrics**: GID 145198726 (songs, albums, lyrics)
- **Tour Page**: GID 127405583 (page content)
- **Tour Dates**: GID 572869052 (events, venues, tickets)

### Sheet Format

Pages use this structure:

```csv
key,english,french
title,About,Bio
content,"Band description...","Description du groupe..."
```
Content is edited in the Payload admin at `/admin`. See `docs/admin-guide.md`.

## Key Components

Expand Down
5 changes: 2 additions & 3 deletions docs/tickets/INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,13 @@ One checkout, one ticket in flight at a time, except under `/orchestrate-tickets
| Dev server | `pnpm dev --port <4000 + issue number>`, e.g. ticket 27 uses 4027. Run it in the background and stop it when you're done |
| The user's own server | Port 3000 belongs to the user. Never use it, never stop it |
| Env file | `.env.local` in the repo root. Read variable names only. Once Payload lands (#33), its `DATABASE_URL` must point at the Neon `dev` branch, because `pnpm dev` will push the Payload schema to it |
| Content | Payload when `DATABASE_URL` is set (`src/lib/data/payload.ts`), otherwise the published Google Sheet (`src/lib/data/sheet.ts`). Production reads the sheet until the switchover in #33. Local storage variables are `S3_ENDPOINT`, `S3_REGION`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY` and `S3_BUCKET`; `neon checkout` writes Neon's `AWS_*` names, so copy them across. `pnpm content:import` and `pnpm content:compare` run against whatever `DATABASE_URL` points at |
| Content | Payload (`src/lib/data/payload.ts`), which needs `DATABASE_URL`. Local storage variables are `S3_ENDPOINT`, `S3_REGION`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY` and `S3_BUCKET`; `neon checkout` writes Neon's `AWS_*` names, so copy them across. |
| Artefacts | Screenshots, logs and scratch scripts go in `.git/ticket/<issue number>/artefacts/`, never in the working tree |

Rules:

- Stop only your own dev server, by port: `lsof -tiTCP:<port> -sTCP:LISTEN | xargs kill`. Never `pkill`.
- Never print `.env.local` or any secret, and never commit one.
- The Google Sheet throttles: a burst of requests made it stop answering for about 15 minutes on 11 November 2026, and pages sat on "Loading...". Load pages that read it as few times as you need, and don't script loops against it.
- The contact form sends real email through the band's mailbox. Never submit it against production. To test it locally, start the dev server with `EMAIL_HOST`, `EMAIL_PORT` and `EMAIL_SECURE` overridden in the shell to point at a local SMTP catcher (for example `maildev`), and read the message there.
- Parallel sessions share the Playwright browser tab; prefer an isolated headless script.

Expand Down Expand Up @@ -130,7 +129,7 @@ The Netlify, Neon and GitHub tools are installed and signed in. Use them to find
| Deploy previews | One per PR, at `https://deploy-preview-<PR number>--clarksbowlingclub.netlify.app`. `gh pr checks <branch>` shows when it is ready |
| Build | `@netlify/plugin-nextjs`; settings are in the Netlify UI until `netlify.toml` lands (#26) |
| Free plan limits | 100 GB bandwidth, 300 build minutes and 125,000 function calls a month. Each push to a PR costs a build, so push as few times as you can |
| Environment variables | All contexts: `EMAIL_HOST`, `EMAIL_PORT`, `EMAIL_SECURE`, `EMAIL_USER`, `EMAIL_PASSWORD` (secret), `SHEET_CSV_URL` (server-only; it replaced `NEXT_PUBLIC_CSV_URL` in #27). Deploy previews only, until the migration: `DATABASE_URL`, `PAYLOAD_SECRET`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY` (secrets), `S3_ENDPOINT`, `S3_REGION`, `S3_BUCKET`. Netlify reserves the `AWS_*` names, so Neon's storage credentials are stored as `S3_*` |
| Environment variables | All contexts: `EMAIL_HOST`, `EMAIL_PORT`, `EMAIL_SECURE`, `EMAIL_USER`, `EMAIL_PASSWORD` (secret). Also `DATABASE_URL`, `PAYLOAD_SECRET`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY` (secrets), `S3_ENDPOINT`, `S3_REGION`, `S3_BUCKET`. Netlify reserves the `AWS_*` names, so Neon's storage credentials are stored as `S3_*` |
| Database | Neon project `cbc` (`damp-truth-56586096`), Frankfurt, free plan, in the Tandem Neon account: run Neon commands with `NEON_PROFILE=tandem`. Branches: `main` (production, empty until the migration), `preview` (shared by every deploy preview), `dev` (local). Bucket `media` on each branch. Spiked in #32; migration in #33 |

Reads are always fine: deploy logs (`netlify api getDeploy`, `listSiteDeploys`), variable names, DNS lookups. Anything that changes a hosted service needs the user's approval first; agents ask the `/tickets` driver, and the driver asks the user. The one standing exception is the Neon `dev` and `preview` branches: a ticket may push schema to `dev`, run `payload migrate` on `preview` and create test content on either. Both are disposable: a ticket or driver may reset them to their parent (`neon branches reset <branch> --parent`) whenever work needs it. Deleting a branch still needs approval, and `main` is never written.
Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"start": "next start",
"lint": "eslint",
"typecheck": "tsc --noEmit",
"content:import": "NODE_ENV=production payload run src/scripts/importSheet.ts",
"content:compare": "NODE_ENV=production payload run src/scripts/compareSources.ts",
"payload": "payload"
},
"dependencies": {
Expand All @@ -26,7 +24,6 @@
"hls.js": "^1.7.4",
"next": "16.4.6",
"nodemailer": "^10.5.0",
"papaparse": "^5.7.0",
"payload": "3.93.0",
"react": "^19.3.1",
"react-dom": "^19.3.1",
Expand All @@ -39,7 +36,6 @@
"@tailwindcss/postcss": "^4.3.5",
"@types/node": "^26.6.6",
"@types/nodemailer": "^8.0.2",
"@types/papaparse": "^5.5.2",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@types/three": "^0.187.0",
Expand Down
18 changes: 0 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lib/data/carouselFallback.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CarouselPhoto } from "./sheet";
import type { CarouselPhoto } from "./payload";

/** Shown until the About page has photos in Payload; delete with public/images/carousel/. */
export const fallbackCarousel: CarouselPhoto[] = [
Expand Down
20 changes: 7 additions & 13 deletions src/lib/data/content.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import { cacheLife, cacheTag } from "next/cache";
import { fallbackCarousel } from "./carouselFallback";
import * as payloadSource from "./payload";
import * as sheetSource from "./sheet";

export type { BilingualPage, CarouselPhoto } from "./sheet";

// Production reads the sheet until DATABASE_URL is set there (switchover step 4).
const source = process.env.DATABASE_URL ? payloadSource : sheetSource;
export type { BilingualPage, CarouselPhoto } from "./payload";

export async function getAboutPage() {
"use cache";
cacheLife("minutes");
cacheTag("about");
const carousel = process.env.DATABASE_URL
? await payloadSource.getCarousel()
: [];
const carousel = await payloadSource.getCarousel();
return {
...(await source.getAboutPage()),
...(await payloadSource.getAboutPage()),
carousel: carousel.length ? carousel : fallbackCarousel,
};
}
Expand All @@ -25,26 +19,26 @@ export async function getTourPage() {
"use cache";
cacheLife("minutes");
cacheTag("tour");
return source.getTourPage();
return payloadSource.getTourPage();
}

export async function getTourDates() {
"use cache";
cacheLife("minutes");
cacheTag("tour-dates");
return source.getTourDates();
return payloadSource.getTourDates();
}

export async function getMusicItems() {
"use cache";
cacheLife("minutes");
cacheTag("music");
return source.getMusicItems();
return payloadSource.getMusicItems();
}

export async function getLyrics() {
"use cache";
cacheLife("minutes");
cacheTag("lyrics");
return source.getLyrics();
return payloadSource.getLyrics();
}
18 changes: 16 additions & 2 deletions src/lib/data/payload.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
import { getPayload } from "payload";
import config from "../../payload.config";
import type { IFrameProps, LyricsProps, TourDateType } from "../../utils/types";
import type { BilingualPage, CarouselPhoto } from "./sheet";
import type {
IFrameProps,
LyricsProps,
Page,
TourDateType,
} from "../../utils/types";

export interface BilingualPage {
french: Page;
english: Page;
}

export interface CarouselPhoto {
src: string;
alt: { english: string; french: string };
}

const locales = ["en", "fr"] as const;
const read = { depth: 0, fallbackLocale: "en", limit: 0, pagination: false } as const;
Expand Down
52 changes: 0 additions & 52 deletions src/lib/data/sheet.ts

This file was deleted.

Loading
Loading