ReStocky Architecture

ReStocky Architecture An architecture diagram generated by Archify. Store staff · desktop browser · Architecture component Store staff desktop browser Scanner PWA · /m, paired phone · Architecture component Scanner PWA /m, paired phone Staff login gate · middleware.ts · ReStocky on Vercel + Neon · Shopify OAuth Staff login gate middleware.ts Shopify OAuth ReStocky · Next.js 15 pages + API · ReStocky on Vercel + Neon · Vercel ReStocky Next.js 15 pages + API Vercel Cron · daily job · Architecture component Vercel Cron daily job frankfurter · ECB FX rates · Architecture component frankfurter ECB FX rates Shippo · tracking · Architecture component Shippo tracking Neon Postgres · purchasing + sandbox · ReStocky on Vercel + Neon · Neon Neon Postgres purchasing + sandbox Shopify Admin · GraphQL 2026-04 · Shopify store · Shopify Shopify Admin GraphQL 2026-04 Draft orders · tags + custom.* dates · Shopify store Draft orders tags + custom.* dates Special Orders app · own Neon DB + POS · Architecture component Special Orders app own Neon DB + POS HTTPS scan-only scope session cookie SQL Bearer secret on demand GraphQL + webhooks reads, sets custom.ordered writes lifecycle planned API, unwired ReStocky on Vercel + Neon Shopify store Legend Frontend Backend Database Cloud Security External

Access

  • • Every route needs a Shopify staff session
  • • Paired phones held to /m; counter login to lookup
  • • Cron and webhooks bypass the gate by secret or HMAC

Data and Shopify

  • • Own Neon DB: purchasing + purchasing_sandbox
  • • Bulk catalog sync, orders sync, stock and cost writes
  • • Webhooks: products, orders, inventory_levels

Special orders

  • • No direct link: the Shopify draft order is the handoff
  • • ReStocky reserves PO lines to drafts, sets custom.ordered
  • • SO app's ordered/arrived endpoints are built, not yet called