Case study
ReStocky
The Juilliard Store's purchasing and receiving system
Since August 2026, The Juilliard Store's purchase orders, shipments, and receiving have run through ReStocky. It covers 37,000 SKUs and 100+ vendor accounts, and I designed it solo and built it with Claude Code in about six months while working full time as Operations Manager.
At a glance
- Role
- Designed solo and built with Claude Code, alongside my full-time role as Operations Manager
- Timeline
- About six months; live since August 2026
- Scale
- 37,000 SKUs and 100+ vendor accounts
- Stack
- Next.js, Postgres, and the Shopify Admin API, on Vercel
- Used by
- The store's full purchasing and receiving team of nine people, daily
- Size
- Roughly 125,000 lines of TypeScript across 630+ pull requests
The problem
Shopify was retiring the app our purchasing ran on, and the best replacement didn't fit how we work.
Shopify announced it was shutting down Stocky, the purchasing and inventory app our whole operation was built around, and it fell to me to find a replacement. I looked at what was out there, picked Qoblex as the closest fit, and tried it against our real day-to-day workflows. Three gaps stood out:
- No inline editing of retail prices and costs during purchasing.
- No margins shown on purchase orders, and our buying decisions depend on them.
- A lot of retraining for a team with years of Stocky muscle memory.
The decision
Building turned out to be less work overall. I made that case and got sign-off.
Adopt Qoblex
A good product that didn't quite fit how we work. We'd have lived with the compromises for good, and retrained the whole team on top of that.
Build ReStocky
A replacement shaped exactly like the workflows we already had, so the team would have almost nothing to relearn.
What I built
A replacement that keeps Stocky's workflows, with one deliberate change: receiving by shipment.
Stack
- Next.js
- TypeScript
- Postgres
- Shopify Admin API
- Vercel
It's a Next.js and Postgres app built on the Shopify Admin API and deployed on Vercel.
- Access. Every page needs a Shopify staff sign-in, and the shared counter login only reaches the stock lookup. Scheduled jobs and Shopify's updates get in with their own secret keys instead.
- Data and Shopify. ReStocky keeps its own data in Postgres, with a separate sandbox copy alongside it. It syncs the catalog and orders from Shopify and writes stock and costs back, while Shopify pushes product, order, and stock changes as they happen.
- Special orders. The two apps don't talk directly: the Shopify draft order is the handoff. ReStocky reserves PO lines for a customer's draft order and stamps it with the date and PO it went out on, which Special Orders then shows staff.
The one change is what happens to a purchase order when it arrives in pieces:
Before
Every partial delivery had to be logged as its own purchase order. In 2025 that left the store with 1,567 POs on paper, many of them pieces of the same original order.
After
PO numbers never change. Every arrival is a numbered shipment against the original order, and backorders stay on it, so a purchase order is one document for its whole life.
- Statuses. Draft, ordered, partial, received, closed, or cancelled. After every box, an order with units still open reads partial, and it closes only once auto-close is on and the balance is paid.
- Each shipment. The PO number never changes; each box is numbered S1, S2, and so on. A box can be logged as in transit with tracking before it arrives, and receiving it updates Shopify stock, average cost, freight, and reservations at once.
- Short lines. Backordered and missing units go on the list to chase with the supplier. Units that are out of print or unavailable are cancelled from the order. Undoing a receipt puts the box back in transit rather than deleting it.
Under the hood:
- Reorder suggestions that don't mistake a stockout for low demand. Each SKU is routed to the forecasting method that fits how it sells, with out-of-stock periods set aside. No method goes live unless it beats the old baseline on our own sales history. (Syntetos Boylan classification; SES, Croston, SBA, TSB, ADIDA; scored on RMSSE and MASE.)
- Arrival dates staff can plan around. Each supplier's lead time is learned from its own delivery history, so every open order shows an expected date and flags itself when late. (A decayed weighted median with censored observations.)
- Receiving that feeds accounting. Moving-average costs, landed cost with freight, invoice matching, and GL coding all happen as goods arrive, not as a separate step afterward.
- Changes that don't break the store. Every change is tested before it merges, and new features run in a sandbox copy first. More in the next section.
Data security
It holds the store's costs, its suppliers, and a few customer names, so access is narrow by default.
- Signed in through Shopify. Staff log in with their own Shopify account, and only this store is accepted. Shopify's reply is checked for its signature and a one-time code, and the session is a signed, browser-only cookie that lasts a day.
- The counter login sees one screen. The shared counter account reaches the stock lookup and nothing else. The list of what it can reach starts empty, so anything added to ReStocky later is closed to it until someone opens it on purpose.
- Machines prove who they are. Shopify's updates are checked against their signature, and the nightly job carries its own secret, compared in a way that doesn't leak it through timing. If a secret isn't set, the door stays shut.
- The store key is locked. The key that lets ReStocky write to Shopify is encrypted in the database, the key that unlocks it exists only in production, and it is never shown on screen. Database connections are encrypted and check the server they connect to.
- As little customer data as the work needs. A customer's name is kept only on the special-order lines held for them, and an address only on a dropship order going to them. Sales come in as daily totals per item, never who bought what.
- Removing what wasn't worth the risk. A phone scanner I built went unused while showing customer names and costs, so I took it out, along with everything it could reach.
- A record of who did what. Receipts, orders and settings changes are logged with the staff member behind them, and previews of new code run with no database and no keys.
How I made sure it was right
One bad receipt puts the wrong stock and the wrong cost into Shopify. So every check traces back to a rule I defined.
Claude Code wrote the automated tests and runs them. My job was to define what correct means for every receipt, cost, and invoice, and to check it myself in a sandbox copy of the store before anything touched Shopify.
- 110+test suites run on every change
- 5,000+individual checks in those suites
- ~80database changes shipped without losing data
- A sandbox that can't touch the store. A full copy of our catalog where every feature works but nothing is written to Shopify. Each write is logged as simulated instead, so I could see what a receipt would do before it did it.
- Tests on every change. Claude Code wrote tests around the rules I defined for the math that matters (costs, freight, invoices, receiving, forecasting). Every pull request runs them, along with a type check and a full build.
- One rule, tested two ways. Flagging a damaged unit after receiving has to land exactly where flagging it at the dock would. I set that rule, and Claude Code turned it into a test that compares both paths across 1,300+ combinations. It found 156 where they disagreed.
- Real files, not made-up ones. The importer that moved our open orders over from Stocky was built against a real Stocky export, and previews everything before it writes.
A typical bug, start to finish:
The bug
I caught it in the sandbox: a double-clicked Receive button could leave behind an empty invoice, because the invoice was saved a step before the rest of the receipt.
The fix
It now saves the invoice and the receipt together, so a receipt that fails takes its invoice with it.
Working with the team
I didn't need a discovery phase. I'd done these jobs myself.
- Before cutover: I tested ReStocky myself against a sandbox copy of our data, and brought the team in through a couple of meetings.
- At rollout: a walkthrough of the main workflows. It went smoothly because ReStocky kept the shape of the old system: buttons where people expected them, steps in the order they already knew.
- Since launch: I've told staff that any request is fair game, and I keep looking for places the work can be smoother.
What changed
Shopify gave Stocky seven more months. We stayed on ReStocky anyway.
August 2026
The store cuts over to ReStocky, built against Stocky's original August 31 sunset.
Late August 2026
Days before the deadline, Shopify extends Stocky's life to March 2027. The deadline that forced the project is gone, and the old system is still there to fall back on.
Today
The store is still on ReStocky. It stays by choice: it matches how the team already works, shows margins where buying decisions happen, and took almost no retraining.
- ~1,500receiving events a year, the store's full purchasing volume
- 9people on the purchasing and receiving team use it daily
- 100+vendor accounts ordered through it
Designed solo and built with Claude Code in about six months: roughly 125,000 lines of TypeScript across 630+ pull requests. Claude Code wrote the code and the tests. The architecture, the data model, every design decision, and the rules the tests check are mine.
Screens show ReStocky running on demo data.