Build & Test — Phoenix Agentic Website Frontend (Next.js)
Mandatory first step: terminal scope check
Before build/test commands, verify terminal scope:
Set-Location "C:\Users\rivie\vsCodeProjects\Phoenix-Agentic-Website-Frontend"Get-Locationgit rev-parse --show-toplevelgit branch --show-current
If scope is wrong, open a fresh Website Frontend-scoped terminal and retry.
Repo Identity
This is the public website frontend. Next.js app with TypeScript, React, and Tailwind CSS.
Quick Commands
| Task label | Command | Purpose |
|---|---|---|
website: dev: setup |
npm install |
Install dependencies |
website: dev: run |
npm run dev |
Start dev server |
website: dev: lint |
npm run lint |
Run ESLint |
website: dev: typecheck |
npm run typecheck |
Run tsc --noEmit |
website: dev: test |
npm run test |
Run vitest |
website: dev: build |
npm run build |
Production build |
website: dev: check |
lint + typecheck + test + build | Full validation |
website: dev: clean |
Remove .next, coverage, dist | Clean artifacts |
Using VS Code Tasks
Prefer using run_task or create_and_run_task to execute these tasks. Task IDs:
shell: website: dev: setupshell: website: dev: runshell: website: dev: lintshell: website: dev: typecheckshell: website: dev: testshell: website: dev: buildshell: website: dev: checkshell: website: dev: clean
Manual Commands (if needed)
# Install
npm install
# Lint
npm run lint
# Typecheck
npm run typecheck
# Test
npm run test
# Build
npm run build
Validation checklist
- Lint passes —
npm run lint - Typecheck passes —
npm run typecheck - Tests pass —
npm run test - Build succeeds —
npm run build - Full check —
npm run lint; npm run typecheck; npm run test; npm run build
Testing rules
- Tests must be deterministic — no network calls, no randomness without seed control
- Use vitest for all tests
- Always run full check before considering work complete
Common issues
| Error | Fix |
|---|---|
npm ci failure |
Delete node_modules and package-lock.json, run npm install |
| ESLint errors | Run npm run lint and fix violations |
| TypeScript errors | Run npm run typecheck locally |
| Next.js build failure | Check for SSR-incompatible imports |
| Test failure | Run npm run test locally, check assertions |