Chapter 4
Code Generation & Type Sync
The commands that do 80% of the boilerplate so you focus on the actual product.
~26 min total4 lessonsAssignment
By the end of this chapter you'll be able to
- Generate a full resource end-to-end with one command
- Identify each of the 7 files that get generated and why
- Keep TypeScript types in sync with Go models
Lessons
Module: Resources
Module: Keeping types aligned
Chapter assignment
Generate Order + items
Generate an `Order` resource with fields: customerId, total, status. Add an `OrderItem` resource that belongs to Order. Run `grit sync` so the frontend types match. Create one Order from the admin panel.
See success criteriaLesson 1 takes ~5 min.
Start chapterSpot a typo? Have an idea?
Help us improve this chapter. One click opens a GitHub issue with this chapter's URL pre-filled — suggest a clearer wording, report a bug, or request a new lesson. The course keeps improving thanks to learners like you.
Suggest an improvement on GitHub