Three tables, an idempotent credit_bid(), a write-absorbing click counter, and the board queries — including the keyset seek predicate worth 769 buffers.
Verified rather than asserted: the schema was applied to Postgres 16
and its behaviour tested (replayed events credit once, two events describing the same
PaymentIntent credit once, money on a removed listing does not put it back on the
board, the rank query agrees with board position for every row). Both TypeScript files
typecheck under strict against the Stripe SDK.
Amount validation, SSRF-aware URL normalisation, and the “must beat #1” check deliberately left out with the reasoning inline.
Raw-body signature verification, event routing, and which HTTP status code to return when.
The list to run through the night before.