r/adonisjs • • Feb 25 '26

AdonisJS v7 is here

Thumbnail adonisjs.com
50 Upvotes

AdonisJS v7 is officially out today!

A major milestone after a long development cycle, and we couldn't be more excited about how it turned out.

Version 7 brings many long-anticipated improvements including full end-to-end type safety, completely redesigned starter kits with built-in authentication flows, zero-configuration observability with OpenTelemetry, and a brand-new website and documentation built from scratch. The APIs have been stabilized and the docs completely revamped to make onboarding and upgrading as smooth as possible.

Watch the promo for v7 here: https://www.youtube.com/watch?v=fmQc2JlnD80

And here's everything else:

Feel free to ask questions in the comments. Happy to help!


r/adonisjs • • Jun 23 '25

Announcement Roadmap to AdonisJS 7

Thumbnail
adonisjs.com
46 Upvotes

r/adonisjs • • 1d ago

Sharing 10 pre-release AdonisJS 7 packages I've been building. Looking for API & DX feedback before npm

8 Upvotes

I've been building an AdonisJS 7 app and kept extracting the plumbing I didn't want to rewrite or get subtly wrong: password resets, session revocation, team role matrices, operator impersonation, soft deletes, SQLite backups, idempotent writes, etc.

These are still pre-release (distributed as GitHub release .tgz archives, not published to npm yet). Honestly, if I don't draw a line and share them now, I'll tinker on them forever, so right at the end of the day, I'm putting them out for Show Off Sunday to get eyes on the APIs and hear what feels right (or awkward) to other AdonisJS 7 devs.

Account & Auth (headless - keep your user model, routes, and UI)

  • Account Kit (v0.12.0):

    • Password reset, signup & email verification, invitations, account settings, magic links, tracked sessions (with sliding + absolute lifetimes and admin revocation), password screening, and optional social linking.
    • Handles the transaction, locking, and token edge cases while leaving routes and UI to your app.
  • Account Admission (v0.2.0):

    • Domain allowlists, invite evidence, and approval queues on top of Account Kit.
  • Access Control (v0.6.0):

    • Team/workspace memberships and a ranked role matrix with compile-time resource:operation permission keys, atomic ownership transfer, scope middleware, and Bouncer abilities.
  • Masquerade (v0.9.0):

    • Server-side operator impersonation without logging in as the target user.
    • Read-only by default, explicit edit approval, sensitive route blocking, audit ledger, and support for both sessions and opaque access tokens.
  • Confirm Action with Password (v0.8.0):

    • Short-lived, single-use password re-confirmation bound to the session, credential revision, operation, and request payload, spent in the same transaction as the protected write.

Lucid & SQLite

  • Lucid Soft Delete (v0.5.0):

    • withSoftDeletes mixin for AdonisJS 7 Lucid models. Handles OR-predicate wrapping, relation subqueries, group limits, and transactional bulk receipts, tested across SQLite, PostgreSQL, and MySQL.
  • Lucid Checked Columns (v0.5.0):

    • u/column helpers for JSON, ISO date, and ISO timestamp columns that validate on both write (prepare) and read (consume) so corrupt rows fail loudly.
  • SQLite Backup (v0.6.0):

    • Verified, immutable online SQLite backup bundles (db:backup, db:upgrade) with integrity/foreign-key checks and prepare-only restore.

HTTP & Reliability

  • Request Deduplication (v0.5.0):

    • Idempotency guard for AdonisJS 7 + SQLite: reserves a receipt inside the same transaction as your writes so double-clicks/retries return the first result and failed writes retry fresh.
  • Origin Guard (v0.5.0):

    • Stateless cross-site write protection using Origin and Sec-Fetch-Site headers (no tokens to issue), plus origin parsing and private-peer helpers.

