npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@anu8151/adonisjs-blueprint

v1.6.1

Published

Blueprint for AdonisJS 7

Readme

AdonisJS Blueprint

[!note] This package targets AdonisJS v7

A professional-grade code generator for AdonisJS 7 inspired by Laravel Blueprint. Rapidly scaffold your entire application infrastructure from a single, human-readable YAML file.

Features

  • API-First Mode: Switch between MVC, InertiaJS, or pure JSON APIs with a single setting.
  • Inertia Support: Generates full CRUD pages for React, Vue, and Svelte with standard components.
  • Models & Migrations: Lucid models with Soft Deletes, Enums, and automatic Pivot Tables.
  • Smart Shorthands: Define migration modifiers like string:unique:min:10:nullable directly in YAML.
  • Authorization: Integrated Bouncer support—generates Policies with smart mapping.
  • Side-Effects: Generates Events, Mails, Jobs, and Notifications classes and logic.
  • WebSockets: Integrated AdonisJS Transmission support—generates channels and auth logic.
  • Documentation: Automatically generates full OpenAPI 3.0 specs (Swagger).
  • Security: Built-in support for Rate Limiting and secure file uploads.
  • Watch Mode: Rebuilds your app infrastructure whenever you save draft.yaml.

Setup

npm install @anu8151/adonisjs-blueprint
node ace configure @anu8151/adonisjs-blueprint

DX (VS Code)

Enable auto-completion by adding this comment to your draft.yaml:

# yaml-language-server: $schema=node_modules/@anu8151/adonisjs-blueprint/build/src/schema.json

Usage

1. Initialize

node ace blueprint:init

2. Define

settings:
  api: false
  inertia: { enabled: true, adapter: react }

auth: true

models:
  Post:
    attributes:
      title: string:unique:min:5
      body: text:nullable
      status: enum:draft,published:default:draft
      category_id: integer:unsigned:references:categories.id
    softDeletes: true
    relationships:
      user: belongsTo
      tags: belongsToMany

controllers:
  Post:
    resource: true
    publish:
      query: find
      save: status:published
      fire: PostPublished
      send: NewPostMail
      redirect: posts.index

3. Build

node ace blueprint:build --watch

Advanced Shorthands

Blueprint supports complex migration modifiers in your model attributes:

  • string:unique: Unique index.
  • integer:unsigned: Unsigned integer.
  • text:nullable or text:optional: Nullable column.
  • enum:a,b,c: Enum column.
  • references:table.column: Foreign key reference (defaults to CASCADE).
  • datetime, timestamp, boolean, float, decimal, json, uuid.

Controller Statements

  • query: all | paginate:20 | find [, with: rel1, rel2]
  • validate: field1, field2
  • authorize: action, model
  • save: true [, with: rel1, rel2]
  • upload: field to: disk
  • fire: EventName, send: MailName, notify: target, NotifName
  • dispatch: JobName, throttle: limiterName
  • service: ServiceName.method

Core Commands

  • blueprint:init: Create sample draft.yaml.
  • blueprint:build: Generate files from draft. Supports --watch, --force, --erase.
  • blueprint:erase: Remove all generated files from the last build.
  • blueprint:trace: Reverse-engineer your DB into a draft.yaml.
  • blueprint:stubs: Export all stubs for local customization.

Testing

This package uses Japa for testing. To run tests:

npm test

For quick test runs during development:

npm run quick:test

License

MIT