Nace Logar

thecodedestroyer.com

Personal portfolio / about-me site, built with Next.js and deployed to Vercel.

Tech stack

Prerequisites

nvm use            # or: nvm install
corepack enable    # provisions the pinned pnpm version

Setup

pnpm install

Development

pnpm dev           # start the dev server at http://localhost:3000

Build & run

pnpm build         # production build
pnpm start         # serve the production build

Quality

pnpm lint          # ESLint + Prettier + tsc
pnpm format        # Prettier

Tests

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.

Dependency conventions

Deployment

Pushes to the default branch are deployed automatically by Vercel.