next-club-sports

Riverside Rovers Sports Club

A static Next.js site for a fictitious Brisbane football and netball club. It is a Jamstacks gallery template. Orleigh Park is a public landmark. The club, club facilities shown on the schematic, fixtures, sponsors and contact details are sample content.

Preview locally

Use Node 24 or later.

npm ci
npm run dev
npm run check
npm start -- --port 3000

npm run check runs content and integration tests, checks types and exports the site to out/. npm start serves the export locally. The deployed site needs only a static file host.

Route Use
/ Find a division, see the next match, check key dates and get directions
/teams/ Find training times, match days, coaches and availability
/fixtures/ Filter the matchday programme by team and venue, or print the current selection
/join/ Read the registration steps, fees, discounts and club policies
/sponsors/ See current sponsors and compare sponsorship packages
/contact/ Send a registration, volunteering, sponsorship or general enquiry
/404.html Find the way back after following an out-of-date link

Edit the club and season

Page-specific copy lives in app/page.tsx and app/<route>/page.tsx, in reading order. For example, edit <Hero.Lead> on Home or <PageHead.Introduction> on Contact. Data below is shared across pages. Keep IDs stable so team links, filter URLs and fixture anchors continue to work.

File Fields to edit
content/business.ts name, wordmark, metadata introduction, public email, display phone, and international dialling number. Update the public name and description in site.config.json too.
content/club.ts ground address, directions destination, ferry stop and coordinates, club.founded, and honours with stable IDs, years and optional details.
content/divisions.ts Division IDs, age bounds and display label, allowed ageBands, sport, playing format and description. Netball allows multiple age bands.
content/teams.ts Team ID and division reference, filter ageBand, display ageGroup, gender, unique shirt number, training sessions, match day, coach and spots (open, waitlist, full or trials). Use a separate session for each training day.
content/fixtures.ts Match date and kick-off in Brisbane, round (pre-season or a numeric string), teamId, opponent, venue (home or away), ground, status, and optional note or result.
content/season.ts Season name, first Round 1 date and last round date, clubhouse opening and closing dates and seven weekday intervals, ordered keyDates, fee bands and discounts in AUD.
content/sponsors.ts Sponsor ID, name, tier, blurb, since, optional supports (team ID or club), and packages. Set a package’s priceAud to null to show enquiry pricing.
content/navigation.ts Main navigation labels and routes. The sitemap uses the same route list.

Post a result or change a team’s availability

  1. In content/fixtures.ts, find 2027-03-06-div1-men-kingfisher-point-fc. Set its status to 'played' and add result: { rovers: 2, opponent: 1 }. The fixture ID combines the match date, team ID and lower-case, hyphenated opponent name. Update the ID if you reschedule the date.
  2. In content/teams.ts, find u15-boys and change spots from 'full' to 'waitlist'.
  3. Run npm run check and preview the export. Fixtures shows the 2–1 flip tiles, the U15 shirt tag shows Waitlist, and the Home scoreboard skips the completed fixture. To see that last change, set a test browser clock to 6 March 2027 at 14:30 Brisbane time. The next match becomes Over-35s away to Hillcrest Harriers on 7 March at 09:00.
  4. For a postponement, set status: 'postponed' and add a note about the change. Results belong to played fixtures only. Mini Rovers never record scores and Walking Football has no fixtures.

Use ISO dates (YYYY-MM-DD) and 24-hour times (HH:MM). Clubhouse hours are valid on both season boundary dates and on the listed weekdays, with closing times exclusive. Hours and training end on the same day. The browser refreshes next-fixture, registration and clubhouse displays every minute in Australia/Brisbane. The static HTML includes all teams, all fixture rows and the hours table. Rebuild the export after data changes. Fixture JSON-LD includes the scheduled events upcoming at build time.

Design

The site uses Graduate, Jersey 10 and Libre Franklin from Fontsource npm packages. Each package ships its font’s SIL Open Font License. Colours and textures live in app/tailwind.input.css. The home page hero is a matched pair of illustrations, public/hero-light.webp (Saturday morning) and public/hero-dark.webp (the same scene under floodlights). Only the one for the visitor’s theme is downloaded. To use a photo of your own ground instead, replace both files and keep the left of each image calm, because the headline sits over it on wide screens. The pennant bunting, grass fringe, chalk pitch markings and ticket perforations are CSS classes (bunting, grass-top, chalk-deco, perforated) in app/tailwind.input.css. The club crest, scarves and line illustrations are inline SVGs in components/club-art.tsx and components/programme-art.tsx. Replace app/icon.svg and public/og.png if changing the brand. The print layout keeps the crest and fixtures while removing decorative artwork and on-screen controls.

