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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@florianogomez/aurora-generators

v1.3.1

Published

Production-ready code generator for modern CRUD applications. Generate complete modules with TypeScript, Vue 3, Pinia, and more in seconds.

Readme

Aurora Module Generator


🚀 Quick Start

# Install globally
npm install -g @florianogomez/aurora-generators

# Generate a Vue 3 module interactively
generate vue module --interactive

# Or from a YAML file
generate vue module resources/product.yaml

✨ Features

  • 🎯 Complete CRUD Generation - Generate 28+ files in seconds
  • 📝 TypeScript First - Full type safety with 6 interfaces per module
  • 🎨 Vue 3 + Pinia - Modern state management out of the box
  • 🧩 Composable-based - Reusable logic with Vue composables
  • 🎭 Vuetify Support - Beautiful UI components (optional)
  • 🔧 Highly Customizable - 35+ Handlebars templates
  • 🧪 Dry Run Mode - Preview changes before writing files
  • 🗑️ Smart Deletion - Remove modules with automatic cleanup
  • 📦 Zero Configuration - Works out of the box
  • 🌐 Framework Ready - React & Angular support coming soon

📦 Installation

Global Installation (Recommended)

npm install -g @florianogomez/aurora-generators

Local Installation

npm install --save-dev @florianogomez/aurora-generators

Then use with npx:

npx generate vue module --interactive

📖 Usage

Interactive Mode (Easiest)

generate vue module --interactive

The CLI will guide you through:

  • Resource name (e.g., "Product", "User")
  • Attributes with types
  • Filter configurations
  • Action selection
  • Output directory

YAML Configuration (Recommended for Complex Modules)

Create a YAML file (e.g., product.yaml):

resource: Product
description: Module de gestion des produits
version: 1.0.0

attributes:
  - name: name
    type: string
    required: true
    description: Product name

  - name: price
    type: number
    required: true
    description: Product price

  - name: category
    type: string
    required: true
    description: Product category

  - name: is_active
    type: boolean
    required: true
    description: Active status

create_attributes:
  - name
  - price
  - category

update_attributes:
  - name
  - price
  - is_active

filterAttributes:
  - name: is_active
    type: boolean
    label: "Status"
    icon: "ri-checkbox-circle-line"
    trueLabel: "Active"
    falseLabel: "Inactive"

  - name: category
    type: string
    label: "Category"
    icon: "ri-folder-line"

actions:
  - name: getAll
    description: Get all products
    route: list
    method: GET

  - name: create
    description: Create a product
    route: create
    method: POST

  - name: updateOne
    description: Update a product
    route: update
    method: PUT

  - name: delete
    description: Delete a product
    route: delete
    method: DELETE

Generate the module:

generate vue module product.yaml

Available Commands

# Generate module
generate vue module [options] [file]

# Delete module
delete-module vue Product

# Options
--interactive     Interactive mode
--dry-run        Preview without writing files
--overwrite      Overwrite existing files
--help           Show help

⚙️ Configuration

Create a configuration file at the root of your project to customize the output directory:

Option 1: JavaScript Configuration

Create aurora.config.js:

export default {
  // Output directory (relative to project root)
  outputDir: './src',
  
  // Modules directory name
  modulesDir: 'modules',
  
  // Or use full path override
  // modulesPath: './src/modules',
  
  // Generation options
  options: {
    overwrite: false,
    verbose: true,
  },
};

Option 2: JSON Configuration

Create .aurorarc or aurora.config.json:

{
  "outputDir": "./src",
  "modulesDir": "modules",
  "options": {
    "overwrite": false,
    "verbose": true
  }
}

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | outputDir | string | "./src" | Output directory for modules | | modulesDir | string | "modules" | Modules directory name | | modulesPath | string | null | Full path override (if set, overrides outputDir and modulesDir) | | options.overwrite | boolean | false | Overwrite existing files | | options.verbose | boolean | true | Verbose output |

Example: If you set outputDir: './app' and modulesDir: 'features', modules will be generated in ./app/features/your-module/.

Without configuration, modules are generated in ./src/modules/ by default.

📂 What Gets Generated

For a resource called "Product", the generator creates:

src/modules/product/
├── 📁 interfaces/
│   ├── Product.ts              # Main interface
│   ├── ProductCreate.ts        # Creation DTO
│   ├── ProductUpdate.ts        # Update DTO
│   ├── ProductListFilter.ts    # List filters
│   ├── ProductStore.ts         # Store state interface
│   └── index.ts                # Barrel export
│
├── 📁 models/
│   └── Product.model.ts        # Model class with constructor
│
├── 📁 routes/
│   ├── product.routes.base.ts  # Base route configuration
│   ├── product.routes.list.ts  # List route
│   ├── product.routes.create.ts
│   ├── product.routes.update.ts
│   ├── product.routes.delete.ts
│   ├── product.routes.find.ts
│   └── product.routes.navigation.ts
│
├── 📁 store/
│   ├── product.actions.ts      # Pinia actions
│   └── product.store.ts        # Pinia store
│
├── 📁 composables/
│   ├── use_product_actions.ts  # CRUD composable
│   └── use_product_filters.ts  # Filters composable
│
├── 📁 views/
│   ├── ProductList.vue         # List view with filters
│   ├── ProductAdd.vue          # Create view
│   └── ProductEdit.vue         # Edit view
│
└── 📁 components/
    ├── ProductForm.vue          # Reusable form
    ├── ProductFormDialog.vue    # Dialog wrapper
    ├── ProductDetailDialog.vue  # Details dialog
    ├── ProductFiltersForm.vue   # Filters form
    └── ProductSelector.vue      # Selector component (8+ variants)

Total: 28+ files with ~3000+ lines of production-ready code!

🎯 Real-World Example

# 1. Create a YAML spec
cat > customer.yaml << EOF
resource: Customer
description: Customer management module

attributes:
  - name: firstName
    type: string
    required: true
  - name: lastName
    type: string
    required: true
  - name: email
    type: string
    required: true
  - name: phone
    type: string
    required: false
  - name: is_active
    type: boolean
    required: true

actions:
  - name: getAll
    route: list
    method: GET
  - name: create
    route: create
    method: POST
  - name: updateOne
    route: update
    method: PUT
  - name: delete
    route: delete
    method: DELETE
EOF

# 2. Generate the module
generate vue module customer.yaml

# 3. Module ready to use! 🎉

🔧 Advanced Features

Custom Actions

Add custom actions to existing modules:

# Add a custom "approve" action
generate vue module --add-action Product approve

Dry Run Mode

Preview what will be generated without writing files:

generate vue module --dry-run product.yaml

Module Deletion

Remove a module and clean up imports:

delete-module vue Product

📚 Documentation

🛠️ Requirements

  • Node.js >= 18.0.0
  • npm >= 9.0.0

🎨 Supported Frameworks

| Framework | Status | Version | |-----------|--------|---------| | Vue 3 + Pinia | ✅ Available | 1.0.0 | | React + Redux | 🚧 Coming Soon | - | | Angular + NgRx | 🚧 Coming Soon | - |

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details.

# Clone the repository
git clone https://github.com/florianogomez/aurora-module-generator.git
cd aurora-module-generator

# Install dependencies
npm install

# Run tests
npm test

# Test locally
npm link
generate vue module --interactive

📄 License

MIT © Adébayo Floriano Davidio Sergio Gomez

See LICENSE for more information.

🙏 Acknowledgments

Built with:

📧 Support

⭐ Show Your Support

If this project helped you, please give it a ⭐️!