Inspiration

I run a startup called Stall-In: a marketplace where a mediator pools individual buyers' pre-purchases to unlock bulk-supplier pricing, then resells inventory at a profit-contingent commission (0% on a loss). It's a real product with a real supplier-commitment problem I hadn't fully solved. Kiroween gave me a reason to build a scoped-down, freshly-coded demo of the core mechanic from scratch, using it as a vehicle to actually learn Kiro's full surface rather than just prompting it for code.

What it does

Ball-In lets a user buy into a shared inventory pool for a single product category at a price set by how deep the pool already is (a classic bulk-tier curve: more combined demand, cheaper unit cost). Once holding inventory, a user can list a unit for sale; other users submit offers; the seller accepts or declines. Accepting converts an offer into a sale and runs a profit-contingent fee: the platform takes a cut only if the sale clears above cost, and nothing if it doesn't.

How I built it

Everything here is built inside Kiro using spec-driven development, not freeform prompting:

  • A steering file (.kiro/steering/business-rules.md, inclusion: always) pins the money-in-cents discipline, the bulk-tier pricing formula with its inclusive boundary rule, and the profit-contingent fee derivation, so every later spec inherits the same rules instead of re-deriving them.
  • Each feature (schema + seed, bulk-tier pricing lookup, buy-into-inventory, listings[, offers, fee engine, sales — fill in as completed]) got its own Kiro spec: requirements.md → design.md → tasks.md, reviewed before any code was generated.
  • Implementation followed strict TDD inside Kiro's task runner: write the failing test, confirm the red state, implement, confirm green, commit — for all [N] tasks.
  • Property-based tests (fast-check) back the pricing and fee logic with invariants rather than just example cases: e.g. the selected bulk tier's minimum quantity never exceeds the pool size, and unit cost never increases as the pool grows.

Challenges I faced

  • Supplier-commitment race condition: the real Stall-In faces live competing suppliers, which I couldn't model credibly in three weeks solo. I scoped the demo to one product category with fixed mock-supplier tiers to prove the bulk-buying mechanic without faking a pricing war.
  • A genuine bug Kiro's own TDD loop caught: my design doc had inventory_holdings.quantity CHECK(quantity >= 1), assuming SQLite only enforces CHECK on INSERT. It also fires on UPDATE, which would have broken the exhaustion path (a holding going to exactly 0 units) the moment a test exercised it. The red/green cycle surfaced this before it shipped — not something I'd have caught just reading the schema.
  • [Fill in once offers/fee engine/sale land — the decline-vs-listing-status edge case is a good one: declining an offer must never change the parent listing back to closed, since other offers can still be pending.]

Built With

Share this project:

Updates

Submission history