AdonisJS v5: Explicit Auth Guards Prevent Silent API Bypass
Attaching auth middleware in AdonisJS v5 is not enough; you must bind an explicit guard to each route group or unauthenticated requests can reach your controllers.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Attaching auth middleware in AdonisJS v5 is not enough; you must bind an explicit guard to each route group or unauthenticated requests can reach your controllers.
Learn how to implement soft deletes in AdonisJS Lucid ORM to prevent permanent data loss, manage trashed records, and handle unique constraint conflicts.
Step‑by‑step guide to add, use, and verify soft deletes in AdonisJS Lucid ORM for both version 5 and 6, including migration, model changes, querying, restoring, and caveats.
Learn how to implement server-side pagination in AdonisJS using Lucid's paginate() method to prevent memory exhaustion and optimize API performance.
AdonisJS 5 Lucid paginate() runs COUNT(*) plus LIMIT/OFFSET. Cap perPage, coerce query strings, and verify query plans before shipping list endpoints.
Validate before opening a Lucid transaction, keep writes small, and map database constraint errors to predictable HTTP responses.
AdonisJS’s built‑in Validator turns request payloads into guaranteed, type‑casted data. Learn how to define schemas, inject them in controllers, customize error messages, and avoid common pitfalls with a practical example.
Use AdonisJS Lucid preload to fetch related records in one extra query instead of one per row.
Offset pagination in AdonisJS Lucid is trivial but degrades on large tables. Learn when to keep `paginate()` and when to hand-roll keyset cursors.