Frontend Engineering
Production-ready patterns for modern web applications.
Stack (March 2026): Next.js 16 + Turbopack, React 19.x + Server Components, TypeScript 5.9+ (strict), Tailwind CSS v4, TanStack Query, Zustand, Vitest (browser mode).
Breaking Changes: Next.js 16 Upgrade Guide
Shared release gates: ../software-clean-code-standard/assets/checklists/frontend-performance-a11y-checklist.md
If you use React Server Components (RSC), treat security advisories as blocking: see data/sources.json (React RSC advisories).
Quick Reference
| Task |
Tool |
Command |
| Next.js App |
Next.js 16 + Turbopack |
npx create-next-app@latest |
| Vue App |
Nuxt 4 |
npx nuxi@latest init |
| Angular App |
Angular 21 |
ng new |
| Svelte App |
SvelteKit 2.49+ |
npm create svelte@latest |
| React SPA |
Vite + React |
npm create vite@latest |
| UI Components |
shadcn/ui |
npx shadcn@latest init |
Workflow
- Pick a framework using the decision tree.
- Start from a matching template in
assets/.
- Implement feature-specific patterns from
references/.
- Treat accessibility and performance as release gates (shared checklist above).
Framework Decision Tree
Project needs:
|-- React ecosystem?
| |-- Full-stack + SEO -> Next.js 16
| |-- Progressive enhancement -> Remix
| `-- Client-side SPA -> Vite + React
|
|-- Vue ecosystem?
| |-- Full-stack -> Nuxt 4
| `-- SPA -> Vite + Vue 3.5+
|
|-- State management?
| |-- Server data -> TanStack Query
| |-- Global client -> Zustand
| `-- WARNING: DECLINING: Redux
|
`-- Styling?
|-- Utility-first -> Tailwind CSS v4
`-- WARNING: DECLINING: CSS-in-JS
Next.js 16 Key Changes
proxy.ts replaces middleware.ts
npx @next/codemod@canary upgrade latest # recommended
mv middleware.ts proxy.ts # or manual rename
Cache Components ("use cache")
export default async function Page() {
"use cache";
const data = await fetchData();
return <ProductList data={data} />;
}
React Compiler
// next.config.ts
const nextConfig: NextConfig = {
experimental: { reactCompiler: true },
};
For the full migration checklist (async APIs, image config, parallel routes, caching APIs), see references/operational-playbook.md (Next.js 16 Migration Checklist section).
Performance Budgets
| Metric |
Target |
| LCP |
<= 2.5s |
| INP |
<= 200ms |
| CLS |
<= 0.1 |
| TTFB |
< 600ms |
Operational Discipline
Verification Order
- Lint edited files only.
- Type-check edited feature surface.
- Run full project lint/type/build once before handoff.
Avoid repeated full builds while known local lint/type failures remain.
Watch For
- Lint pitfalls:
react-hooks/set-state-in-effect, react-hooks/purity, react-hooks/rules-of-hooks, react/no-unescaped-entities
- CLI drift: Run
npx eslint --help / npx vitest --help before assuming flags from older setups
- Route deletion: After deleting/renaming any page, grep for stale imports and
<Link> hrefs
- Architecture pre-check: Before adding new context providers or state stores, search for existing patterns first
- Hydration mismatches: Use
useState(null) + useEffect for browser-only values — see references/production-gotchas.md
- macOS Turbopack: Set
ulimit -n 10240 to avoid EMFILE errors in large projects
Handoff Requirements
Include in final output: exact files changed, lint/type/build commands run, whether failures are new or baseline, one prevention note for any repeated class of issue.
Deployment Checklist
Pre-Deployment
Accessibility
SEO
Reference Routing
Read only the reference matching the user's framework or problem — not all of them.
| User's topic |
Read this |
| Next.js, RSC, Server Actions, data fetching |
references/fullstack-patterns.md (see section index below) |
| Next.js migration, upgrade, breaking changes |
references/operational-playbook.md |
| Hydration bugs, storage access, response parsing |
references/production-gotchas.md |
| Vue 3, Nuxt 4, Pinia, composables |
references/vue-nuxt-patterns.md |
| Angular, signals, standalone components |
references/angular-patterns.md |
| Svelte 5, SvelteKit, runes |
references/svelte-sveltekit-patterns.md |
| Remix, loaders, actions, progressive enhancement |
references/remix-react-patterns.md |
| Vite + React SPA (no Next.js / no SSR) |
references/vite-react-patterns.md |
| State management (Zustand, TanStack Query, Redux) |
references/state-management-patterns.md |
| Testing (Vitest, Testing Library, Playwright, MSW) |
references/testing-frontend-patterns.md |
| Lighthouse, bundle size, Core Web Vitals |
references/performance-optimization.md |
| Quick HTML prototype / artifact |
references/artifacts-builder.md |
fullstack-patterns.md Section Index
This file is 2044 lines. Read only the section you need:
| Section |
Lines |
When to read |
| Authentication (JWT, Zustand auth store) |
27–497 |
Auth flow, protected routes, login forms |
| Blog Posts CRUD (Prisma, API routes, forms) |
499–1264 |
CRUD features, list/detail pages, create forms |
| Real-time data with Server Components |
1266–1355 |
Direct DB access in RSC, streaming |
| Server Actions for mutations |
1357–1627 |
Form submissions, "use server", revalidation |
| tRPC end-to-end type safety |
1629–2020 |
tRPC setup, type-safe API clients |
| Key patterns summary |
1992–2044 |
Quick reference for type sharing, validation |
Templates
| Framework |
Template |
| Next.js |
assets/nextjs/template-nextjs-tailwind-shadcn.md |
| Vue/Nuxt |
assets/vue-nuxt/template-nuxt4-tailwind.md |
| Angular |
assets/angular/template-angular21-standalone.md |
| Svelte |
assets/svelte/template-sveltekit-runes.md |
| Vite+React |
assets/vite-react/template-vite-react-ts.md |
| Remix |
assets/remix/template-remix-react.md |
Related Skills
Fact-Checking
Use web search to verify current external facts, versions, and platform behavior before final answers. Prefer primary sources; report source links and dates for volatile information.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: software-frontend3description: Production-grade frontend for Next.js, Vue, Angular, and Svelte. Use when building UI, fixing hydration errors, or setting up a new web project. Use when this capability is needed.4---56# Frontend Engineering78Production-ready patterns for modern web applications.910**Stack (March 2026)**: Next.js 16 + Turbopack, React 19.x + Server Components, TypeScript 5.9+ (strict), Tailwind CSS v4, TanStack Query, Zustand, Vitest (browser mode).1112**Breaking Changes**: [Next.js 16 Upgrade Guide](https://nextjs.org/docs/app/guides/upgrading/version-16)1314Shared release gates: `../software-clean-code-standard/assets/checklists/frontend-performance-a11y-checklist.md`1516If you use React Server Components (RSC), treat security advisories as blocking: see `data/sources.json` (React RSC advisories).1718## Quick Reference1920| Task | Tool | Command |21|------|------|---------|22| Next.js App | Next.js 16 + Turbopack | `npx create-next-app@latest` |23| Vue App | Nuxt 4 | `npx nuxi@latest init` |24| Angular App | Angular 21 | `ng new` |25| Svelte App | SvelteKit 2.49+ | `npm create svelte@latest` |26| React SPA | Vite + React | `npm create vite@latest` |27| UI Components | shadcn/ui | `npx shadcn@latest init` |2829## Workflow30311. Pick a framework using the decision tree.322. Start from a matching template in `assets/`.333. Implement feature-specific patterns from `references/`.344. Treat accessibility and performance as release gates (shared checklist above).3536## Framework Decision Tree3738```text39Project needs:40|-- React ecosystem?41| |-- Full-stack + SEO -> Next.js 1642| |-- Progressive enhancement -> Remix43| `-- Client-side SPA -> Vite + React44|45|-- Vue ecosystem?46| |-- Full-stack -> Nuxt 447| `-- SPA -> Vite + Vue 3.5+48|49|-- State management?50| |-- Server data -> TanStack Query51| |-- Global client -> Zustand52| `-- WARNING: DECLINING: Redux53|54`-- Styling?55 |-- Utility-first -> Tailwind CSS v456 `-- WARNING: DECLINING: CSS-in-JS57```5859## Next.js 16 Key Changes6061### proxy.ts replaces middleware.ts6263```bash64npx @next/codemod@canary upgrade latest # recommended65mv middleware.ts proxy.ts # or manual rename66```6768### Cache Components (`"use cache"`)6970```typescript71export default async function Page() {72 "use cache";73 const data = await fetchData();74 return <ProductList data={data} />;75}76```7778### React Compiler7980```typescript81// next.config.ts82const nextConfig: NextConfig = {83 experimental: { reactCompiler: true },84};85```8687For the full migration checklist (async APIs, image config, parallel routes, caching APIs), see `references/operational-playbook.md` (Next.js 16 Migration Checklist section).8889## Performance Budgets9091| Metric | Target |92|--------|--------|93| LCP | <= 2.5s |94| INP | <= 200ms |95| CLS | <= 0.1 |96| TTFB | < 600ms |9798## Operational Discipline99100### Verification Order1011021. Lint edited files only.1032. Type-check edited feature surface.1043. Run full project lint/type/build once before handoff.105106Avoid repeated full builds while known local lint/type failures remain.107108### Watch For109110- **Lint pitfalls**: `react-hooks/set-state-in-effect`, `react-hooks/purity`, `react-hooks/rules-of-hooks`, `react/no-unescaped-entities`111- **CLI drift**: Run `npx eslint --help` / `npx vitest --help` before assuming flags from older setups112- **Route deletion**: After deleting/renaming any page, grep for stale imports and `<Link>` hrefs113- **Architecture pre-check**: Before adding new context providers or state stores, search for existing patterns first114- **Hydration mismatches**: Use `useState(null) + useEffect` for browser-only values — see `references/production-gotchas.md`115- **macOS Turbopack**: Set `ulimit -n 10240` to avoid EMFILE errors in large projects116117### Handoff Requirements118119Include in final output: exact files changed, lint/type/build commands run, whether failures are new or baseline, one prevention note for any repeated class of issue.120121## Deployment Checklist122123### Pre-Deployment124125- [ ] `npm run build` — no errors126- [ ] `npm run lint` — zero ESLint errors127- [ ] `vitest run` — all tests passing128- [ ] Bundle size within budget129- [ ] Environment variables set130131### Accessibility132133- [ ] axe DevTools — zero critical issues134- [ ] Keyboard navigation works135- [ ] Color contrast >= 4.5:1136- [ ] Screen reader tested137138### SEO139140- [ ] Metadata configured141- [ ] sitemap.xml generated142- [ ] robots.txt configured143144## Reference Routing145146Read **only** the reference matching the user's framework or problem — not all of them.147148| User's topic | Read this |149|---|---|150| Next.js, RSC, Server Actions, data fetching | `references/fullstack-patterns.md` (see section index below) |151| Next.js migration, upgrade, breaking changes | `references/operational-playbook.md` |152| Hydration bugs, storage access, response parsing | `references/production-gotchas.md` |153| Vue 3, Nuxt 4, Pinia, composables | `references/vue-nuxt-patterns.md` |154| Angular, signals, standalone components | `references/angular-patterns.md` |155| Svelte 5, SvelteKit, runes | `references/svelte-sveltekit-patterns.md` |156| Remix, loaders, actions, progressive enhancement | `references/remix-react-patterns.md` |157| Vite + React SPA (no Next.js / no SSR) | `references/vite-react-patterns.md` |158| State management (Zustand, TanStack Query, Redux) | `references/state-management-patterns.md` |159| Testing (Vitest, Testing Library, Playwright, MSW) | `references/testing-frontend-patterns.md` |160| Lighthouse, bundle size, Core Web Vitals | `references/performance-optimization.md` |161| Quick HTML prototype / artifact | `references/artifacts-builder.md` |162163### fullstack-patterns.md Section Index164165This file is 2044 lines. Read only the section you need:166167| Section | Lines | When to read |168|---|---|---|169| Authentication (JWT, Zustand auth store) | 27–497 | Auth flow, protected routes, login forms |170| Blog Posts CRUD (Prisma, API routes, forms) | 499–1264 | CRUD features, list/detail pages, create forms |171| Real-time data with Server Components | 1266–1355 | Direct DB access in RSC, streaming |172| Server Actions for mutations | 1357–1627 | Form submissions, `"use server"`, revalidation |173| tRPC end-to-end type safety | 1629–2020 | tRPC setup, type-safe API clients |174| Key patterns summary | 1992–2044 | Quick reference for type sharing, validation |175176## Templates177178| Framework | Template |179|-----------|----------|180| Next.js | [assets/nextjs/template-nextjs-tailwind-shadcn.md](assets/nextjs/template-nextjs-tailwind-shadcn.md) |181| Vue/Nuxt | [assets/vue-nuxt/template-nuxt4-tailwind.md](assets/vue-nuxt/template-nuxt4-tailwind.md) |182| Angular | [assets/angular/template-angular21-standalone.md](assets/angular/template-angular21-standalone.md) |183| Svelte | [assets/svelte/template-sveltekit-runes.md](assets/svelte/template-sveltekit-runes.md) |184| Vite+React | [assets/vite-react/template-vite-react-ts.md](assets/vite-react/template-vite-react-ts.md) |185| Remix | [assets/remix/template-remix-react.md](assets/remix/template-remix-react.md) |186187## Related Skills188189| Skill | Purpose |190|-------|---------|191| [software-backend](../software-backend/SKILL.md) | Backend API |192| [dev-api-design](../dev-api-design/SKILL.md) | REST/GraphQL |193| [software-code-review](../software-code-review/SKILL.md) | Code review |194| [ops-devops-platform](../ops-devops-platform/SKILL.md) | CI/CD |195196## Fact-Checking197198Use web search to verify current external facts, versions, and platform behavior before final answers. Prefer primary sources; report source links and dates for volatile information.199200---201> Converted and distributed by [TomeVault](https://tomevault.io/claim/vasilyu1983) — claim your Tome and manage your conversions.202<!-- tomevault:4.0:skill_md:2026-04-11 -->