Skip to main content

Getting Started

This guide walks through the canonical Zuraffa v5 flow:

  1. zfa entity create
  2. zfa make
  3. zfa build

Installation

Add Zuraffa to your project and install the CLI:

dev_dependencies:
zuraffa: ^5.0.0
zorphy_annotation: ^1.7.0
build_runner: ^2.4.0
dart pub global activate zuraffa

Optional but recommended:

zfa config init

That creates .zfa.json for project defaults.


Quick Start

1. Create an entity

zfa entity create -n Product \
--field id:String \
--field name:String \
--field price:double \
--field description:String?

2. Generate the feature architecture

zfa make Product \
--preset=crud \
--methods=get,getList,create,update,delete \
--with=vpc \
--state \
--di \
--test

3. Build generated code

zfa build

What was generated?

The command above typically produces:

  • Domain: repository contract + use cases
  • Data: datasource + repository implementation
  • Presentation: view/presenter/controller/state
  • Infrastructure: DI and test files

make first, feature second

zfa feature scaffold still exists, but the v5 docs treat it as a wrapper over zfa make --preset=feature rather than the primary workflow.

Prefer make in docs, automation, and AI prompts.


.zfa.json and .zfa/

Use these as the project-memory surfaces:

  • .zfa.json: active defaults such as plugin defaults and entity-first behavior
  • .zfa/: canonical v5 memory for plans, runs, decisions, blueprints, manifests, and context
.zfa/
├── plans/
├── runs/
├── blueprints/
├── decisions/
├── manifests/
└── context.json

Next steps