next-podiatry-minimal

Willowstep Podiatry

A static Next.js website for a fictitious Edinburgh clinic, built for the Jamstacks gallery. The clinic’s illustrations follow a Harris ink mat, with pressure-print footprints, measuring rules and a willow sprig. The website builds and runs independently of the portal and starter repositories.

Preview

Use Node 24 or later and npm. Run npm ci and npm run dev for editing, or npm run build and npm start to serve the production export. Keep plan/ and .claude/skills/ during review. After review, /cleanup-plan or manual removal of those folders is sufficient.

Route Purpose
/ Clinic overview, common fees, directory, first-visit preview, opening hours and directions
/practitioners/ Full profiles and clinic-day filter
/fees/ Appointment fees, durations, practitioner links, extras and payment policy
/first-visit/ Preparation checklist, assessment timeline and urgent-care guidance
/contact/ Appointment enquiries, contact details and hours
/404.html Static error page

Edit clinic content

File Owns
app/page.tsx and app/<route>/page.tsx Page headings, explanations, navigation calls to action and page metadata
content/business.ts Clinic name and wordmark, public email and phone, street address, landmark and weekly hours
content/practitioners.ts Profiles, clinicDays, acceptingNewPatients, optional existingPatientsBio and appointment references
content/appointments.ts Appointment types, whole-pound prices, durations, availability, practitioner references, extras and feesEffectiveFrom
content/first-visit.ts Checklist labels, details and optional appointment-specific advice
site.config.json Public name, description, hostname, time zone and public Jamstacks integration
app/tailwind.input.css, components/clinic-art.tsx Theme tokens, paper texture, filters and the reusable SVG artwork
lib/structured-data.ts, app/sitemap.ts MedicalClinic structured data and public routes

Edit page copy in its route file, for example <Hero.Heading>…</Hero.Heading> in app/page.tsx. The named component handles styling and semantics. Both variable fonts are self-hosted through Fontsource with SIL Open Font License 1.1 notices in their npm packages. The clinic uses Besley for headings and Gantari for copy, schedules and fee labels.

Public configuration

{
  "name": "Business name",
  "description": "Public description",
  "domain": "next-business-minimal.jamstacks.net",
  "timeZone": "America/New_York",
  "jamstacks": { "siteId": "", "cdnUrl": "https://cdn.jamstacks.net" }
}

The demo sets the gallery hostname and Europe/London. Replace them with the public hostname and IANA time zone for your clinic.

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. Use enquiry wording. The clinic arranges appointments separately, after agreeing a time with the patient. The support form has name, email and message 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 configuration, embed state, collection validation and availability, London closing times and BST transitions, plus MedicalClinic structured data and JSON-LD escaping. 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. The illustrated map links to Google Maps directions. 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.

Publishing assets and structure

app/, components/, content/, lib/ and types/ are the website. scripts/ includes static preview and verification, tests/ covers customer behavior, and .github/ supplies deployment. jamstacks/ is removable gallery-only source metadata. Ordinary builds, tests and Pages work after it is deleted. To publish a gallery template, create its manifest and capture genuine screenshots before running its separate publishing test:

node /home/mythz/src/mythz/jamstacks.net/tools/template-screenshots/capture.mjs \
  --template /path/to/next-podiatry-minimal --modes light,dark --executable /usr/bin/chromium
node --test jamstacks/config.test.mjs

The template includes a 1200 × 630 social preview at public/og.png. Update it when the public wordmark or address changes. Before gallery publishing, review the preview captures, confirm the Pages domain and HTTPS, and remove the reviewed plan/ and .claude/skills/ folders.