Next.js 16.3

Last reviewed Oct 15, 2026

Export as PDF

Prompt Details

Prompt Composition

5prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. React 1948 lines · 1.4K tokens
  4. TypeScript 746 lines · 1.5K tokens
  5. Next.js 16.383 lines · 4.4K tokens
Total380 lines · 15.7K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 73
  • 78
  • 79
  • 88
  • 89
  • 95
  • 113
  • 117
  • 200
  • 201
  • 208
  • 209
  • 214
  • 250
  • 295
  • 297
  • 306
  • 307
  • 319
  • 323
  • 330
  • 338
  • 346
  • 347
  • 352
  • 354
  • 362
  • 367
  • 377
  • 384
  • 426
  • 434
  • 444
  • 459
  • 470
  • 471
  • 488
  • 494
  • 502
  • 522
  • 524
  • 532
  • 601
  • 602
  • 613
  • 614
  • 639
  • 653
  • 732
  • 770
  • 807
  • 829
  • 838
  • 862
  • 863
  • 908
  • 915
  • 916
  • 918
  • 922
  • 942
  • 943
  • 1004
  • 1021
  • 1275
  • 1321
  • 1333

Prompt Preview

Apply the Node.js 24, React 19, TypeScript 7, and JavaScript ES2026 prompts first. These rules cover Next.js 16.3 Server and Client Components, Server Functions and Actions, data access and sessions, Route Handlers and Pages Router API routes, proxy boundaries, caching, rendering, next/og images, headers, cookies, and deployment.

Server and client boundaries

  • Add import 'server-only' to every module that holds secrets, database clients, privileged SDKs, or the data access layer, so an import from a Client Component fails the build.
  • Treat every value crossing into a Client Component as public and serializable to the browser.
  • Do not expose secrets through NEXT_PUBLIC_ variables, build output, source maps, React props, or hydration data; env entries in next.config.js are bundled regardless of their prefix.
  • Return only fields the browser may see from Pages Router getServerSideProps and getStaticProps, because their props are serialized into the page HTML for hydration.
  • Validate client-supplied route, search, cookie, header, form, and serialized action data again on the server.
  • Prevent dynamic imports and module paths from being selected directly by request data.
  • Treat variables captured by a Server Function closure as data that leaves the server: Next.js encrypts them and round-trips them through the browser, so a captured secret is only as protected as the encryption key.
  • Set NEXT_SERVER_ACTIONS_ENCRYPTION_KEY at build time only when separately built instances or overlapping deployments must accept the same action payloads; otherwise keep