Skip to content
software-frontend logo

Frontend Engineering Skill — Quick Reference

software-frontend

Production-grade frontend development with Next.js 16 App Router, TypeScript 5.9+ strict mode, Tailwind CSS v4, shadcn/ui, React 19.2 Server Components, state management (Zustand/Recoil), performance optimization (Turbopack stable, ISR/SSR/SSG), and accessibility best practices. Includes TanStack...

SKILL.md

Full skill instructions

Frontend Engineering Skill — Quick Reference

This skill equips frontend engineers with execution-ready patterns for building modern web applications with Next.js, React, TypeScript, and Tailwind CSS. Apply these patterns when you need component design, state management, routing, forms, data fetching, animations, accessibility, or production-grade UI architectures.

Modern Best Practices (December 2025): Next.js 16 with Turbopack (stable, default bundler), middleware.ts → proxy.ts migration (clarifies network boundary, runs on Node.js runtime), React 19.2 with Server Components, Actions, Activity component, and useEffectEvent hook, enhanced ISR/​SSR/​SSG, partial prerendering (PPR), stable caching APIs (cacheLife, cacheTag, updateTag), Zustand/​Recoil as Redux alternatives, TanStack Query (React Query) for server-state, TypeScript 5.9+ strict mode enforcement (TypeScript 7 "Corsa" Go-based compiler in preview), satisfies operator, Tailwind CSS v4 (CSS-first config, 5x faster builds), Vitest for testing, and progressive enhancement patterns.

Next.js 16 Breaking Changes: Upgrade Guide


Quick Reference

TaskTool/​FrameworkCommandWhen to Use
Next.js AppNext.js 16 + Turbopacknpx create-next-app@latestFull-stack React apps, SEO, SSR/​SSG
Vue AppNuxt 4npx nuxi@latest initVue ecosystem, auto-imports, Nitro server
Angular AppAngular 21ng newEnterprise apps, zoneless change detection, esbuild
Svelte AppSvelteKit 2.49+npm create svelte@latestPerformance-first, minimal JS, Svelte 5 runes
React SPAVite + Reactnpm create vite@latestClient-side apps, fast dev server
UI Componentsshadcn/​ui + Radix UInpx shadcn@latest initAccessible components, Tailwind v4 styling
FormsReact Hook Form + Zodnpm install react-hook-form zodType-safe validation, performance
State ManagementZustand/​Recoilnpm install zustandLightweight global state
Server StateTanStack Querynpm install @tanstack/​react-queryAPI caching, server-state sync
TestingVitest + Testing Libraryvitest runUnit/​component tests, fast execution

When to Use This Skill

Use this skill when you need:

  • Next.js 16 application architecture and setup (Turbopack stable, App Router, React 19)
  • React component design and patterns (functional components, hooks, Server Components)
  • TypeScript type definitions for UI (strict mode, satisfies operator, discriminated unions)
  • Tailwind CSS styling and responsive design (utility-first, dark mode variants)
  • shadcn/​ui component integration (Radix UI + Tailwind)
  • Form handling and validation (React Hook Form + Zod, Server Actions)
  • State management (Zustand/​Recoil for client state, TanStack Query for server state)
  • Data fetching (Server Components, TanStack Query/​SWR, Server Actions, streaming)
  • Authentication flows (NextAuth.js, Clerk, Auth0)
  • Route handling and navigation (App Router, parallel routes, intercepting routes)
  • Performance optimization (Turbopack, Image optimization, code splitting, ISR/​SSR/​SSG)
  • Accessibility (WCAG 2.2, ARIA, keyboard navigation, screen reader testing) https://www.w3.org/TR/WCAG22/
  • Animation and transitions (Framer Motion, Tailwind animations)
  • Testing (Vitest for unit tests, Testing Library for components, Playwright for E2E)

Decision Tree: Frontend Framework Selection

