# Eat Activ — Click & Collect + App + Kiosk: plan (draft v0.1, 2026-11-11) > Status: pitch / demo phase. Nothing here is committed with the client yet. > Open questions are marked **[Q]** and collected at the end. ## 1. Goal Replace Storekit with our own ordering platform for Eat Activ's 4 London stores: 1. **Customer web** (click & collect, later maybe delivery) — mobile-first PWA. 2. **Customer mobile app** — same codebase wrapped with Capacitor (iOS + Android). 3. **Kiosk** — in-store self-order on a portrait touchscreen + card terminal. 4. **Admin** — chain-level and store-level back office. 5. **Integrations** — Stream (orders → POS), email, store notification/dispatch, payments. For the pitch we deliver ~5 interactive HTML mockups + a design spec + domain docs. ## 2. What we take from Ordit / Atis (ideas, not code) | Take | Source idea | |---|---| | Restaurant (→ `Location`) entity with opening hours, prep time, temp-close | `Restaurant`, `RestaurantOpeningDay(Interval)`, `inactivatedUntil` | | Menu: category → product → modifier groups → modifiers, nested groups, min/max/each rules | `Meal`/`MealOption`/`MealOptionGroup` (`min/maxQuantity`, `min/maxDifferent`, `min/maxEachQuantity`, `parents`) | | Order lines as a **snapshot tree** (name/price/VAT/allergens copied at order time) | `OrderingItem` parent/children | | Pluggable store dispatch with per-store setting + send log + retries | `RestaurantSoftwareSetting`, `OrderingSoftwareSending` | | Email to store / customer with sent-log | `RestaurantEmailNotification`, `EmailSentLog` | | Device auth for tablets/kiosks (serial + public key signature) | Restaurant tablet / Sunmi login | | Public order tracking token, realtime status | `publicShareToken`, Mercure | What we **drop**: Deliverect, corporate allowances/expense codes, canteens, SSO, company billing, courier dispatch, the two-service-sharing-one-DB architecture. What we **add**: proper audit log, full RBAC permission system (scoped per location), social login (Apple, Google; Facebook optional), kiosk, structured allergens/dietary data, loyalty hook. ## 3. Proposed architecture **[Q: stack sign-off]** ``` apps/ api/ Laravel 12 · PostgreSQL · Redis · Horizon (queues) · Reverb (websockets) client/ Nuxt 4 (Vue 3) — ONE app, three builds: web → SSR/SSG, SEO-friendly store + menu pages app → SPA build wrapped by Capacitor (iOS/Android) kiosk → SPA build, kiosk layout + device activation + idle/attract admin/ Nuxt 4 SPA (or Vue 3 + Vite), back office packages/ ui/ design tokens + shared components (the design spec lives here as code) api-client/ typed client generated from the OpenAPI spec ``` Why this shape: - **One API**, three clients. No shared-DB hacks. - **Web = app**: Capacitor wraps the PWA build; native bits (push, Apple/Google sign-in, Apple Pay sheet) go through Capacitor plugins. Mobile-first UI from day one makes this nearly free. - **Kiosk is a build mode of the client**, exactly the pattern the team already shipped in `atis-frontend` (Nuxt 3 + Capacitor 7, `MODE_KIOSK`). Same product cards / customizer / basket, kiosk layout. - Laravel because the team already runs Laravel + Horizon + Reverb (nova, mv-ticket). Alternative: Symfony + API Platform like ordit-core-api — heavier, no gain for a greenfield. ### Key building blocks - **Auth**: Sanctum (SPA cookie for web/admin, tokens for app/kiosk devices). Socialite: Apple + Google (Apple is mandatory on iOS once any other social login exists). Guest checkout allowed (email + phone). - **Permissions**: roles + granular permissions, **scoped** (global / brand / location). A store manager at Noel can't touch Brewer. Implementation: spatie/laravel-permission with teams = scope, or own tables (see `domain/identity-permissions-audit.md`). - **Audit log**: append-only `audit_events` table, written by a domain-event listener, not model observers only — captures actor, action, subject, before/after diff, IP/device, request id. Admin UI with filters. - **Payments** **[Q]**: Storekit uses **Adyen** today. Adyen covers online (cards, Apple/Google Pay) **and** kiosk terminals (Terminal API) with one contract → strong default. Stripe (+ Terminal) is the fallback. - **Stream** **[Q]**: orders pushed to Stream → POS. **No Stream code exists in Ordit/Atis** (only Deliverect), so this is new work built on Ordit's dispatch-driver pattern. Need API docs/sandbox + decide who owns the menu (see `domain/integrations-and-devices.md`). Storekit products carry POS/PLU ids → POS is master today. - **Dispatch**: per-location channel list (Stream, email, kitchen screen/tablet, printer) with send log and retry. - **Realtime**: Reverb channels per order (customer tracking) and per location (admin live board, kiosk). ## 4. Pitch deliverables 1. `docs/domain/*.md` + `docs/ordit-reference.md` — done (draft). 2. `docs/design-spec.md` — done (draft): tokens, type, motion, components (future-proof, becomes `packages/ui`). 3. ~5 HTML mockups served at https://eatactiv.ds9.bayi.hu/mockups/ **[Q: confirm list]**: | # | Mockup | Surface | |---|---|---| | 1 | Store picker + menu browse (loading choreography, category scroll, sold-out states) | Web/app (mobile-first, desktop responsive) | | 2 | Product customizer → basket → checkout → live order tracking | Web/app | | 3 | Kiosk: attract screen → menu → customize → pay on terminal → order number | Kiosk (portrait 1080×1920) | | 4 | Live operations board (incoming / preparing / ready, store switcher, KPIs) | Admin | | 5 | Menu management (products, modifier groups, availability/snooze per store) + roles & audit log | Admin | Mockups are standalone HTML (GSAP + Flip from CDN, no build step), using the real Eat Activ menu data from `research/menu.json` and real store names. ## 5. Open questions **[Q]** 1. Stack: Laravel 12 API + Nuxt 4 client (web/app/kiosk builds) + Capacitor OK? Or stay on Symfony? 2. Payments: stay with Adyen (recommended) or Stripe? 3. Stream: API docs / contact; is menu mastered in POS (sync from Stream) or in our admin? 4. Delivery: Storekit has delivery on — in scope or pure click & collect? Table service (Storekit `tableNumberRequired`)? 5. Catering stores (separate Storekit stores): in scope as a service type? 6. Loyalty: replace Storekit loyalty (points) or integrate a 3rd party (Atis used **Piggy**)? Big scope item. 7. Kiosk hardware: who supplies (e.g. Elo/Sunmi + Adyen terminal)? Receipt printer? 8. Font: does Eat Activ hold a web/app licence for DK Lemon Yellow Sun?