(There's also a companion Starter Examples repo showing them wired into Edge, Inertia Vue/React, and API apps.)

Design goals across the set

  • Built specifically for AdonisJS 7 (Node 24+, Lucid 22, TypeScript 5.9/6).
  • Fail-closed defaults and real-database integration tests (SQLite, plus PostgreSQL/MySQL on the packages that target them), plus packed-consumer smoke tests in CI.
  • Scoped test fakes using using (fakeAccountKit, fakeMasquerade, fakeAdmission, fakePasswordConfirmations, fakeSqliteBackup) so app tests don't need to monkey-patch booted services.

Looking for feedback on

  • Does anything in the APIs, ace configure flow, or naming feel un-idiomatic for AdonisJS 7?
  • Which of these would you actually want on npm first, and what's missing before you'd trust it in a real project?
  • Where have I just got things wrong?

Thanks folks.


r/adonisjs • • 24d ago

BEGINNER CODER: Stuck with a migrations error

1 Upvotes

Hi,

I'm working on an adonisjs project and I'm having issues with migrations. I don't think I'm using the wrong command. I'm doing:

node ace make:migration (migration name here)

Then:

node ace migration:run

My project is on github. Apologies the migrations folder is a little cluttered. The ones with issues are the "item" and "item_comments" ones:

https://github.com/Ajaz754/adonisjs-project-22-.git

The error is:

C:\Windows\System32\adonis22>node ace migration:run
❯ error database/migrations/1794008714673_alter_item_comments_table
[ error ] INSERT INTO "_knex_temp_alter555" SELECT * FROM "item_comments"; - no such table: main.item

Please correct me if I'm wrong but I thinks its saying my "item" table doesnt exist which doesnt make sense since its clearly my 'schema.ts'. It said the same error before for the "user" table aswell.

Any help would be much appreciated

TIA


r/adonisjs • • Oct 27 '26

Beginner Coder: Stuck with a db error

1 Upvotes

Hi,

I'm working on an adonisjs project. l've ran into an error

My project is on github:

https://github.com/Ajaz754/adonisjs-project-22-.git

The error is in file 'database/seeders/ product_seeder.ts' Line 10

The error is:

Object literal may only specify known properties, and 'userld' does not exist in type
'OneOrMany<Partial<ModelAttributes<Product>>>.

Adding 'userId' field to the product schema and rerunnning migration did not fix the issue.

I think it may have something to do with this (something I tried in the REPL):

> (js) const user = await models.user.find(1)
Uncaught SyntaxError: Identifier 'user' has already been declared
> (js) user.id
Uncaught ReferenceError: user is not defined
> (js)

I don't understand. Please correct me if I'm wrong but it says 'user' already exists but when I try to use it, it says its undefined?

Any help would be much appreciated

TIA


r/adonisjs • • Oct 25 '26

STUCK WITH ERROR

1 Upvotes

Hi,

I'm working on an adonisjs project. l've ran into an error

My project is on github:

https://github.com/Ajaz754/adonisjs-project-22-.git

The error is in file 'database/seeders/product_seeder.ts' Line 10

The error is:

Object literal may only specify known properties, and 'userId' does not exist in type 'OneOrMany<Partial<ModelAttributes<Product>>>'.

Any help would be much appreciated

TIA


r/adonisjs • • Sep 25 '26

Stuck with an error

Post image
2 Upvotes

Hi,

I'm working on an adonisjs project. l've ran into an error

My project is on github:

https://github.com/Ajaz754/adonisjs-project-22-

The error is in file 'app/transfromers/ post_transformers' Line 22

Only thing l've done differently to the adonis docs is make 'post.author' into 'post.author?' to fix a type error as it was showing the error where it may possibly be undefined. That post is here:

https://www.reddit.com/r/adonisjs/s/V7e08q3nfJ

Any help would be much appreciated

TIA


r/adonisjs • • Sep 23 '26

Beginner Coder Stuck with an error

Post image
1 Upvotes

Hi,

I'm working on an adonisjs project. I've ran into an error:

My project is on github:

https://github.com/Ajaz754/adonisjs-project-22-

The error is in file 'app/transfromers/post_transformers' Line 22

Only thing I've done differently to the adonis docs is make 'post.author' into 'post.author?' to fix a type error as it was showing the error where it may possibly be undefined. That post is here:

https://www.reddit.com/r/adonisjs/s/V7eO8q3nfJ

Any help would be much appreciated

TIA


r/adonisjs • • Sep 21 '26

Beginner Coder: Stuck with an error

2 Upvotes

Hi,

Currently developing a basic web app following adonisjs docs.

I've ran into an error:

[23:18:41.975\1 ERROR (12316): Cannot transform undefined value. Use "this.whenLoaded (value)" to allow undefined values

My project is on github:

https://github.com/Ajaz754/adonisjs-project-22-/ tree/main

The error is pointing to 'app/transformers/ post__transformer.ts' Line 13

I've followed adonis docs completely step by step except for ?.depth(2) on line 14, which when I removed only introduced more errors along with this one.

Also VS Code isn't flagging the error. Only when I go to my browser and visit local host the error appears in powershell and my browser. Any help would be much appreciated


r/adonisjs • • Sep 14 '26

Beginner Coder: Stuck with an error

4 Upvotes

Hi,

I'm following the AdonisJs docs to make a small web app using VS Code where users can login/logout/signup, make posts, view them, comment, etc.

I'm pretty sure I haven't missed a step but I seem to be getting two errors that I dont understand at all.

I put the project on my github:

https://github.com/Ajaz754/adonisjs-project-22-.git

The file with the two errors is 'inertia/pages/posts/index.tsx', Line 34

The two errors I'm getting are for:

'route'

----------------------------------------------------
Type '"posts.show"' is not assignable to type '"home" | "posts.index" | "new_account.create" | "new_account.store" | "session.create" | "session.store" | "session.destroy" | undefined'.ts(2322)
link.d.ts(23, 5): The expected type comes from property 'route' which is declared here on type 'IntrinsicAttributes & (LinkProps<"home" | "posts.index" | "new_account.create" | "new_account.store" | "session.create" | "session.store" | "session.destroy"> & { ...; })'
(property) route: "posts.show"
----------------------------------------------------

And:

'routeParams'

----------------------------------------------------
Type '{ id: number; }' is not assignable to type 'undefined'.ts(2322)
link.d.ts(24, 5): The expected type comes from property 'routeParams' which is declared here on type 'IntrinsicAttributes & (LinkProps<"home" | "posts.index" | "new_account.create" | "new_account.store" | "session.create" | "session.store" | "session.destroy"> & { ...; })'
(property) routeParams: {
id: number;
}
----------------------------------------------------

I've watched a few videos and I understand the basics to Typescript and React but reading these 2 error messages I'm lost. Would appreciate any help.

Also if im trying to learn the basics of web development and just practicing through continuosly building projects and using different stacks and languages is that the right approach or maybe theres a more modern better way to learn web development.

Any feedback and help would be much appreciated.


r/adonisjs • • Sep 13 '26

How do you folks run scripts?

5 Upvotes

Long-time Rails user here, been toying with Adonis lately. I'm used to using rails runner to run scripts, is there an equivalent for Adonis?

Something like node ace run scripts/release.ts.

I saw custom commands, but those have a bunch of boilerplate associated with them (yep I can see how the added structure is useful in some cases).


r/adonisjs • • Sep 10 '26

AdonisJS SaaS Starter

19 Upvotes

I got tired of rebuilding the same things every time I built a new SaaS.
In the past used yann-yinn/adonis-starter as my starting point but it hasnt been updated in a long time so some years ago stopped using it.

This time I gave Claude my old projects, told it what I wanted to keep/change, and basically guided it through all the things I kept rebuilding until we ended up with this little masterpiece.

It’s **kitch4nSinkV2** — my opinionated SaaS starter that I can clone whenever I have a new idea.Auth, tenants, subscriptions, quotas, background jobs, webhooks, admin stuff, tests, etc. Basically all the boring plumbing I don’t want to think about for the 10th time.

It’s obviously very opinionated and built around how I like to work, but thats kind of the point. I wanted *my* starting point instead of rebuilding the same starter from scratch every time.

Im also planning to add a nice debug package for development. I have my own version, but I’m still debating whether I actually want to include it or just use one of the existing ones. Mostly because I really don’t want to accidentally sign myself up for maintaining yet another thing 😅

Open sourced it in case anyone else finds it useful:

https://github.com/IvanWasHere/kitch4nSinkV2

Also curious what other people have in their personal “I refuse to build this again” starter.


r/adonisjs • • Aug 19 '26

Adonis JS Hosting options

9 Upvotes

I’m looking for a way to host an AdonisJS backend for a potential MVP. Ideally, I’d like something free or very low cost.

Before spending too much time into the project, I want to be able to share it with a few people, get some feedback, and decide if it’s worth continuing.

The frontend is built with TanStack Start and is already deployed on Vercel. I initially considered using Next.js for both frontend and backend, but from my past experience, I decided to move away from it 😅

From what I understand, an AdonisJS backend can’t be deployed on Vercel (based on what I’ve read), so I assume I’ll need a different hosting solution.

I asked for free hosting options, as there are sometimes ways to run small projects for free . If that’s not possible, I’d really appreciate recommendations for the cheapest and most reliable alternatives.
Thanks in advance.


r/adonisjs • • Jun 10 '26

Ace Nvim plugin

9 Upvotes

Hey everyone,

I’ve been working on a small Neovim plugin that integrates with the AdonisJS Ace CLI (:Ace), a very simple wrapper around the CLI,

Maybe I reinvented the wheel here, if there's already an official plugin I'd love to know , but if anyone's using Neovim in their AdonisJS workflow, I'd be curious whether this is useful or how you'd improve it.

https://github.com/maiobarbero/ace.nvim


r/adonisjs • • May 18 '26

OpenAPI generator for AdonisJS

Thumbnail
github.com
15 Upvotes

We built this at Outloud because we kept hand-writing OpenAPI specs for our AdonisJS backends and it was painful.

It introspects your routes, controllers and VineJS validators to produce a spec. No decorators or manual annotations required.


r/adonisjs • • May 06 '26

Where I've landed on AI tooling for AdonisJS

20 Upvotes

Been working through this for a few months and finally wrote up the thinking. The short version is that I don't think the problem is giving AI more knowledge about the framework. It's that we need to encode how we actually engineer with it, the patterns, the tradeoffs, the decisions that come from years of writing code in a certain way.

Full piece on the AdonisJS blog, including the architecture I'm building into Flow. Flow is part of AdonisJS Plus, but the article itself is open and walks through the thinking and architecture regardless.

Genuinely curious what people here think, especially if you've been using AI on AdonisJS work and have noticed the same gaps.

https://adonisjs.com/blog/teaching-ai-to-write-adonisjs


r/adonisjs • • Apr 23 '26

A year of 3x growth, and everything we shipped in April

38 Upvotes

Hey everyone! Monthly round-up.

First, some good news. A year ago we were at 34k weekly downloads on npm. This week we crossed 96k. Nearly 3x over twelve months. That is a huge milestone and thanks a lot to everyone who has been shipping AdonisJS in production, sharing it around, and sending PRs back.

Now, let me do a round up of all the releases we made this month. There is a lot to share.

Lucid

  • Migration squashing via a new schema:dump command. MySQL, Postgres, SQLite. https://lucid.adonisjs.com/docs/schema-dumps
  • Database assertion helpers for tests. assertHas, assertMissing, assertCount, assertEmpty, assertModelExists, assertModelMissing right in the test context. https://lucid.adonisjs.com/docs/testing#database-assertions
  • make:model --transformer scaffolds a transformer alongside the model.
  • Schema generator handles invalid JS identifiers and emits structured decorators.
  • withCount ignores relation onQuery ordering, limits, and offsets. Thanks enixsoft.
  • The Lucid docs got a full overhaul. Around 11k lines of changes, new pages for config and every command, a proper Testing section, and a pile of wrong examples fixed against the source. Worth another look.

Ally

  • v6.1.0: New Twitter X driver and signup policies. Mark a provider as disallowLocalSignup and pass an intent to use() (signup, login, or link).
  • v6.2.0: Self-handled exceptions. No more chain of conditionals after the social auth callback. The framework raises self-handled exceptions for access denial, state mismatch, and provider errors. https://github.com/adonisjs/ally/releases/tag/v6.2.0
  • v6.3.0: LinkedIn email_verified flag, default callback URL, inertia.location for external redirects during Inertia requests, and placeholder env var values on install.

Core and HTTP

  • New safeTiming helper in @adonisjs/core for timing-attack-safe operations. Guaranteed minimum time with a returnEarly() escape hatch. Useful for login, password reset, and API key flows. https://docs.adonisjs.com/reference/helpers#safetiming
  • @adonisjs/http-server: Malformed percent-encoded URIs like %C0%80 now return a clean 400 instead of crashing, with a configurable onBadUrl callback.
  • Assembler: ValidatorExtractor understands request.tryValidateUsing, so Tuyau infers body types for those actions. Thanks jeppester.
  • Assembler: Custom tsconfig path for bundle. Thanks aadamcik.

Security (please upgrade)

Other ecosystem packages

  • flydrive: Cross-bucket copy and move for S3 and GCS via a new destinationBucket option. Thanks Romain.
  • @adonisjs/queue: New OpenTelemetry export at @adonisjs/queue/otel.
  • @adonisjs/limiter: Weighted rate limiting. consume, increment, and decrement now take an amount. Thanks MaximeMRF.
  • @adonisjs/hash, events, mail, and flydrive: Symbol.dispose support for cleaner using-based fake cleanup in tests.
  • @adonisjs/bodyparser: Gzip request bodies no longer fail an invalid length check.
  • @adonisjs/logger: desination typo renamed to destination (old name kept as a deprecated alias).
  • @japa/plugin-adonisjs v5: New swap and useFake helpers. No more container.swap and container.restore in every test.

Starter kit

  • Flash and share success messages with the React and Vue apps.
  • Redirect query string forwarding on by default.
  • serialize helper plays nicely with DI.
  • AccessTokens controller renamed to plural, logout route moved to the account group.

r/adonisjs • • Apr 14 '26

We patched an open redirect vulnerability in `redirect.back()`

22 Upvotes

While building the Social Auth components for AdonisJS, we discovered an open redirect vulnerability in the redirect.back() method.

The method was reading the Referer header without validating the host. This meant an attacker who could control that header could redirect your users to an arbitrary external URL. Think phishing pages, malicious sites, or any destination outside your application.

The fix

The method now validates the referrer's host against the current request's own host before following it. If they do not match, it falls back to a safe URL instead. For applications that operate across multiple domains, you can configure additional trusted hosts in config/app.ts.

Both v7 and v6 are covered. Run npm update to pull in the latest version of @adonisjs/http-server.

What else landed

We used this as an opportunity to add a few redirect APIs that developers end up building themselves in every project.

  • Intended URL after login. When an unauthenticated user hits a protected route and gets sent to the login page, toIntended() sends them back to where they were trying to go after authenticating.
  • Session-based previous URL for third-party flows. When a user goes through an OAuth provider and returns via a callback, redirect.back() would previously follow the provider's domain. You can now store the previous URL in the session before the redirect and the framework uses it correctly on return.

Full writeup with code examples in https://adonisjs.com/blog/how-we-redesigned-redirects-in-adonisjs


r/adonisjs • • Apr 06 '26

Where to deploy? Is there an industry standard for Adonis?

9 Upvotes

Coming from Laravel, there are a couple of "industry standards" for deploying the app. Now I'm about to try Adonis, but I can't seem to figure out what the most common way to deploy is. Why don't Adonis launch their own service for deployment?


r/adonisjs • • Mar 31 '26

Can anyone help me with Inertia tests?

3 Upvotes
import User from '#models/user'
import { test } from '@japa/runner'

test.group('[Functional] Auth Controller', () => {
  test('can log in', async ({ client }) => {
    const userData = {
      email: 'usertest@example.com',
      password: 'usertest',
    }

    await User.create(userData)
    const response = await client.post('/login').json(userData).withCsrfToken().withInertia()

    response.assertStatus(200)
    response.assertInertiaComponent('store_bot')
  })
})

I create some functional tests to my application, but I am keep getting errors. For an example, there is a test to the POST /login and it should log in the user and redirect to the store_bot component, but the response that I am getting is:

ApiResponse {
  cookiesJar: [Object: null prototype] {
    'adonis-session': [Object: null prototype] {
      name: 'adonis-session',
      value: 'llhgvts250sxxy6hv14ie7bb',
      maxAge: 7200,
      path: '/',
      httpOnly: true,
      sameSite: 'Lax'
    }
  },
  request: ApiRequest {
    hooks: Hooks {},
    request: Request {
      _events: [Object: null prototype],
      _eventsCount: 1,
      _maxListeners: undefined,
      _enableHttp2: false,
      _agent: false,
      method: 'GET',
      url: 'http://0.0.0.0:46101/login',
      _header: [Object],
      header: [Object],
      writable: true,
      _redirects: 2,
      _maxRedirects: 5,
      cookies: '',
      qs: {},
      _query: [],
      qsRaw: [],
      _redirectList: [Array],
      _streamRequest: false,
      _lookup: undefined,
      _data: null,
      _buffer: true,
      protocol: 'http:',
      host: '0.0.0.0:46101',
      _endCalled: true,
      _callback: [Function (anonymous)],
      _fullfilledPromise: [Promise],
      res: [IncomingMessage],
      req: [ClientRequest],
      _resBuffered: true,
      response: [Response],
      called: true,
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false
    },
    cookiesJar: { 'adonis-session': [Object] },
    config: {
      baseUrl: 'http://0.0.0.0:46101',
      method: 'POST',
      endpoint: '/login',
      hooks: [Object],
      serializers: [Object]
    },
    [Symbol(CSRF_ENABLED)]: true
  },
  response: <ref *1> Response {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined,
    res: IncomingMessage {
      _events: [Object],
      _readableState: [ReadableState],
      _maxListeners: undefined,
      socket: [Socket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      joinDuplicateHeaders: undefined,
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 200,
      statusMessage: 'OK',
      client: [Socket],
      _consuming: false,
      _dumped: false,
      req: [ClientRequest],
      _eventsCount: 4,
      text: '{"component":"login","url":"/login","version":"1","props":{"user":null,"flash":{"form":{}},"errors":{"E_UNAUTHORIZED_ACCESS":"Unauthorized access"}},"clearHistory":false,"encryptHistory":false}',
      [Symbol(shapeMode)]: true,
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 22,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0
    },
    request: Request {
      _events: [Object: null prototype],
      _eventsCount: 1,
      _maxListeners: undefined,
      _enableHttp2: false,
      _agent: false,
      method: 'GET',
      url: 'http://0.0.0.0:46101/login',
      _header: [Object],
      header: [Object],
      writable: true,
      _redirects: 2,
      _maxRedirects: 5,
      cookies: '',
      qs: {},
      _query: [],
      qsRaw: [],
      _redirectList: [Array],
      _streamRequest: false,
      _lookup: undefined,
      _data: null,
      _buffer: true,
      protocol: 'http:',
      host: '0.0.0.0:46101',
      _endCalled: true,
      _callback: [Function (anonymous)],
      _fullfilledPromise: [Promise],
      res: [IncomingMessage],
      req: [ClientRequest],
      _resBuffered: true,
      response: [Circular *1],
      called: true,
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false
    },
    req: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      _header: 'GET /login HTTP/1.1\r\n' +
        'Host: 0.0.0.0:46101\r\n' +
        'accept-encoding: gzip, deflate\r\n' +
        'x-inertia: true\r\n' +
        'x-inertia-version: 1\r\n' +
        'x-csrf-token: Oq9DXG76-81agY1zMQHatrzbqH5Oyk1tccac\r\n' +
        'cookie: adonis-session=s%3AeyJtZXNzYWdlIjoibGxoZ3Z0czI1MHN4eHk2aHYxNGllN2JiIiwicHVycG9zZSI6ImFkb25pcy1zZXNzaW9uIn0.ccrUbHcNKc0NAZM5UgCTlpQSf6v-3qUQul4BJ8P8faY\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/login',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: '0.0.0.0',
      protocol: 'http:',
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kChunkedBuffer)]: [],
      [Symbol(kChunkedLength)]: 0,
      [Symbol(kSocket)]: [Socket],
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 65536,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    text: '{"component":"login","url":"/login","version":"1","props":{"user":null,"flash":{"form":{}},"errors":{"E_UNAUTHORIZED_ACCESS":"Unauthorized access"}},"clearHistory":false,"encryptHistory":false}',
    files: undefined,
    buffered: true,
    headers: {
      'x-frame-options': 'DENY',
      'strict-transport-security': 'max-age=15552000',
      'x-content-type-options': 'nosniff',
      'x-inertia': 'true',
      'set-cookie': [Array],
      vary: 'x-inertia',
      'x-request-id': 'ajwv2hnns7nhf4liak6dgxyr',
      'content-length': '193',
      'content-type': 'application/json; charset=utf-8',
      date: 'Tue, 31 Mar 2026 02:10:25 GMT',
      connection: 'close'
    },
    header: {
      'x-frame-options': 'DENY',
      'strict-transport-security': 'max-age=15552000',
      'x-content-type-options': 'nosniff',
      'x-inertia': 'true',
      'set-cookie': [Array],
      vary: 'x-inertia',
      'x-request-id': 'ajwv2hnns7nhf4liak6dgxyr',
      'content-length': '193',
      'content-type': 'application/json; charset=utf-8',
      date: 'Tue, 31 Mar 2026 02:10:25 GMT',
      connection: 'close'
    },
    statusCode: 200,
    status: 200,
    statusType: 2,
    info: false,
    ok: true,
    redirect: false,
    clientError: false,
    serverError: false,
    error: false,
    created: false,
    accepted: false,
    noContent: false,
    badRequest: false,
    unauthorized: false,
    notAcceptable: false,
    forbidden: false,
    notFound: false,
    unprocessableEntity: false,
    type: 'application/json',
    charset: 'utf-8',
    links: {},
    setEncoding: [Function: bound ],
    redirects: [ 'http://0.0.0.0:46101/', 'http://0.0.0.0:46101/login' ],
    _body: {
      component: 'login',
      url: '/login',
      version: '1',
      props: [Object],
      clearHistory: false,
      encryptHistory: false
    },
    pipe: [Function (anonymous)],
    [Symbol(shapeMode)]: false,
    [Symbol(kCapture)]: false
  },
  config: {
    baseUrl: 'http://0.0.0.0:46101',
    method: 'POST',
    endpoint: '/login',
    hooks: { setup: [Array], teardown: [] },
    serializers: { cookie: [Object] }
  },
  assert: Assert {
    assertions: { total: 0, mismatchError: null, validate: [Function: validate] },
    Assertion: [class Assertion],
    AssertionError: [class AssertionError extends Error],
    doesNotThrows: [Function: bound doesNotThrow],
    doesNotRejects: [Function: bound doesNotReject] AsyncFunction
  },
  sessionBag: {
    values: { 'csrf-secret': 'a7Zay0E9IMFq3BwyGEILn8hS' },
    flashMessages: {}
  }
}

The route is here:

async login(ctx: HttpContext) {
    const payload = await ctx.request.validateUsing(loginValidator)
    const user = await User.findBy('email', payload.email)

    if (!user || !(await user.verifyPassword(payload.password))) {
      ctx.session.flash('error', ctx.i18n.t('auth.invalid_credentials'))
      return ctx.response.redirect().back()
    }

    await ctx.auth.use('web').login(user)
    return ctx.response.redirect().toRoute('bots.store')
  }

r/adonisjs • • Mar 25 '26

What's shipped in the AdonisJS ecosystem since v7

25 Upvotes

v7 has been out for a bit now. Here's a rundown of everything that has landed since the release.

Queues (experimental)

The queues package is now available. Multi-driver support, typed job classes, delayed jobs, a job scheduler, and queue fakes for testing. It is experimental so the APIs may still change, but it is ready enough to try and give feedback on.

Docs

Lucid

v22.1.0 adds CTE support and onConflict expression builder to InsertQueryBuilder.

v22.1.1 fixes primary key detection in schema generation and adds schema class generation for non-public PostgreSQL schemas.

v22.1.0 / v22.1.1

Tuyau

  • v1.1.0: Client is now type-safe around backend errors
  • v1.2.0: Wildcard route support
  • v1.2.2: Fix for types with Vine union validators

Releases

Package starter kit updated for v7

If you build or maintain AdonisJS packages, the pkg-starter-kit is now updated for v7. Uses tsdown for bundling, ts-exec as the JIT compiler, and includes a GitHub CI release workflow.

Starter kit fixes

  • APP_KEY no longer gets cast to a string when passed to the encryption module
  • Database config templates now include commented multi-driver options
  • New global Vine.date transform that converts JavaScript dates to Luxon DateTime instances for better portability with Lucid models

list:routes for AI agents

The list:routes command now outputs JSONL when invoked by an AI agent. Each route is a plain JSON object on its own line, easier to parse than the table format.

Smaller fixes

  • @adonisjs/core v7.1.1: indexEntities now creates the manifest file correctly when manifest.enabled is true. Release notes
  • @adonisjs/assembler v8.0.1: storage, tmp, and build directories are now excluded from the file watcher. Release notes
  • @adonisjs/static v2.0.1: dotfiles option fix. Release notes
  • @adonisjs/otel v1.2.2: userContext was undefined in middleware. Fixed. Release notes
  • @adonisjs/inertia v4.1.1: Request timeouts in SSR mode during development. Fixed. Release notes

AdonisJS Plus — Persona and Permission

Two packages landed as part of AdonisJS Plus. Persona covers the user management layer (email verification, password resets, email changes, 2FA). Permission is a type-safe RBAC layer built on Bouncer with flexible scoping. There is a blog post that goes into the design in detail if you are curious.

Blog post / AdonisJS Plus


r/adonisjs • • Mar 24 '26

We Hear You. A response to the State of JS 2025 backend pain points

34 Upvotes

Hey everyone,

Went through the State of JS 2025 backend pain points and put together a page that shows how AdonisJS addresses most of them.

Types breaking at boundaries, auth wiring, choice overload, and docs that don't teach. The same complaints come up every year in the survey.

Also made a short video version for social. If you share it around, that would help a lot.

adonisjs.com/we-hear-you

Let me know what you think.


r/adonisjs • • Mar 20 '26

How to use Form/Link from Adonis Inertia Vue

4 Upvotes

It is documented, but now it is Tuyau provider which is not documented. Any idea?

The reason is not to use plate /path/to/resource but instead to use the equivalent of urlFor in the front (inertia)


r/adonisjs • • Mar 13 '26

Updated my JWT authentication package for AdonisJS v7

19 Upvotes

Hi everyone!

With the recent release of AdonisJS v7, I’m happy to announce that adonisjs-jwt has been updated to fully support the latest version of the framework!

For those who don't know the package, it provides a simple and lightweight way to implement JWT (JSON Web Token) authentication in your AdonisJS applications, which is especially useful for stateless APIs or microservices.

Still fully supports v6 for those who haven't migrated yet, you just have to install the v0.7.x.

You can check out the documentation and source code here: 👉https://github.com/MaximeMRF/adonisjs-jwt

If you have any feedback, issues, or feature requests, feel free to open an issue on GitHub or reach out here.

Happy coding with v7!