Project needs: [Framework Choice]
    ├─ React ecosystem?
    │   ├─ Full-stack + SEO → Next.js 16 (App Router, React 19.2, Turbopack stable)
    │   ├─ Progressive enhancement → Remix (loaders, actions, nested routes)
    │   └─ Client-side SPA → Vite + React (fast dev, minimal config)
    │
    ├─ Vue ecosystem?
    │   ├─ Full-stack + SSR → Nuxt 4 (auto-imports, Nitro server, file-based routing)
    │   └─ Client-side SPA → Vite + Vue 3.5+ (Composition API, script setup)
    │
    ├─ Angular preferred?
    │   └─ Enterprise app → Angular 21 (zoneless change detection, esbuild, signals)
    │
    ├─ Performance-first?
    │   └─ Minimal JS bundle → SvelteKit 2.49+ (Svelte 5.45 runes, compiler magic)
    │
    ├─ Component library?
    │   ├─ Headless + customizable → shadcn/​ui + Radix UI + Tailwind
    │   ├─ Material Design → MUI (Material-UI)
    │   └─ Enterprise UI → Ant Design
    │
    ├─ State management?
    │   ├─ Server data → TanStack Query/​SWR (caching, sync)
    │   ├─ Global client state → Zustand (lightweight) or Recoil (React-first)
    │   ├─ Complex state logic → XState (state machines)
    │   └─ URL-based state → useSearchParams (shareable filters)
    │
    ├─ Styling approach?
    │   ├─ Utility-first → Tailwind CSS v4 (CSS-first config, 5x faster builds)
    │   ├─ CSS-in-JS → Styled Components or Emotion
    │   └─ CSS Modules → Built-in CSS Modules
    │
    └─ Testing strategy?
        ├─ Unit/​Component → Vitest + Testing Library (fast, modern)
        ├─ E2E → Playwright (cross-browser, reliable)
        └─ Visual regression → Chromatic or Percy

Framework Selection Factors:

  • Team experience: Choose what the team knows or can learn quickly
  • SSR/​SSG requirements: Next.js, Nuxt, Remix for server-side rendering
  • Performance constraints: SvelteKit for minimal JS, Next.js for optimization
  • Ecosystem maturity: React has largest ecosystem, Vue/​Angular are also mature

See resources/ for framework-specific best practices.


Next.js 16 Migration: middleware.ts → proxy.ts

Breaking Change (Dec 2025): The middleware convention is renamed to proxy in Next.js 16.

Why the Change?

  • Clarity: "Proxy" better describes the network boundary behavior (runs in front of the app)
  • Runtime: proxy.ts runs on Node.js runtime (not Edge by default)
  • Avoid confusion: Prevents confusion with Express.js middleware patterns

Migration Steps

# 1. Run the codemod (recommended)
npx @next/​codemod@canary upgrade latest

# 2. Or manually rename
mv middleware.ts proxy.ts
// Before (Next.js 15)
export function middleware(request: Request) {
  // ... logic
}

// After (Next.js 16)
export function proxy(request: Request) {
  // ... logic
}
// next.config.ts - Update config option
const nextConfig: NextConfig = {
  skipProxyUrlNormalize: true, // was: skipMiddlewareUrlNormalize
}

Runtime Considerations

Featureproxy.ts (Next.js 16)middleware.ts (legacy)
Default RuntimeNode.jsEdge
Edge SupportNot supportedSupported
Use CaseAuth, rewrites, redirectsEdge-first apps

⚠️ Keep using middleware.ts if you need Edge Runtime. The proxy convention does NOT support Edge.

Related Changes in Next.js 16

  • Async Request APIs: cookies(), headers(), params, searchParams are now async
  • Turbopack default: Remove --turbopack flags from scripts
  • Parallel routes: Require explicit default.js files
  • Image changes: domains deprecated (use remotePatterns), new default cache TTL

React 19.2 Patterns (Dec 2025)

Security Note (React Server Components)

Partial Prerendering (PPR)

Pre-render static shell, stream dynamic content.

// Next.js 16 with PPR enabled
// next.config.js
export default {
  experimental: {
    ppr: true, // Enable Partial Prerendering
  },
};

// Page component
export default async function Page() {
  return (
    <main>
      <Header /> {/​* Static: pre-rendered */​}
      <Suspense fallback={<Skeleton />}>
        <DynamicContent /> {/​* Dynamic: streamed */​}
      </​Suspense>
      <Footer /> {/​* Static: pre-rendered */​}
    </​main>
  );
}

use() Hook Pattern

Promise resolution in components with Suspense.

// Before: useEffect + useState
const [data, setData] = useState(null);
useEffect(() => {
  fetchData().then(setData);
}, []);

// After: use() hook (React 19+)
const data = use(fetchDataPromise);

Error Boundary Patterns

'use client';

