Loop 001 — Book a free slot without an account, see today's bookings on a phone
2026-11-15 · Clients can now book a free 30-minute slot in three screens with no account, and cancel from a private link. The barber sees today's bookings on a phone.
Why
A booking page for my barber shop. Clients pick a free slot and book it online, no account. I want to see today's bookings on my phone.
This was a test run with the owner unavailable. Every product choice (hours, slot length, one chair, time zone) is assumed and listed in DECISIONS.md for the owner to confirm.
What changed
- Booking in three screens. Pick a day from a 14-day grid (closed and full days are greyed out), pick a free time, type name and phone, then book. No account. That is the promise.
- Only real free times. Opening hours, minimum notice, days ahead and holidays come from
shop.config.json. The server checks again on submit, and SQLite's unique index makes double booking impossible. - Losing a race is painless. If someone takes the time first, the client sees the remaining times as one-tap buttons that keep their name and phone.
- Manage link and calendar file. With no account, the private link (also inside the
.ics) is the way back to view or cancel. Cancel takes two taps and frees the slot at once. - Barber page on the phone. Passcode once, then signed in for 30 days. Today comes first, in time order, with tap-to-call numbers, notes, and booked/cancelled counts (for the two-week no-account test). One tap moves between days; cancelling takes two taps.
- Safe by default. All input is escaped, there are no scripts, there is a strict CSP, the barber's forms are CSRF-checked, failed sign-ins are rate limited, and logs never contain names or phones.
- A bug only a browser could show. The first browser run failed at barber sign-in.
Referrer-Policy: no-referrermakes Chrome sendOrigin: null, which the CSRF check refused. Fixed withsame-originand aSec-Fetch-Sitecheck, plus a test. - A layout fix from the screenshots. "15 Nov16 Nov" overflowed the day cells at 390px. The cells now show the day number, and the month sits in the heading.
Checks
| Command | Result | Notes |
|---|---|---|
npm run format:check | passed | Prettier: all files formatted. |
npm run lint | passed | ESLint with typescript-eslint strict type-checked, 0 warnings. |
npm run typecheck | passed | tsc strict, app and e2e projects. |
npm test | passed | 37/37: slots, time zones and DST, config, store and double booking, sessions, ICS, HTTP flows, simultaneous bookings, CSRF, startup errors. |
npm run test:e2e | passed | 3/3 in Chromium: full client and barber flow submitting every form, no-JavaScript booking and cancel, visible keyboard focus. |
| CI workflow | not_run | No remote; the owner said never push. |
What is left
- The owner confirms or changes the assumed choices: hours, slot length, time zone, shop details, one chair, cancel rule.
- Hosting (HTTPS, persistent disk, daily backup) and a remote so CI runs. Not done because the owner said never deploy or push.
- Next ideas (owner decides): block hours from the phone, add walk-ins, reminders, no-show marking, data retention.
- 7 moderate
npm auditadvisories in the dev-only lint toolchain. - Accessibility is checked by targeted assertions (labels, focus, no JavaScript, 390px), not by an automated axe scan.