Next.js 15.5
Last reviewed Oct 15, 2026
Prompt Details
Prompt Composition
5prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- React 1948 lines · 1.4K tokens
- TypeScript 5.940 lines · 1.2K tokens
- Next.js 15.576 lines · 3.2K tokens
Total367 lines · 14.2K 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
- 1275
- 1321
- 1333
Prompt Preview
Apply the Node.js 24, React 19, TypeScript 5.9, and JavaScript ES2026 prompts first. These rules cover Next.js 15.5 Server and Client Components, Server Functions and Actions, Route Handlers, Pages API Routes, middleware, caching, and deployment. App Router uses React bundled with Next.js, so updating the application's React packages alone does not replace that server implementation. For Pages Router applications using React 18, also apply the React 18 prompt.
Server and client boundaries
- Put
import 'server-only'in modules holding secrets, database clients, privileged SDKs, and data-access code; return only authorized DTO fields to renderers. - 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; everyenventry innext.config.jsis bundled into client code regardless of its prefix. - 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.
- Use injection-safe queries in the server-only DAL: the data-security guide's SQL tag must bind values through its driver, and ORM conditions must use validated scalars. Authorize the object and tenant there, even when a page or middleware already checked the session.
Authentication and sessions
- In signup and password-reset actions, apply the baseline's password storage policy before saving a verifier. If adapting the