import { ErrorBoundary } from 'react-error-boundary';

function ErrorFallback({ error, resetErrorBoundary }) {
  return (
    <div role="alert">
      <p>Something went wrong:</​p>
      <pre>{error.message}</​pre>
      <button onClick={resetErrorBoundary}>Try again</​button>
    </​div>
  );
}

export default function App() {
  return (
    <ErrorBoundary FallbackComponent={ErrorFallback}>
      <MyComponent />
    </​ErrorBoundary>
  );
}

Performance Budgets

MetricTargetTool
LCP (Largest Contentful Paint)<= 2.5sLighthouse / web-vitals
INP (Interaction to Next Paint)<= 200msChrome DevTools / web-vitals https://web.dev/vitals/
CLS (Cumulative Layout Shift)<= 0.1Lighthouse / web-vitals
TTFB (Time to First Byte)Project SLO [Inference]Lighthouse
Bundle size (JS)Project budget [Inference]bundle analyzer

Optional: AI/​Automation Extensions

Note: AI design and development tools. Skip if not using AI tooling.

AI Design Tools
ToolUse Case
v0.devUI generation from prompts
Vercel AI SDKStreaming UI, chat interfaces
Figma AIDesign-to-code prototypes
VisilyWireframe generation
AI-Powered Testing
ToolUse Case
Playwright AISelf-healing selectors
TestimAI-generated test maintenance
ApplitoolsVisual AI testing
Optional Related Skills

Navigation

Resources (Framework-specific best practices)

Shared Utilities (Centralized patterns — extract, don't duplicate)

Templates (Production-ready starters by framework)

Related Skills


Operational Playbooks

More skills from diegosouzapw

accessibility logo
diegosouzapw/awesome-omni-skill

accessibility

Accessibility guidelines for VS Code features — covers accessibility help dialogs, accessible views, verbosity settings, accessibility signals, ARIA alerts/status announcements, keyboard navigation, and ARIA labels/roles. Applies to both new interactive UI surfaces and updates to existing feature...

62 1
View
mermaid-diagrams logo
diegosouzapw/awesome-omni-skill

mermaid-diagrams

Mermaid diagram creation for flowcharts, sequences, ERDs, and more. Generate diagrams from text in markdown files. Use for documentation, architecture diagrams, and visual representations. Triggers on mermaid, flowchart, sequence diagram, ERD, entity relationship, gantt chart, pie chart, class di...

62 1
View
tauri2-react-rust logo
diegosouzapw/awesome-omni-skill

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built...

62 1
View
fp-ts-errors logo
diegosouzapw/awesome-omni-skill

fp-ts-errors

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

62 0
View
ring:pre-dev-research logo
diegosouzapw/awesome-omni-skill

ring:pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agents to gather codebase patterns, external best practices, and framework documentation BEFORE creating PRD/TRD. Outputs research.md with file:line references.

62 0
View
create-assistant logo
diegosouzapw/awesome-omni-skill

create-assistant

Create and configure Vapi voice AI assistants with models, voices, transcribers, tools, hooks, and advanced settings. Use when building voice agents, phone bots, customer support assistants, or any conversational AI that handles phone or web calls.

62 0
View
codex-headless logo
diegosouzapw/awesome-omni-skill

codex-headless

Delegiere Aufgaben an OpenAI Codex CLI im Headless-Mode. Nutzt ChatGPT Subscription (KEIN API Key). Nur Workspace-Zugriff, KEIN System-Zugriff. Auto-Accept mit --full-auto. Web-Recherche mit --search.

62 0
View
social-media-scheduler logo
diegosouzapw/awesome-omni-skill

social-media-scheduler

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

62 0
View
Data Privacy Compliance logo
diegosouzapw/awesome-omni-skill

Data Privacy Compliance

Data privacy and regulatory compliance specialist for GDPR, CCPA, HIPAA, and international data protection laws. Use when implementing privacy controls, conducting data protection impact assessments, ensuring regulatory compliance, or managing data subject rights. Expert in consent management, da...

62 0
View
triple-review logo
diegosouzapw/awesome-omni-skill

triple-review

Reviews a task using the TRIPLE protocol, as the review agent.

62 0
View
Tech Stack & Architecture Decision logo
diegosouzapw/awesome-omni-skill

Tech Stack & Architecture Decision

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies...

62 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View