The website for the Auckland University Canoe Club (AUCC), built by the Web Development and Consulting Club (WDCC) in 2025–26. It's a Next.js site with Payload CMS built in, so club editors can update events, trip reports, rivers, the gallery and page content without a developer.
- Public site: home, events, rivers, trip reports, swims, gallery, merch, gear hire, resources and about.
- Admin:
/admin. Only club admins log in; the public never does. Every Payload user is an admin, and there are no roles.
| Part | Technology |
|---|---|
| Framework | Next.js 15 (App Router), React 19 |
| CMS | Payload CMS 3.30 (in the same Next app) |
| Database | Postgres on Neon |
| Media | AWS S3, served through CloudFront |
| Hosting | Vercel |
| Infrastructure | Terraform (S3, CloudFront, IAM) |
| Secrets | Infisical (used by CI) |
| Styling | Tailwind CSS 4 |
| Tests | Vitest and Testing Library, plus Storybook |
| Tooling | pnpm 10.5.2, Node 22.23.5, TypeScript 5 |
Exact versions are in package.json. See docs/PAYLOAD_UPGRADE.md for the upgrade plan.
You need Node 22.23.5 (.nvmrc; Volta picks it up from package.json) and pnpm 10.5.2 (corepack enable).
git clone https://github.com/UoaWDCC/aucc.git
cd aucc
pnpm install
cp .env.example .env.local # then fill it in (see below)
pnpm devThe site runs at http://localhost:3000 and the admin at http://localhost:3000/admin.
Every variable is required. They are checked at startup in src/lib/env.ts. Get development values from the tech lead or from Infisical (project aucc-website, environment dev).
| Variable | What it is |
|---|---|
DATABASE_URL |
Postgres connection string |
PAYLOAD_SECRET |
Secret Payload signs admin sessions with |
SERVER_URL |
The site's own URL, e.g. http://localhost:3000 |
S3_BUCKET, S3_REGION, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY |
Where uploaded media is stored |
NEXT_PUBLIC_CF_URL |
CloudFront URL that serves the bucket (media and static/ images) |
Careful: the shared
devdatabase and staging bucket are used by everyone and by CI. Don't test destructive operations (deletes,migrate:fresh,migrate:reset) against them. Use a local Postgres instead:docker compose up postgresstarts one on port 5432 (useruser, passwordpassword), then runpnpm payload migrateagainst it.
pnpm dev # dev server (Turbopack)
pnpm build # production build
pnpm start # serve the production build
pnpm lint # ESLint
pnpm type-check # TypeScript
pnpm format # Prettier
pnpm test # Vitest (watch); `pnpm vitest run` runs once
pnpm storybook # component explorer on :6006
pnpm payload migrate # apply pending migrations
pnpm payload migrate:status # list migrations and whether they've run
pnpm payload migrate:create name # generate a migration from schema changes
pnpm generate:types # regenerate src/payload-types.ts
pnpm generate:importmap # after adding admin componentsA Husky pre-commit hook runs ESLint and Prettier on staged files.
src/
├── app/
│ ├── (frontend)/ public site; one folder per page
│ │ ├── _components/ shared layout (navbar, footer, sidebar)
│ │ └── <page>/_components/ components used only by that page
│ ├── (payload)/ Payload admin and its REST/GraphQL routes
│ └── api/ custom API routes (gallery paging)
├── collections/ Payload collections (events, rivers, media, …)
├── globals/ Payload globals: one per page's editable content
├── components/ reusable UI (Button, PayloadImage, NotFound, …)
├── queries/ cached data fetching used by pages
├── lib/ env, Payload client, utilities (cache tags, cn)
├── migrations/ database migrations (committed, run on deploy)
└── payload-types.ts generated; don't edit by hand
terraform/ S3, CloudFront and IAM for staging and production
docs/ deeper guides (see below)
- Editors change content in
/admin. Payload writes it to Postgres, and uploads go to S3. - Pages read data through functions in
src/queries/, wrapped inunstable_cacheand tagged with cache tags. - Each collection and global has an
afterChangehook that callscacheTags.<name>.revalidate(). That clears every cached query that depends on it, so pages update without a redeploy. The dependencies are listed intagRelationsinsrc/lib/utils/revalidation.ts.
push is off, so every schema change needs a migration:
- Edit the collection or global in
src/collections/orsrc/globals/. - Run
pnpm payload migrate:create describe_the_changeagainst a database that has every existing migration applied. Review the generated SQL. - Run
pnpm generate:types(the dev server also does this). - Commit the migration (
.tsand.json) andsrc/migrations/index.tswith the change.
CI fails if the schema and migrations disagree. Production runs pending migrations on deploy (see docs/DEPLOYMENT.md).
Do the steps above, and also:
- Register it in
src/payload.config.ts. - Add a cache tag in
src/lib/utils/revalidation.ts. List what it references (e.g.media) intagRelations, and add its tag to anything that references it. - Add
afterChange/afterDeletehooks that callcacheTags.<name>.revalidate(). - Add a query in
src/queries/wrapped inunstable_cachewithtags: cacheTags.<name>.relatedTags.
Create src/app/(frontend)/<page>/page.tsx, put its components in <page>/_components/, and add it to PAGES in _components/layout/SideBar.tsx (and the navbar if it belongs there).
Vercel deploys every push: main goes to production, and other branches get preview deployments. Production builds run pending database migrations first. Preview builds never touch the database. The details, environments and infrastructure are in docs/DEPLOYMENT.md.
- docs/DEPLOYMENT.md: hosting, environments, migrations on deploy, infrastructure
- docs/ONBOARDING.md: first-week guide for new developers
- docs/ARCHITECTURE.md: architecture in more depth
- docs/COMPONENTS.md: component conventions
- docs/CONTENT_MANAGEMENT.md: guide for club editors
- docs/PAYLOAD_UPGRADE.md: plan for upgrading Payload, Next and React
| Name | Role |
|---|---|
| Daniel Chen | Project Manager |
| Jonathan Wu | Tech Lead |
| Ayush Kumar | Developer |
| Olivia Kusuma | Developer |
| Jacob Gray | Developer |
| Dylan Bhadresa | Developer |
| Carl Misquitta | Developer |
| Vanessa Dang | Developer |
| Ryan Supardi | Developer |
| Name | Role |
|---|---|
| David Zhu | Project Manager |
| Phawat Saengsiripongpun | Tech Lead |
| Franck Chen | Developer |
| Henri Chemla | Developer |
| Troy Abbott | Developer |
| Ava Lee | Developer |
| Dom Pietersen | Developer |
| Lawrence Li | Developer |
| Mai Pham | Developer |
| Hanna Lin | Designer |