AdonisJS 7
Last reviewed Sep 25, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 6.044 lines · 1.3K tokens
- AdonisJS 783 lines · 3.9K tokens
Total330 lines · 13.6K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 200
- 208
- 209
- 214
- 250
- 252
- 287
- 295
- 297
- 306
- 307
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 384
- 426
- 434
- 444
- 459
- 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 and TypeScript 6.0 prompts first. These rules target AdonisJS 7 and its VineJS 4 integration, and were checked against @adonisjs/core 7.5.0, which requires Node.js 24 or newer. Apply the Auth, Bouncer, Session, Shield, Lucid, Edge, Drive, and Limiter rules when those packages are installed, using releases compatible with AdonisJS 7.
Dependencies, routes, and middleware
- Let the
@adonisjs/bodyparserrange that@adonisjs/coredeclares choose the parser release. Refresh it withnpm update @adonisjs/bodyparser, check every copy withnpm ls @adonisjs/bodyparser, and never pin, override, or resolve the parser outside that range to get an install through. - Use a stable Lucid 22.x release: Lucid 22 declares
@adonisjs/core7 as its peer, while Lucid 21 releases, security backports included, declare core 6. Never deploy a Lucid prerelease, such as one from npm'snextdist-tag. - Put controls needed for every HTTP request in
server.use()instart/kernel.ts;router.use()runs only after a route matches, and named middleware runs only where explicitly attached. Set required headers before middleware that can finish a static response. - Register body parsing and sessions before Shield, and initialize authentication before invoking guards or Bouncer. Enforce authorization before calling
next()or performing an effect; terminate denied requests without continuing the middleware chain. - Review
node ace list:routes, including resource routes, HEAD handling, and Drive file-serving routes. Attach required authentication and policy checks to