Scaffold Generator

The scaffold generator creates a complete set of files for a resource with full CRUD operations.

Usage

azu generate scaffold <name> [field:type...] [options]

Options

Option
Description
Default

--api-only

Generate API components

false

--web-only

Generate web components

false

--force

Overwrite existing files

false

Examples

# Basic scaffold
azu generate scaffold User name:string email:string

# Blog post with relationships
azu generate scaffold Post title:string content:text user_id:references published:bool

# API-only scaffold
azu generate scaffold Product name:string price:float64 --api-only

Generated Files

Generated Code

Model

Migration

Endpoint

Request

Page (Response)

Service

Field Types

Type
Crystal Type
Description

string

String

Text field

text

String

Long text field

int32

Int32

32-bit integer

int64

Int64

64-bit integer

float64

Float64

Decimal number

bool

Bool

Boolean value

time

Time

Timestamp

uuid

UUID

UUID field

references

Int64

Foreign key reference

Common Patterns

Blog Post

E-commerce Product

User Management


Next Steps:

Last updated