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

zopio crud-unified [options]

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

zopio zopio crud-unified -m User -f "name:string,email:string,age:number"

Field Types

The following field types are supported:

  • string - Text values
  • number - Numeric values
  • boolean - True/false values
  • date - Date and time values
  • array - Array of values
  • object - Nested object

The crud-unified command combines functionality from several specialized CRUD commands:

crud

Generate basic CRUD operations.

zopio crud -m <model> -f <fields>

crud-schema

Generate database schemas for models.

zopio crud-schema -m <model> -f <fields> -t <type>

crud-ui

Generate UI components for models.

zopio crud-ui -m <model> -f <fields> -fw <framework>

crud-validation

Generate validation schemas for models.

zopio crud-validation -m <model> -f <fields> -l <library>

crud-testing

Generate tests for CRUD operations.

zopio crud-testing -m <model> -f <fields> -t <test-type> -fw <framework>

crud-permissions

Generate permission rules for models.

zopio crud-permissions -m <model> -r <roles>