A modern soccer club website built with Next.js and Sanity CMS, showcasing teams, programs, and club news.
Features · Tooling · Developing and Running Locally
- Modern, responsive design with mobile-first approach
- Content management powered by Sanity CMS
- Blog/news posts with rich text content and images
- Team and program information pages
- Fixtures and scheduling
- AA-compliant accessibility (a11y)
- SEO-friendly architecture
- Type-safe development with TypeScript
- Code quality tooling with ESLint, Prettier, and Husky
- Deployed on Vercel for fast, global delivery
- Next.js: React framework for production-grade applications
- Sanity CMS: Headless CMS for flexible content management
- Tailwind CSS: Utility-first CSS framework
- DaisyUI: Tailwind CSS component library
- TypeScript: Type-safe development
- Zod: Schema validation for environment variables
- Prettier: Code formatting
- ESLint: Code linting
- Husky: Git hooks for code quality
- Vercel: Hosting and deployment
This website serves as the digital home for Williamstown Soccer Club, providing a platform to share information about our teams, programs, and community. Built with modern web technologies, it ensures a fast, accessible, and maintainable solution that can grow with the club's needs.
To run the site locally, follow these steps:
- Node.js installed (managed by Mise)
- pnpm
- A Sanity account and project set up
The data CLI uses Playwright. Before running crawl commands, install the browser binaries:
pnpm exec playwright install --with-deps chromiumpnpm installFixtures are scraped from Dribl in two stages: crawl (scrapes raw data) then sync (transforms into data/matches/). League and competition names are read automatically from the Fixtures Crawler fields on each Team document in Sanity.
Run for a single team:
pnpm exec dotenv -e .env.local -- tsx bin/wsc.ts crawl fixtures -t under-12-girls
pnpm exec dotenv -e .env.local -- tsx bin/wsc.ts sync fixtures -t under-12-girlsOmit -t to crawl all teams with enableFixturesCrawler enabled in Sanity:
pnpm exec dotenv -e .env.local -- tsx bin/wsc.ts crawl fixtures
pnpm exec dotenv -e .env.local -- tsx bin/wsc.ts sync fixturesTo override league and competition manually (useful before a team is configured in Sanity):
pnpm exec dotenv -e .env.local -- tsx bin/wsc.ts crawl fixtures -t <team-slug> -l "<League Name>" -c "<Competition Name>"Sanity URLs:
- Navigate to http://localhost:3003/studio
After modifying Sanity schemas in src/sanity/schema/, run:
pnpm run type:genThis will update the TypeScript types to match your schema changes.
The Sanity Studio is automatically deployed to production when changes are pushed to the main branch that affect:
src/sanity/**(schema files)sanity.config.tssanity.cli.ts
You can also manually trigger a deployment from the Actions tab in GitHub.
To enable automated deployments, add a Sanity deploy token as a GitHub secret:
- Generate a deploy token at Sanity Project Settings → API → Tokens
- Select "Deploy studio" permission
- Add the token to GitHub: Settings → Secrets and variables → Actions → New repository secret
- Name it
SANITY_AUTH_TOKEN
The studio will be available at https://williamstownsc.sanity.studio
Building community through soccer. Feedback and contributions are welcome!