Build Your Own Code Generator
Learn how to build your own code generator from Event Models in 8 days. Each day should take you only 10-15 minutes. You'll learn invaluable lessons that took years to master.
8-Day Course
Day 1: Setup
Set the stage for the course. Clone the repository, install the Miro Toolkit, and prepare your environment.
Day 2: Event Modeling Basics
Learn the basics of Event Modeling and play around with your first generated prototype.
Day 3: JSON Structure
Analyze the JSON structure that serves as the basis for code generation and learn how to export from Miro.
Day 4: First Generation
Start your first code generation and generate an event directly from the Event Model in Miro.
Day 5: Custom Generators
Implement your first custom code generator fragments and generate Events and Commands.
Day 6: Command Handlers
Generate command handlers from your Event Model configuration.
Day 7: Result Events
Generate resulting Events and complete your command handler implementation.
Day 8: Putting It to Work
Put your generated code to work and implement projections for Read Models.
What You’ll Learn
Through this course, you’ll master:
- Setting up the Event Modeling toolkit and code generator environment
- Understanding the JSON structure exported from Event Models
- Creating custom code generator templates
- Generating Events, Commands, and Command Handlers automatically
- Working with dependencies between model elements
- Building projections and read models from generated code
- Iterating on your code generator to fit your needs
Prerequisites
To follow along with this course, you’ll need:
- Git installed on your machine
- Docker (for running the code generator)
- A Miro account
- Basic knowledge of TypeScript/JavaScript
- An IDE or code editor (VS Code or IntelliJ recommended)
Resources
- Git Repository: https://github.com/dilgerma/eventsourced-quiz
- Miro Toolkit: Event Modeling Toolkit
- Book: “Understanding Eventsourcing”
- Course: Implementing Eventsourcing (includes full license for the Miro Toolkit)
Next Steps
Start with Day 1: Setup to begin your journey building your own code generator.