Projects
The problem each one solves and the decisions that shaped it.
Each project is public, with a live page and a README. Each decision below was written down when it was made, with the options weighed and what the choice cost.
ShelfLens
Ecommerce search
A store's search has to find the right product from a few typed letters, forgive a typo, know that trainers are sneakers, keep its filter counts honest and explain why each result ranked where it did. A search library hides how each of those works, so ShelfLens builds them in the open.
Decisions
- An engine of our own, rather than a libraryTurned down MiniSearch, FlexSearch and Lunr, which hide the matching and cannot explain a score., opens in a new tab
- Flat arrays for the indexIndex memory over a hundred thousand products fell from 979 MB to under 90 MB, at the cost of less idiomatic code., opens in a new tab
- Facets count past their own filterChoosing Red still counts Blue, at the cost of a second pass for each facet a shopper has filtered on., opens in a new tab
- One cache key, defined once, for three layersTurned down a key for each cache, where one that forgets the viewer serves a member's price to every guest., opens in a new tab
The rest are in ShelfLens decision records, opens in a new tab on GitHub.
- TypeScript
- React
- GraphQL
- Vite
inventory-reservations
Backend service
When two checkouts ask for the last unit at the same moment, one has to be told no, and nobody can be sold stock that is not there. The service keeps that true under load and across retried requests, and keeps each merchant's stock apart in a shared database.
Decisions
- A ledger instead of a quantityTurned down a stored quantity, which loses why stock moved and hides a missed or doubled update., opens in a new tab
- Row locking over serializable transactionsOrders for one product wait in line rather than retry, at the cost of a cap on that product's throughput., opens in a new tab
- Idempotency keys: scope, storage and retentionTurned down storing the key before the work, where a crash between the two would refuse every retry forever., opens in a new tab
- Tenancy is enforced twice: in the query, and again by PostgresRow level security catches a query that forgets its merchant, where a database for each merchant would cost a pool and a migration each., opens in a new tab
The rest are in inventory-reservations decision records, opens in a new tab on GitHub.
- TypeScript
- Node.js
- Fastify
- PostgreSQL
design-kit
Design system
Each demo carried its own copy of the same colors, theme script, skip link and footer, so one change had to be made in every repository. The kit holds them once, for the ShelfLens store and this site, and a test holds every color pairing it is meant for to WCAG AA contrast in both themes.
Decisions
- Each color holds both themes in one light-dark()Turned down a dark block for each theme, which every page and container would have to repeat., opens in a new tab
- One theme contract with the portfolio, set before the first paintA theme chosen here holds in a demo from its first frame, at the cost of a contract that works only on this site's own address., opens in a new tab
- The components carry no stylesheet of their ownThey load in plain Node and draw under a strict Content Security Policy, at the cost of a sheet each page has to load itself., opens in a new tab
- The kit's controls ship their behavior as a module a page attaches to their markupOne copy of each control's behavior works on pages with React and without, at the cost of a second script in the browser., opens in a new tab
The rest are in design-kit decision records, opens in a new tab on GitHub.
- TypeScript
- React
- Vite
- Vitest
Game Table Tally
Mobile web app
Friends at a game table keep score with pen and paper, add each round by hand and argue over the rules that change a total, such as a bust in Flip 7 or a doubled score in Skyjo. Game Table Tally knows each game's rules, adds up every round on one phone passed around, and keeps working where there is no signal.
Decisions
- Scoring runs on the phone, and a server only checks itTurned down scoring on a server, where a table with no signal could not keep score at all., opens in a new tab
- Games are saved as they were entered, in IndexedDBTurned down saving the totals beside the rounds, where a corrected rule or an edited round would leave a saved total wrong., opens in a new tab
- Screens load on demandTurned down one script with a budget raised for each new screen, where every page paid for every screen., opens in a new tab
- Every change to how a game scores is a new version of its rule setA version number always means the same rules, at the cost of a saved game keeping its old answer until it is moved to the later version., opens in a new tab
The rest are in Game Table Tally decision records, opens in a new tab on GitHub.
- TypeScript
- React
- Progressive web apps
- Vite
The person behind the decisions
The page on how I lead shows how I run a team around decisions like these. The career history page lists the roles, employers and dates. If you are hiring for a role where that would help, email jasonsdevspace@gmail.com and we can talk about whether I am a good fit.