A monorepo containing the SSA web frontend and CMS backend.
| Package | Tech | Port |
|---|---|---|
web/ |
Next.js 16, React 19, Tailwind CSS 4 | 3000 |
cms/ |
Payload CMS 3, Next.js 15, PostgreSQL | 3001 |
- Node.js
>=20.9.0(Node 22 recommended) - pnpm
>=9 - PostgreSQL database (Supabase or local)
Install pnpm if you don't have it:
npm install -g pnpmgit clone https://github.com/UoaWDCC/ssa.git
cd ssaInstall dependencies for each package separately:
cd web && pnpm install
cd ../cms && pnpm installCopy the example env file in the CMS and fill in your values:
cp cms/.env.example cms/.env| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
PAYLOAD_SECRET |
Random secret string for Payload to sign sessions |
The web package has no required environment variables.
In separate terminals:
# Web (http://localhost:3000)
cd web && pnpm dev
# CMS (http://localhost:3001)
cd cms && pnpm dev| Script | Description |
|---|---|
pnpm dev |
Start dev server |
pnpm build |
Production build |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
pnpm format:check |
Check formatting with Prettier |
| Script | Description |
|---|---|
pnpm dev |
Start dev server |
pnpm devsafe |
Clear .next cache and start dev server |
pnpm build |
Production build |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
pnpm generate:types |
Regenerate Payload TypeScript types |
pnpm generate:importmap |
Regenerate Payload import map |
pnpm test:int |
Run integration tests (Vitest) |
pnpm test:e2e |
Run end-to-end tests (Playwright) |
pnpm test |
Run all tests |
Both packages use ESLint and Prettier. The CI pipeline enforces these on every push and pull request.
# Lint
cd web && pnpm lint
cd cms && pnpm lint
# Format check
cd web && pnpm format:check| Tool | Web config | CMS config |
|---|---|---|
| ESLint | web/eslint.config.mjs |
cms/eslint.config.mjs |
| Prettier | web/.prettierrc |
cms/.prettierrc.json |
| TypeScript | web/tsconfig.json |
cms/tsconfig.json |
GitHub Actions runs the following on every PR and push to main:
- ESLint
- Prettier format check (web only)
- TypeScript type check (
tsc --noEmit) - Next.js build
PRs cannot be merged into main unless both the Web and CMS checks pass.
| Type | Pattern | Example |
|---|---|---|
| New feature | feature/short-description |
feature/events-page |
| Bug fix | fix/short-description |
fix/navbar-overlap |
| Chore / config | chore/short-description |
chore/update-ci |
| Hotfix | hotfix/short-description |
hotfix/broken-build |
Use lowercase and hyphens, no spaces.
CMS won't start — database connection error
Make sure DATABASE_URL in cms/.env is a valid PostgreSQL connection string and your database is accessible.
CMS build fails with memory error
The CMS build uses --max-old-space-size=8000. If your machine has less than 8GB RAM, lower this value in the build script in cms/package.json.
Type errors after pulling new changes Payload types may be out of date. Regenerate them:
cd cms && pnpm generate:typesStale .next cache causing issues
Use devsafe instead of dev to clear the cache before starting:
cd cms && pnpm devsafeESLint or Prettier errors blocking CI Run lint and format check locally before pushing to catch issues early:
cd web && pnpm lint && pnpm format:check
cd cms && pnpm lint