Chapter 10: What Comes Next
We have built a working bookstore with aggregates, value objects, entities, commands, events, projections, a real database, and tests. Here is where to go from here.
Application Services
Coordinate use cases from an API layer with synchronous request-response. See Application Services.
Domain Services
Orchestrate business logic that spans multiple aggregates — like checking inventory before fulfilling an order. See Domain Services.
Async Processing and the Server
Run event handlers and command handlers in a background process using message brokers. See the Server guide.
Event Sourcing
Store events instead of state for full audit trails and temporal queries. See the Event Sourcing pathway.
Multiple Databases
Use PostgreSQL for aggregates and Elasticsearch for projections — configured per element. See Configuration.
Subscribers
Process messages from external systems using the anti-corruption layer pattern. See Subscribers.
API Endpoints
Expose your domain through FastAPI endpoints that translate HTTP requests into commands. See FastAPI Integration.
Continue Learning
- Guides — deep dives into each concept
- Architecture — DDD, CQRS, and Event Sourcing theory
- Adapters — database, broker, cache, and event store adapters
- Patterns — aggregate sizing, idempotent handlers, validation layering, and more
- CLI — all command-line tools