r/adonisjs • u/web-dev-kev • 1d ago
Sharing 10 pre-release AdonisJS 7 packages I've been building. Looking for API & DX feedback before npm
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:operationpermission keys, atomic ownership transfer, scope middleware, and Bouncer abilities.
- Team/workspace memberships and a ranked role matrix with compile-time
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):withSoftDeletesmixin for AdonisJS 7 Lucid models. HandlesOR-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.
- u/column helpers for JSON, ISO date, and ISO timestamp columns that validate on both write (
SQLite Backup (
v0.6.0):- Verified, immutable online SQLite backup bundles (
db:backup,db:upgrade) with integrity/foreign-key checks and prepare-only restore.
- Verified, immutable online SQLite backup bundles (
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
OriginandSec-Fetch-Siteheaders (no tokens to issue), plus origin parsing and private-peer helpers.
- Stateless cross-site write protection using
(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 configureflow, 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.