Personal portfolio / about-me site, built with Next.js and deployed to Vercel.
.nvmrc (Node 24)packageManager field in package.jsonnvm use # or: nvm install
corepack enable # provisions the pinned pnpm version
pnpm install
pnpm dev # start the dev server at http://localhost:3000
pnpm build # production build
pnpm start # serve the production build
pnpm lint # ESLint + Prettier + tsc
pnpm format # Prettier
Two layers. Unit tests cover the pure helpers and sit next to the code they
test as *.test.ts under src/; they run on Node’s own test runner,
no browser needed. Everything else is end-to-end with
Playwright: that suite lives in e2e/ and
always runs against the production build; see
playwright.config.ts for why.
pnpm exec playwright install chromium # once, to fetch the browser
pnpm test # unit tests, then boots `next start` and runs e2e
pnpm test:unit # unit tests only — fast, no browser
pnpm test:e2e # end-to-end only
playwright.config.ts starts and stops the server itself, so no separate
pnpm start is needed. It derives the port from this checkout’s path, so
parallel worktrees never end up testing each other’s build, and locally reuses
a server already listening on it. Set E2E_PORT to pin a port instead.
When a CI run fails it uploads a playwright-report artifact. Open it with
pnpm exec playwright show-report <unzipped-dir> — the report fetches its own
data over HTTP, so opening index.html from file:// shows an empty page.
^ or ~.pnpm-lock.yaml is Prettier-formatted and lint-checked. A raw pnpm install
rewrites it in pnpm’s own compact style and turns pnpm lint red, so run
pnpm exec prettier --write pnpm-lock.yaml after any install that changes it.minimumReleaseAge) is pinned in
pnpm-workspace.yaml: pnpm will not resolve a version
published less than a week ago. Two traps worth knowing:
10080 is 7 days; a seconds-shaped
1209600 is ~840 days and blocks essentially all of npm.pnpm config list shows
where a value came from). That is why it is pinned here rather than left off.To pull something newer than the window — an urgent security patch, say — use
pnpm add <pkg> --config.minimumReleaseAge=0, or give a package a standing
exemption via minimumReleaseAgeExclude. CI installs with --frozen-lockfile,
which skips resolution, so it is never affected.
Pushes to the default branch are deployed automatically by Vercel.