This kata takes you from a blank repository to a delivery-ready solution. You will learn architecture by shipping increments, defending your boundaries, and proving behavior with tests.
Aquaman sells scheduled bottled-water deliveries to homes, offices, and retail customers. Clients subscribe to a plan, choose delivery days, pause when needed, and expect reliable weekly service. Drivers confirm deliveries, operations teams reschedule misses, and finance needs billing-ready delivery evidence.
Your job is to model that business in a codebase that tells the truth about the domain. If your folders scream infrastructure, you are doing it wrong. If your tests only cover controllers, you are doing it wrong.
Ship a small but defensible product slice, not a pile of endpoints. Every increment must leave the system in a runnable state with passing tests and a documented decision trail.
Top-level folders should expose the Aquaman business: `Subscriptions`, `Deliveries`, `Billing`, `Fleet`, `Customers`.
Domain rules at the center. Application use cases around them. Infrastructure on the outside. Dependencies point inward only.
Unit tests guard rules. Integration tests guard contracts and wiring. Demo only what the tests already prove.
Do not start with `Controllers`, `Services`, `Repositories`. Start with `Subscriptions`, `Deliveries`, `Fleet`, `Billing`, and `Customers`.
Entities, value objects, and business rules must not depend on EF Core, web frameworks, or external SDKs.
The first green tests should prove subscription scheduling and delivery rules without any database or API running.
Only add integration tests once you introduce persistence, background scheduling, or HTTP endpoints that must hold together.
Use C# (.NET) for this kata, with PostgreSQL as the persistence store. Keep the same architectural rules and testing expectations, and do not start coding features until the solution structure communicates the business language clearly.
aquaman/
README.md
docs/
decisions/
src/
Aquaman.Subscriptions/
Domain/
Application/
Infrastructure/
Aquaman.Deliveries/
Domain/
Application/
Infrastructure/
Aquaman.Customers/
Aquaman.Billing/
Aquaman.Fleet/
Aquaman.Host/
tests/
Aquaman.Subscriptions.UnitTests/
Aquaman.Deliveries.UnitTests/
Aquaman.Host.IntegrationTests/Focus on domain language. Implement customers, subscription plans, weekly schedule preferences, pause windows, and activation rules as domain types.
Introduce application services that turn active subscriptions into delivery jobs for a target week.
Add repositories and EF Core/Npgsql PostgreSQL mappings only when the use cases are already proven in unit tests.
Add HTTP endpoints or command handlers for subscriptions, weekly dispatch views, delivery confirmation, missed deliveries, and reschedules.
Your final delivery is not just the code. It is the story of the system, the rules it protects, and the evidence that it works.
A customer chooses a weekly plan, delivery day, quantity, and start date.
Prove: invalid start dates, invalid quantity, and conflicting paused states are rejected.
The system produces delivery jobs for the next week from active subscriptions.
Prove: paused or cancelled subscriptions do not create jobs.
Customers can pause deliveries for holidays or site closures, then resume safely.
Prove: resumed subscriptions only resume after the pause window closes.
Drivers confirm delivered quantity, timestamp, and notes for each job.
Prove: completed jobs cannot be completed twice and missed jobs require a reason.
Operations can reschedule a failed or missed weekly delivery.
Prove: reschedules keep a trace to the original failed job.
Finance can ask for a delivery summary for a subscription period.
Prove: only completed deliveries count toward billing evidence.
© 2026 Engineers-OnCall - All rights reserved.