Generate a complete CRUD scaffold for an entity across all layers
Generates complete CRUD scaffold for an entity across database, API, and admin UI layers.
/plugin marketplace add theinfinityguides/software-assembly-line/plugin install software-assembly-line@software-assembly-line<EntityName> [--fields <SPEC>] [--belongs-to <PARENT>]Generate a complete CRUD scaffold for an entity across all layers: database, API, and admin UI.
/sal:scaffold <EntityName> [--fields <FIELD_SPEC>] [--belongs-to <PARENT>] [--skip <LAYERS>]
# Generate full scaffold with interactive field prompts
/sal:scaffold Subscription
# Generate with field specification
/sal:scaffold Subscription --fields "planId:uuid:required,status:enum(active,cancelled,expired)"
# Generate with relationship
/sal:scaffold Subscription --belongs-to User --belongs-to Plan
# Skip certain layers
/sal:scaffold Subscription --skip web,app
| Argument | Required | Description |
|---|---|---|
EntityName | Yes | PascalCase entity name (e.g., Subscription) |
--fields | No | Field specification (interactive if omitted) |
--belongs-to | No | Parent entity for foreign key relationship |
--skip | No | Layers to skip: db, api, web, app |
fieldName:type[:modifiers]
Types: uuid, string, text, int, float, boolean, timestamp, date, json, enum(val1,val2,...)
Modifiers: required, unique, index, default=value
packages/db)migrations/XXXX_create_{entity}.sqlsrc/schema/{entity}.tssrc/schema/{entity}.relations.tssrc/queries/{entity}.tsmodels/{entity}.tstest/{entity}.test.tspackages/api)src/rpc/{entity}/{entity}.rpc.tssrc/rpc/{entity}/{entity}.schemas.tssrc/rpc/router.tstest/{entity}.test.tspackages/web)src/routes/admin/{entities}/index.tsxsrc/routes/admin/{entities}/$id.tsxsrc/routes/admin/{entities}/new.tsxsrc/routes/admin/{entities}/$id/edit.tsxsrc/lib/atoms/{entity}.ts1. db:schema → Migration file
2. db:model → Schema, relations, queries, types
3. db:test → Database tests
4. api:schema → RPC schemas
5. api:rpc → RPC endpoints
6. api:router → Router registration
7. api:test → API tests
8. web:atoms → State atoms
9. web:pages → Admin CRUD pages
## Scaffold Complete: Subscription
### Files Created (12)
**Database (packages/db)**
- [x] migrations/0043_create_subscriptions.sql
- [x] src/schema/subscription.ts
- [x] src/schema/subscription.relations.ts
- [x] src/queries/subscription.ts
- [x] models/subscription.ts
- [x] test/subscription.test.ts
**API (packages/api)**
- [x] src/rpc/subscription/subscription.schemas.ts
- [x] src/rpc/subscription/subscription.rpc.ts
- [x] test/subscription.test.ts
**Web (packages/web)**
- [x] src/lib/atoms/subscription.ts
- [x] src/routes/admin/subscriptions/...
### Verification
- [x] Migration runs successfully
- [x] Types check
- [x] Tests pass (24 new tests)
@fm/db/models, never duplicated