Model & Persist
This section covers how to define your service contract, describe your data model, and choose a storage backend. Use these guides when you are setting up a new resource or deciding how to persist it.
Write a proto definition, run buf generate, and scaffold the service.
Field types, framework fields, constraints, relationships, and secret fields.
GORM vs ent — when to use each.
Grow a scaffolded service: a custom RPC and a second resource, wired through the servicekit module and host.
Author a versioned, reversible migration with de migrate — safe on a large, live database.
Mark fields and calculated sources searchable, choose JIT or INDEXED, and query with q.