Home Tab
Staging · pilot shop planned Dec 21, 2026Membership software for juice bars and other counter shops. Customers join a shop's monthly plan from a QR code on their own phone, then claim their daily drink on a locked-down counter iPad by typing their phone number. Billing runs through each shop's own CardPointe merchant account, so Home Tab never holds card data and members never download an app.


Runs on
Why it is built this way
Tenant isolation lives in Postgres, not in app code. Every table except admins carries a shop_id and a row-level security policy that reads a transaction-local setting. The app can only open the database through three helpers: one shop, all shops, or none. Postgres skips RLS for a table's owner, so a dedicated migration forces it, and the app refuses to start in production as a superuser.
The iPad talks to Route Handlers, not Server Actions. A kiosk sits on one page for days. A Server Action ID minted before a deploy would stop working; stable POST URLs keep working. Each handler checks same-origin, requires the paired-device cookie, caps the body at 2 KB and returns no-store. Admin, owner and join forms still use Server Actions.
One claim per shop-local day stays correct under double taps and two iPads. The member row is locked, then the insert runs against a partial unique index that allows one live claim per member per day. "Today" is computed in the shop's own time zone. Every claim and undo lands in an audit log with the device or staff member as the actor.
Launch does not wait on a payment webhook. For the pilot, CardPointe billing plans run the recurring charges and the operator marks declines by hand in an admin ledger, which pauses the member and texts a card-update link. The weekly manual checklist becomes the spec for automating it later.
Render over Hostinger, on paid tiers on purpose. Hostinger has no Postgres and stops idle Node apps. Render's free tier cannot run pre-deploy commands and has no worker, so the smallest paid sizes were chosen and costed out: about $33 a month for the pilot.
Details worth noticing
- iPad pairing uses a one-time code (three letters from the shop plus four digits, 15 minutes, shown once). Only its SHA-256 hash is stored. Wrong guesses are capped per iPad and overall.
- Staff PINs are scrypt-hashed and unique within a shop. Lockout is counted on the device row, so clearing cookies does not reset it, and it doubles up to an hour.
- Offline handling combines navigator.onLine with real request outcomes in a useSyncExternalStore store. A banner appears, claims are blocked, the typed number is kept, and the heartbeat clears it on recovery.
- The claim chime is Web Audio with no sound file, primed by a silent buffer inside the first tap, because iOS only allows sound after a gesture.
- Members keep the price and drink count they joined on. Savings lines are computed from the menu price and never typed in.
- Seven member states (ready, claimed with undo, already claimed, out of drinks, paused for payment, no photo, cancelled with access until a date) come from pure functions the server also uses, so the screen and the rule cannot drift.
- A phase-2 document lists every deferral with what it needs first: Wallet passes, offline claims, object storage, kitchen tickets on a Star printer.
























