Commands
crud-unified
Generate complete CRUD functionality for models
crud-unified Command
The crud-unified
command generates complete CRUD (Create, Read, Update, Delete) functionality for models, including database schemas, API endpoints, UI components, validation, and tests.
Usage
Options
-m, --model <model>
- Model name (required)-f, --fields <fields>
- Field definitions in format “name:type:label,age:number:Age” (required)-o, --output <directory>
- Output directory for generated files-db, --database <database>
- Database type (mongodb | postgres | mysql) (default: “mongodb”)-fw, --framework <framework>
- UI framework (react | vue | angular) (default: “react”)--api
- Generate API endpoints only--ui
- Generate UI components only--schema
- Generate database schema only--permissions
- Generate permissions only--validation
- Generate validation schemas only--tests
- Generate tests only--theme, -t <theme>
- UI theme (bootstrap, material) (default: bootstrap)
Examples
Field Types
The following field types are supported:
string
- Text valuesnumber
- Numeric valuesboolean
- True/false valuesdate
- Date and time valuesarray
- Array of valuesobject
- Nested object
Related Commands
The crud-unified
command combines functionality from several specialized CRUD commands:
crud
Generate basic CRUD operations.
crud-schema
Generate database schemas for models.
crud-ui
Generate UI components for models.
crud-validation
Generate validation schemas for models.
crud-testing
Generate tests for CRUD operations.
crud-permissions
Generate permission rules for models.