Inspiration

Checkout is the worst part of shopping, at every size of shop. A queue at the supermarket. A cash tin and a "please pay" sign at the farm stand.

Walk-out stores exist, but they need hundreds of cameras and sensors. Most shops cannot afford that.

I wanted walk-out checkout that starts with the cameras a shop already has, even one old phone, and grows one shelf at a time.

What it does

For the shopper

  • Take what you want from the shelf. A camera sees the shelf change and a vision model works out what left.
  • Pay after: the shelf's screen shows your bill and a PayPal QR. Scan it, fix the bill if the camera got it wrong, pay.
  • Hold first: scan a QR at the door and PayPal holds an amount. Your basket fills on your phone as you shop. Tap Done, or just leave. You are charged for what you took and the rest is released.
  • Put something back and it comes off the bill.

For the shop owner

  • Each shelf has its own camera and product list. The camera can be a phone, a USB webcam, or existing CCTV through a small bridge.
  • The owner chooses the pay mode: pay after, hold first, or let the shopper choose.
  • The hold amount is sized from real spending at that shop: it covers nine in ten baskets of the last 30 days, within the owner's minimum and maximum.
  • The owner's app shows money taken through PayPal, a ledger of where shelf value went, visits with before and after photos, refunds, restocking, a product editor, and a store map with a QR per shelf and for the door.
  • Charts the owner can rearrange, built with AG Studio.
  • A question box answers "what sold best this week?" and looks up the shop's PayPal orders through PayPal's Agent Toolkit.

Fair by design

  • Nobody is identified. With several shoppers in the shop, each phone asks "Shelf 3 saw 1 x Honey leave. Yours?" and the first to claim it gets it.
  • A visit with no payment after ten minutes is "unmatched". It is never an accusation, it stays payable for a day, and the owner can mark it settled another way.

Anyone can try it

  • A live store simulator runs a whole sample store in one click, with real shelf reads.
  • Anyone can start a private trial store with their own products and camera.

How we built it

Stack

  • Next.js 16, React 19 and TypeScript on Vercel, with Neon Postgres.
  • Route handlers are thin. The rules live in tested library code: 591 unit tests.

PayPal

  • Orders v2 through the PayPal Server SDK: create, capture, authorize, capture of an authorization, void and refunds.
  • Every write carries a PayPal-Request-Id and a timeout, so a retry cannot charge twice.
  • PayPal JavaScript SDK v6 for the pay and hold buttons.
  • PayPal Agent Toolkit, read-only, behind the owner's question box.

AI

  • A vision model compares before and after photos, helped by each product's reference photo, a close-up of the changed area and extra camera angles.
  • It returns product ids and counts only. The server prices the bill from the owner's catalogue. The model never sets a price.
  • A language model answers the owner's questions by calling tools that return server-computed facts. An answer containing an amount that is not in the records is rejected.
  • MediaPipe hand and person detection runs on the camera device. It holds the read while a hand is in view and stores only a daily visitor count.

Cameras

  • The browser runs a small block-grid change detector that decides when a shelf changed and went still.
  • A Node bridge runs the same detector on any ffmpeg source: RTSP CCTV, MJPEG, webcam or video file. Only the shelf's rectangle leaves the building.

Design

  • One design system: cobalt palette, Inter and Inter Tight, spring motion.
  • Astryx components for accessible controls, AG Studio for the charts.

Challenges we ran into

  • Deciding when to read a shelf. Phone cameras adjust exposure and flicker, so whole-frame differences either never fired or never stopped. A block grid with the overall brightness shift removed, plus a settle time, fixed it.
  • Who took it, without identifying anyone. The answer was a session per shopper and a claim step when more than one person is in the shop.
  • Money that cannot go wrong quietly. Capture never exceeds the hold. The capture amount is saved before PayPal is asked, so a retry cannot change it. A failure after PayPal moved money is recorded and shown, never reported as "nothing was charged".
  • A shopper must not be able to erase a visit. If the camera saw items and the shopper removes every line, the visit stays in the owner's figures as unmatched and adjusted.
  • A late security review found three serious problems. A public demo login could read shared PayPal records through the question box, a door QR could not be cancelled, and pay routes skipped the hold rules. All three are fixed and written up in docs/security.md.

Accomplishments that we're proud of

  • A whole store runs in one click on the public site, with real vision reads.
  • Measured sample accuracy: 15 of 15 reads on seven composed picture pairs, including a put-back, a slid item and a lighting change.
  • The same server route serves a phone, a webcam and a CCTV bridge.
  • Every limit is written down next to the claim it qualifies.

What we learned

  • PayPal's authorize, partial capture and void fit "pay for what you took" exactly.
  • Idempotency keys have to be stable per operation, not per amount.
  • A vision model is far more accurate when it only has to choose among the few products on one shelf.
  • The model should never touch money: ids and counts in, prices from the server.

What's next for Shopsitter

  • Larger stores. Start with one aisle or a grab-and-go section on the store's existing CCTV, then add shelves.
  • A rectangle editor so one CCTV camera can cover several shelves from the owner's screen.
  • Saved PayPal approvals so regulars scan once and walk out afterwards.
  • Learning from corrected bills per shop, restock suggestions, and several shops per owner.

Honest limits

  • A prototype in the PayPal sandbox. No real money moves.
  • Proven on a small sample store. The design grows shelf by shelf, but a full supermarket (thousands of products, crowds) has not been tried.
  • The sample accuracy is on composed pictures, which are easier than real photos.
  • The hold flow is covered by tests with a stand-in gateway and a real sandbox order creation. The README and docs/security.md hold the full list.

Built With

Share this project:

Updates

Submission history