Public website for Tillotson Design Associates (tillotsondesign.com). Payload CMS 3 inside Next.js (App Router), TypeScript, Postgres, pnpm.
Overview
Public website for Tillotson Design Associates (tillotsondesign.com). Payload CMS 3 inside Next.js (App Router), TypeScript, Postgres, pnpm. Start with CLAUDE.md and .claude/skills/tda-website/SKILL.md. Stack decisions and the questions TDA still has to answer are in docs/decisions.md. Requires Node 20.18+ (22 recommended), pnpm 10, and Postgres 16. 1. cp .env.example .env and set PAYLOAD_SECRET (openssl rand -hex 32). 2. Start Postgres. Either docker compose up -d postgres, or use a local install with a tda user and tda_website database matching DATABASE_URL. 3. pnpm install 4. pnpm payload migrate to create the tables. 5. pnpm dev, then open http://localhost:3000/admin and create the first admin user. Push mode is off, in development too, so the database only changes through committed migrations. After editing a collection or global: 1. pnpm payload generate:types 2. pnpm payload migrate:create 3. Check the new migration's down function. Payload 3.91 generates DROP TABLE ...
README
tda-website
Public website for Tillotson Design Associates (tillotsondesign.com). Payload CMS 3 inside Next.js (App Router), TypeScript, Postgres, pnpm.
Start with CLAUDE.md and .claude/skills/tda-website/SKILL.md. Stack decisions and the
questions TDA still has to answer are in docs/decisions.md.
Local setup
Requires Node 20.18+ (22 recommended), pnpm 10, and Postgres 16.
cp .env.example .envand setPAYLOAD_SECRET(openssl rand -hex 32).- Start Postgres. Either
docker compose up -d postgres, or use a local install with atdauser andtda_websitedatabase matchingDATABASE_URL. pnpm installpnpm payload migrateto create the tables.pnpm dev, then open http://localhost:3000/admin and create the first admin user.
Schema changes
Push mode is off, in development too, so the database only changes through committed migrations. After editing a collection or global:
pnpm payload generate:typespnpm payload migrate:create- Check the new migration’s
downfunction. Payload 3.91 generatesDROP TABLE ... CASCADEfollowed byDROP CONSTRAINT/DROP INDEXon objects the cascade already removed, so the rollback fails. AddIF EXISTSto those statements. pnpm payload migrate, thenpnpm payload migrate:downandpnpm payload migrateagain to prove the rollback works.- Commit the collection change,
src/payload-types.tsand the new files insrc/migrations/together.
Production runs payload migrate once per deploy, at build time (vercel.json). Preview
deployments skip it so a branch can never change the production database before it is
merged.
Checks
pnpm exec tsc --noEmitpnpm lintpnpm buildpnpm test:int(needs the database running)pnpm test:e2e(startspnpm devitself if nothing is on port 3000)
Recommended Tools
Try a different keyword or remove a filter.
Install
npx skillfish add robertoe135/tda-website