Skip to content

The price · NabatX · Client build

The number that tells the truth, and who gets to see it.

What it is

NabatX is a marketplace for plants, nurseries, and gardening goods in Saudi Arabia: many sellers, fixed prices and timed auctions, in English and Arabic with the same care in both. I built it from the client's brief. It's now in a protected build that the client is validating before launch.

How every request travels

  1. Screens

    What buyers, sellers, and the marketplace team use.

  2. Typed clients

    The only way a screen can ask for anything.

  3. The API

    One front door for every request.

  4. Server modules

    Where the marketplace's rules live.

Only four files may touch the data, and a test enforces it.

The data

No screen ever reaches the data directly.

Four layers, top to bottom: screens, typed clients, the API, and server modules, with the data under them. Only four files may touch the data, and a test enforces it.

The price view

The brief asked for the middle.

The client asked for a price view built only from completed sales: what a kind of product really sells for. It shows the low, the middle, and the high. Not the average. In a small market, one strange sale drags an average anywhere. The middle holds. Try it.

Try it.

Illustrative prices, in riyals.

100200300400500600700800900LowHighMiddle: 150Average: 148.6

Add the strange sale and watch: the average jumps, the middle barely moves.

Low
120
Middle
150
High
170
Average
148.6

The privacy floor

Who gets to see it.

It's an internal tool for the people who run the marketplace. It's never shown to sellers or buyers. And it stays empty until there are at least five completed sales, so nobody can work backward from a range to a single seller's price.

Completed sales

3

The price view, for this kind of product

Not enough sales yet. Nothing is shown.

Who can see it

  • Marketplace team: yes.
  • Sellers: no.
  • Buyers: no.

It's built for the people who run the marketplace. Sellers and buyers never see it, however many sales there are.

Illustrative prices, in riyals. Step past five and watch the view appear.

The auction rules

An auction that closes once.

The server's clock is the only clock. A bid in the last two minutes adds two more, up to ten extra minutes in total, so nobody wins by refreshing at the right second. Bids are binding. If the winner doesn't pay within a day, the next bidder gets a day to accept. However many times the system retries, an auction resolves exactly once.

The last minutes of one auction

Timed on the server's clock, never the buyer's

Extra time: 10 of 10 minutes. The ten minute cap is reached. The auction ends here.

  • The server's clock decides when it ends.
  • A late bid adds two minutes.
  • Ten extra minutes at most.
  • Every bid is binding.
An auction's final minutes. Each bid in the last two minutes moves the end two minutes later, up to ten extra minutes in total.

The life of one auction

From a first draft to one of three endings.

  1. DraftBeing set up
  2. ScheduledHas its start time
  3. OpenTaking bids
  4. ResolvingSettling, once
  • Won
    Unpaid after a day: offer to the next bidder
  • No sale
  • Cancelled
Every auction ends in exactly one of three places, and gets there once.

Built by an agent, tested by hand

Version zero.

An AI agent built the first version of the marketplace on its own, phase after phase, and every check it ran came back green. I called it version zero.

Then I used it myself, and set seven simulated buyers and sellers loose on it in a browser. Between us we found thirty-nine problems: bids that failed without saying so, a countdown showing 1,299 days, payout math that was wrong, and no Arabic where there had to be Arabic.

Green checks tell you the code agrees with itself. Using it tells you whether it works.

One tile for each finding

  • 1Silent bid failure
  • 21,299 days left
  • 3Wrong payout math
  • 4No Arabic

Found by using it by hand, alongside seven simulated buyers and sellers.

Thirty-nine findings, from using it like a customer.

A screen reader, mid-auction

One announcement at a time.

A buyer using a screen reader would hear ‘Bid accepted. You are the highest bidder,’ and a moment later hear an older price, because a slower refresh arrived after the bid. During an auction the price only ever goes up, so now a lower reading is treated as stale and never announced.

What the buyer hears

  1. “Bid accepted. You are the highest bidder.”Announced
  2. Older price arrives lateIgnored: prices only go up

Price readings during an auction

The accepted bid A lower reading after it: stale
The announcement “Bid accepted. You are the highest bidder” is spoken. An older, lower price that arrives later is ignored.

Most of good product work is choosing the number that tells the truth.