Preparing your design workspace

Loading the problem and your saved attempt…

Design a Property Listing Service

Model listing ownership, publication state, search attributes, updates, and extensible property details.

For this exercise, assume a property listing service used by hosts and prospective guests.

The core journey is to let a host create and publish a listing; let guests filter active listings by price range and number of rooms, sort by rooms or price, and shortlist listings; and let the owner mark a listing sold so it leaves search.

The following practice constraints complete the reported seed: each listing has one owner, a draft or published state, location, capacity, and price; only published listings with positive price, room count, and capacity plus a nonempty location appear in search; updates use an expected version; shortlist insertion is idempotent, and selling a listing removes it from new search results without deleting existing shortlist history; a new shortlist insertion serializes with mark-sold, so sale-first returns NotFound while shortlist-first preserves that row; reservation inventory, ranking, and payments are outside scope.

Design the object model, responsibilities, focused contracts, state transitions, and important errors. Protect this invariant: only the owner may mutate a listing and only complete published listings are searchable.

Explain how the design reports unauthorized update, stale version, invalid attributes, and incomplete publication. After the design, implement the bounded core behavior requested in the implementation checkpoint.