Scaffold Next.js + TypeScript service (#7) #32

Merged
james merged 1 commit from 7-scaffold-nextjs-service into main 2026-06-12 21:03:01 +00:00
Owner

Closes #7.

Summary

  • Next.js 15 (App Router) + React 19 + TypeScript strict (with noUncheckedIndexedAccess).
  • ESLint 9 flat config (next/core-web-vitals + next/typescript + prettier), Prettier 3, Vitest 2.
  • Directory layout matches the ticket: app/, lib/, db/, tests/.
  • README.md documents dev, build, start, lint, typecheck, test, format, format:check.

Stack choices (per ticket guidance)

  • Next.js 15 — current stable line that supports App Router and React 19.
  • ESLint 9 flat config via FlatCompat — Next's plugin packages still ship eslintrc-style configs; FlatCompat is the documented bridge.
  • Vitest over Jest — lighter setup, no babel/jest-config overhead, works out of the box with TS + ESM.

Out of scope

Containerization, DB abstraction, and auth are intentionally not in this PR — those land in #9, #8, and #10/#11. The directories (lib/, db/) are kept with .gitkeep so the layout exists but isn't pre-populated.

⚠️ Known dep audit findings — not addressed here

npm install reports 7 vulnerabilities (1 critical, 1 high, 5 moderate) in the transitive dep tree of the bare scaffold. Out of scope for #7 — these get handled properly under #14 (CI security scanning) where the threshold + reporting are designed end-to-end. Flagging here so it isn't overlooked.

Test plan

  • npm install succeeds from a clean clone
  • npm run build — clean (Compiled successfully in 3.3s, 4 static pages)
  • npm run lint — clean, zero warnings
  • npm run typecheck — clean
  • npm test — 1/1 smoke test passing
  • CI green once #13 lands (no CI yet, so manually verified locally only)

Closes #7. Summary - Next.js 15 (App Router) + React 19 + TypeScript strict (with noUncheckedIndexedAccess). - ESLint 9 flat config (next/core-web-vitals + next/typescript + prettier), Prettier 3, Vitest 2. - Directory layout matches the ticket: app/, lib/, db/, tests/. - README.md documents dev, build, start, lint, typecheck, test, format, format:check. Stack choices (per ticket guidance) - Next.js 15 — current stable line that supports App Router and React 19. - ESLint 9 flat config via FlatCompat — Next's plugin packages still ship eslintrc-style configs; FlatCompat is the documented bridge. - Vitest over Jest — lighter setup, no babel/jest-config overhead, works out of the box with TS + ESM. Out of scope Containerization, DB abstraction, and auth are intentionally not in this PR — those land in #9, #8, and #10/#11. The directories (lib/, db/) are kept with .gitkeep so the layout exists but isn't pre-populated. ⚠️ Known dep audit findings — not addressed here npm install reports 7 vulnerabilities (1 critical, 1 high, 5 moderate) in the transitive dep tree of the bare scaffold. Out of scope for #7 — these get handled properly under #14 (CI security scanning) where the threshold + reporting are designed end-to-end. Flagging here so it isn't overlooked. Test plan - [x] npm install succeeds from a clean clone - [x] npm run build — clean (Compiled successfully in 3.3s, 4 static pages) - [x] npm run lint — clean, zero warnings - [x] npm run typecheck — clean - [x] npm test — 1/1 smoke test passing - [ ] CI green once #13 lands (no CI yet, so manually verified locally only) ---
Bare App Router skeleton with strict TypeScript, ESLint flat config
(next/core-web-vitals + next/typescript + prettier), Prettier, and
Vitest for the test harness. Directory layout matches the ticket:
app/, lib/, db/, tests/.

Stack choices:
- Next.js 15 (App Router) on React 19 — current stable line
- TypeScript strict + noUncheckedIndexedAccess, per CLAUDE.md
- ESLint 9 flat config via FlatCompat (Next plugins still ship eslintrc-style)
- Vitest over Jest: lighter setup, no babel/jest-config overhead

Containerization, DB, and auth are intentionally out of scope per the
ticket — those land in #9, #8, and #11 respectively. Dependency
audit warnings (1 critical, 1 high) are noted for #14 to handle as
part of the CI security pass, not amend here.

Closes #7

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
james merged commit bdecba0dd8 into main 2026-06-12 21:03:01 +00:00
Sign in to join this conversation.
No description provided.