Functional Domain Modelling
summary
Live-coding turns EventStorming output into runnable TypeScript: a recommendation engine that returns an exact three-wine recommendation, models Wine (name, color, grape, year), enforces StarRating as a 1|2|3|4|5 union, and represents on-sale as either StockSale (stock count) or CampaignSale (from/to). Types are branded so a saved profile becomes an UpdatedTasterRatingProfile, preventing the bug where the old profile was used; the app goes live, tests with new tasters reveal the bug, it is fixed, and recommendations then behave as intended.
AI-written summary · about
chapters (10)
- 0:00Introduction and context
- 2:46Mapping the business process
- 5:45Functional domain modeling
- 10:18Modeling wine recommendations
- 17:38Defining rating behavior
- 22:44Profile management logic
- 29:44Data modeling and first test
- 34:20Debugging and type safety
- 39:18Adding revenue streams
- 44:11Conclusion and key takeaways
