DDD in F# Example
Reading through Scott Wlaschin’s excellent Domain Modeling Made Functional, I wanted to make a complete working example (different from the book). The business will be a review submission system.
At the end, we’ll have an end to end system with multiple bounded contexts communicating through events or RPC. We’ll use the Suave Music Store as one bounded context (products), and integrate the review submission context with it. We’ll have a working skeleton that can be cloned and hosted on Azure.
Events
- Review Submitted
- Review Edit Submitted
-
Review Deleted
- Review Flagged
- Review Approved
- Review Denied
- Review Pending
Project Architecture
Context:
- Containers
- Submission HTTP API (web server)
- Submission Persistance
- Music Store (suave)
- Music Store persistance (sql server)
- Components
- Submission library
- HTTP API
We’ll implement the Review Submission bounded context using a Ports & Adapters/Hexagonal/Clean/Onion architecture. Domain in the center, UI and infrastructure depending on the domain.