▸case-03 We have an e-commerce order system with Order and OrderLine objects. A developer proposed creating OrderRepository and OrderLineRepository interfaces so the database layer can query order lines directly. Refactor this architecture into clean DDD tactical code. | pass→pass | 17,806 | 17,596 | -1% | 1 | 1 | 0% | 3,305 | 3,738 | +13% | 0 | 0 | — |
▸case-04 We are designing a User account system in TypeScript. When a user confirms their email address, the status changes from unverified to active, and we need to trigger external welcome emails and audit logs. How should this state transition be implemented in tactical DDD? | pass→pass | 16,255 | 12,128 | -25% | 1 | 1 | 0% | 2,983 | 2,546 | -15% | 0 | 0 | — |
▸case-01 I have a shopping cart feature in TypeScript where all the logic lives inside a service class, while the Cart and CartItem classes are just plain data containers with getters and setters. Can you help me refactor this codebase into a proper tactical domain-driven design? Please provide the refactored code showing rich domain models, value objects, and repository interfaces, keeping business rules inside the entities. | fail→pass | 22,837 | 22,602 | -1% | 1 | 1 | 0% | 4,663 | 5,120 | +10% | 0 | 0 | — |
▸case-02 In our banking application, monetary amounts are currently stored as raw numbers and string currencies floating across controllers and services. Developers keep adding money without checking currency matching, leading to bugs. Refactor this handling into TypeScript domain code. | pass→pass | 23,340 | 15,962 | -32% | 1 | 1 | 0% | 4,253 | 3,353 | -21% | 0 | 0 | — |
▸case-05 Here is an anemic BankAccount class that only has getter and setter methods for balance. All withdrawal, deposit, and balance validation rules are performed inside an application service class. Refactor this into a behavior-rich domain model in TypeScript. | pass→pass | 17,563 | 17,559 | -0% | 1 | 1 | 0% | 3,199 | 3,978 | +24% | 0 | 0 | — |
▸case-06 Our customer management system stores customer addresses as plain strings directly on the Customer model. Updating an address currently mutates individual string fields on the Customer instance. Refactor this address handling following tactical DDD patterns in TypeScript. | pass→pass | 15,448 | 15,524 | +0% | 1 | 1 | 0% | 3,029 | 3,299 | +9% | 0 | 0 | — |
▸case-07 In our online store, applying a promotional discount code to an order must satisfy several rules: the order must not already be paid, and maximum discount percentage cannot exceed 50%. Refactor the discount application logic currently sitting inside an Express JS controller into proper tactical DDD code. | pass→fail | 16,904 | 13,378 | -21% | 1 | 1 | 0% | 3,233 | 3,016 | -7% | 0 | 0 | — |
▸case-08 When an inventory item's available stock drops below the safety threshold after a reservation, the system must trigger reorder alerts to suppliers. Refactor this stock reservation code from an API handler into a domain model that supports state change notifications. | pass→pass | 16,354 | 13,818 | -16% | 1 | 1 | 0% | 3,060 | 3,220 | +5% | 0 | 0 | — |
▸case-09 A Subscription entity can be canceled by a customer, but only if it is currently in active or past_due status, and not already canceled or terminated. The cancellation must record the effective cancellation timestamp. Refactor this logic into a tactical domain model in TypeScript. | pass→pass | 14,052 | 10,732 | -24% | 1 | 1 | 0% | 2,767 | 2,506 | -9% | 0 | 0 | — |
▸case-10 Our system represents all entity IDs as plain primitive string or number types. This allows developers to accidentally pass a userId into a function expecting an orderId. Show how to fix this type-safety flaw using tactical DDD in TypeScript. | fail→pass | 15,380 | 11,231 | -27% | 1 | 1 | 0% | 2,643 | 2,431 | -8% | 0 | 0 | — |
▸case-11 In a medical booking system, a Patient attempts to schedule an Appointment. An appointment cannot be scheduled in the past, nor can a patient have overlapping active appointments. Once successfully scheduled, external notification services need to be informed. Implement this scheduling behavior using tactical DDD in TypeScript. | fail→pass | 22,696 | 19,540 | -14% | 1 | 1 | 0% | 4,382 | 4,395 | +0% | 0 | 0 | — |
▸case-12 A Course entity has a maximum capacity of students. When a student enrolls, the course must verify that capacity has not been reached and that the student is not already enrolled. Refactor this enrollment logic from an application service into a rich domain model in TypeScript. | pass→pass | 13,931 | 13,611 | -2% | 1 | 1 | 0% | 2,762 | 3,252 | +18% | 0 | 0 | — |
▸case-13 An Invoice aggregate contains multiple LineItem objects. When an invoice is finalized, it locks against further item additions, calculates final tax, and triggers invoice generation for accounting. Write the TypeScript tactical DDD code for the Invoice aggregate and its persistence interface. | pass→pass | 18,755 | 16,238 | -13% | 1 | 1 | 0% | 3,831 | 3,860 | +1% | 0 | 0 | — |
▸case-14 A hotel booking application allows room reservation cancellations. If cancelled within 24 hours of check-in, a fee is charged; otherwise, full refund is issued. The reservation state moves to CANCELED. Refactor this cancellation logic from an HTTP route handler into tactical DDD code. | fail→fail | 16,916 | 13,258 | -22% | 1 | 1 | 0% | 3,320 | 2,859 | -14% | 0 | 0 | — |
▸case-15 A CreditCardPayment aggregate processes authorization requests. If the requested amount exceeds the available credit limit, authorization is declined. If authorized, the payment status changes to AUTHORIZED and an authorization event is generated. Model this domain logic in TypeScript. | pass→pass | 12,941 | 11,385 | -12% | 1 | 1 | 0% | 2,668 | 2,522 | -5% | 0 | 0 | — |
▸case-16 In a project management tool, a Task aggregate can transition between TODO, IN_PROGRESS, and DONE. A task cannot transition to DONE unless all its subtasks are marked complete. Model this state machine and subtask invariant rule using tactical DDD patterns in TypeScript. | pass→pass | 25,413 | 17,750 | -30% | 1 | 1 | 0% | 4,268 | 4,027 | -6% | 0 | 0 | — |
▸case-17 A user registration system handles password updates. Password criteria (minimum 8 characters, at least one digit and uppercase letter) are currently verified inside a Web request validation middleware before updating a plain string on the User class. Refactor this using tactical DDD value objects. | pass→pass | 17,189 | 12,581 | -27% | 1 | 1 | 0% | 3,203 | 2,653 | -17% | 0 | 0 | — |
▸case-18 Transferring funds between two separate Wallet aggregate roots requires deducting from the source wallet and depositing into the target wallet, preserving the invariant that source wallet balance cannot go below zero. Write the aggregate methods and domain logic for this operation. | pass→pass | 17,058 | 17,527 | +3% | 1 | 1 | 0% | 3,191 | 3,847 | +21% | 0 | 0 | — |
▸case-19 A Shipment aggregate tracking physical packages cannot be dispatched if any package in the shipment is missing a tracking number or if the shipment address is unverified. Upon dispatch, the shipment status updates to DISPATCHED. Write the tactical DDD implementation in TypeScript. | fail→pass | 15,969 | 14,824 | -7% | 1 | 1 | 0% | 3,622 | 3,730 | +3% | 0 | 0 | — |
▸case-20 A Vehicle aggregate in a fleet tracking system records mileage. When cumulative mileage exceeds the maintenance interval, the vehicle status automatically flags as MAINTENANCE_REQUIRED. Refactor this logic from a cron worker into the domain model in TypeScript. | pass→pass | 14,487 | 19,098 | +32% | 1 | 1 | 0% | 2,959 | 3,480 | +18% | 0 | 0 | — |
▸case-21 Our company is dividing our monolithic system into separate domain services for Order Management, Inventory, and Customer Billing. We need to define the strategic Bounded Context boundaries and document the Context Map showing how domain models translate between teams. Provide guidance on mapping these context boundaries. | pass→fail | 21,912 | 17,802 | -19% | 1 | 1 | 0% | 3,611 | 3,412 | -6% | 0 | 0 | — |
▸case-22 We need an API specification for our e-commerce checkout endpoints. Can you design the OpenAPI 3.0 YAML schema defining request bodies, response codes, and schemas for POST /api/v1/orders and GET /api/v1/orders/{id}? | pass→pass | 21,411 | 13,264 | -38% | 1 | 1 | 0% | 4,787 | 3,117 | -35% | 0 | 0 | — |
▸case-23 We are architecting a high-throughput order processing service and need to select between Apache Kafka and RabbitMQ for asynchronous messaging, as well as choosing between PostgreSQL and Cassandra for storage. Provide an architecture decision analysis for these infrastructure choices. | pass→pass | 26,835 | 20,870 | -22% | 1 | 1 | 0% | 4,188 | 3,723 | -11% | 0 | 0 | — |