Public configuration

{
  "name": "Riverside Rovers Sports Club",
  "description": "Public description",
  "domain": "next-club-sports.jamstacks.net",
  "timeZone": "Australia/Brisbane",
  "jamstacks": { "siteId": "", "cdnUrl": "https://cdn.jamstacks.net" }
}

Replace the demo hostname with the deployed domain for a customer site.

Environment variable Public build-time meaning
JAMSTACKS_SITE Website ID; blank retains file default, absent ID gives email fallback
NEXT_PUBLIC_JAMSTACKS_CDN_URL CDN asset base; default https://cdn.jamstacks.net
NEXT_PUBLIC_SITE_DOMAIN Hostname overriding config domain
SITE_TIME_ZONE IANA zone overriding config timeZone
PAGES_BASE_PATH Project path such as /preview; blank for custom domain/root
PAGES_BASE_URL Actual Pages origin and path; takes precedence for canonical URLs
JAMSTACKS_ALLOW_LOCAL_CDN Explicit localhost-only testing opt-in; disallowed in Actions

Copy .env.example to .env.local for Next.js local work. All listed values are public. Never add tokens, SMTP credentials or publishing keys. Newer dependencies should stay within reviewed majors; update package.json and package-lock.json together, then run the full checks.

Contact contract

The real <jamstacks-support-form> host and one {cdn}/sites/{siteId}/embed.js bootstrap appear only on Contact when configured. Without a site ID there is no embed host/request. Email remains visible in either case. The hosted runtime owns name/email/message fields, validation, submission and results. Never register the element locally, substitute a form or intercept submission. Contact navigation uses full document loads via SiteLink because the runtime has no remount API. Copy must describe an enquiry, not a confirmed booking/order/payment; no attachments or extra input fields.

For local Jamstacks development, configure an explicit local CDN URL and JAMSTACKS_ALLOW_LOCAL_CDN=1; remote builds reject localhost. A locally loaded component does not prove real message delivery. Test delivery separately against a configured site/backend.

Checks and preview

npm run check
PAGES_BASE_PATH=/preview PAGES_BASE_URL=https://owner.github.io/preview npm run build
npm start -- --base /preview --port 3000

Tests cover content validation, Brisbane date boundaries, config and provisioning compatibility, embed state and structured data. Typecheck uses Next’s generated route types. When changing the Contact integration, base paths or canonical URLs, check the exported HTML and sitemap. Verify both configured and unconfigured Contact with the corresponding build settings. Test light/dark at desktop and mobile widths, keyboard navigation, unknown routes, repeated Contact navigation and any added browser interactions. Return to a normal build before capturing final assets.

GitHub Pages deployment

.github/workflows/pages.yml uses npm ci, tests, typecheck and static export. It preserves Jamstacks’ provisioning_id dispatch input and correlated run name. It builds pull requests without deploying, and publishes main/manual runs. Configure Pages to use GitHub Actions. GitHub ignores a CNAME file for Actions deployments, so do not add public/CNAME; the custom domain is a repository setting. The workflow sets it before building when a PAGES_ADMIN_TOKEN secret is available (a fine-grained token with Administration and Pages write access to the repository, e.g. as an organisation secret). The domain is the SITE_DOMAIN variable, else site.config.json’s domain, else <repo-name>.jamstacks.net for JamstackTemplates repositories. Once the domain is set and its certificate is issued, a later deploy also enforces HTTPS. Without the secret the step only prints a notice; set the custom domain and HTTPS in Settings → Pages. DNS is managed separately; for template demos the CNAME targets jamstacktemplates.github.io.

Content Security Policy

A host-level CSP must permit same-origin Next.js scripts/assets, the inline theme bootstrap (using an appropriate hash/nonce policy), the configured Jamstacks CDN scripts/assets and the published form’s API connection origin. Derive actual directives from the deployed component. Optional maps require frame-src https://www.google.com. Apply CSP at the host; static export cannot set response headers through a running Next.js server. Do not put private credentials into CSP or relax policies blindly.

The jamstacks/ folder contains the gallery manifest and real light and dark Home captures. It can be removed from a customer site. Ordinary checks, builds and Pages do not read it. After a fresh normal build, capture and verify:

node /path/to/jamstacks.net/tools/template-screenshots/capture.mjs \
  --template "$PWD" --modes light,dark --executable /usr/bin/chromium
node --test jamstacks/config.test.mjs

After reviewing the gallery template, remove plan/ and .claude/skills/ before publishing.