- services/fees.py: the site's engine (shapes matched by the pin), shared cases
- checkout: price_cart(pin=), delivery_areas with kind (+ geometry for shapes),
venue_point in the public menu (postcodes and rules stay on the cloud)
- orders: quote / create take lat / lng; online_orders.lat / lng (Alembic 0007),
sent to the site with the pending orders
- order app: PinMap (Leaflet + OpenStreetMap tiles), 'Pin it on the map' first
when the venue drew areas, the browser's location offered; lat / lng sent
- tests: cloud test_fees (pinned quote and order), order-app logic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan phase 3S, step S.99.
- SiteOut.apps_url (the cloud's PUBLIC_APPS_URL; a Site property, not stored per site).
- Sysadmin site page: the QR menu and online ordering links/QR codes are built from it
(were a hard-coded IP and a "/menu/<site>/order" route that never existed); a note when
PUBLIC_APPS_URL isn't set, and that table codes are printed by the venue.
- Pack README: connect_frontend and /api/menu rows for phase 3S, CL-9 (rate limits are per
process), CL-10 (table QR tokens: hashes only).
- Test: the sysadmin gets the apps address.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- connect_frontend/order-app at /order/{site}: menu per service at that service's prices,
extras, basket (kept per tab), checkout priced by the cloud (fee, area by list or
postcode, minimum), name/phone/address/notes (remembered), as soon as possible or a time
slot, tracking page with steps, lines and totals; en/el; tokens in index.css. Logic in
src/logic.js, unit-tested; built and served by the connect image (npm test in the build).
- services/ordering.py: the venue's services, hours (past midnight), preparation, slot grid,
days ahead, ASAP; takeaway/delivery orders checked (order.service_unavailable,
order.closed, order.time_invalid) and need a phone; GET /api/orders/{site}/slots; the
public menu carries the ordering summary.
- services/ratelimit.py: per-caller limits on quote, order and track (429 rate.limited).
- online_orders.requested_for (0003, unreleased) stored as UTC; every datetime sent with its
offset (the database keeps no zone: a 12:00 Athens slot came back as 12:00 unzoned).
- Tracking returns what was ordered, the totals, the type and the time.
- Tests: test_ordering.py (5), checkout/fees updated; order-app unit (4).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- services/checkout.py: orders and quotes priced from the site's snapshot per sales point
(prices map; older snapshots: digital_price less discount); refused: unavailable or
not sold there, bad quantity/option/type, empty, order.price_changed when the browser's
unit price or total differs. Nothing the browser says about money is stored.
- POST /api/orders/{site}/quote; delivery needs phone + address.
- Fixes: pending orders, menu sync and stats snapshot acted on the site_id given, not the
authenticated site (a site could read another's orders or overwrite its menu/stats).
- Order refs are unique per site (a second site's first order failed); tracking by a
random token GET /api/orders/track/{token}; old /status/{ref} only while unambiguous.
- Alembic 0003: online_orders sales_point, table_label, tracking_token; table rebuilt.
- menu-app: tracking link uses the token, shows the order number; tells the customer when
the menu changed or the order failed.
- Tests: test_checkout.py (6), 0003 data migration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Platform v2 step 1.7 (APPS_PLATFORM D-3, D-20, D-21, D-22, §5.2).
- Alembic replaces create_all + _run_migrations. 0001_cloud_baseline is
exactly the v1 production schema (incl. the dead menu_hours_en/_gr), checked
against a frozen fixture; schema.py refuses an unstamped v1 DB, so prod is
stamped once at cutover (DEPLOYMENT_GUIDE Part 6)
- 0002_v2_licensing: sites.modules (JSON), sites.module_catalog(_at),
plan_presets; existing sites get every module v1 had (KDS unlimited); the
same map is seeded as preset "Everything (v1 sites)"; dead columns dropped
- license token v: 2 with a normalized `modules` map
- heartbeat v2: request {version, local_ip, module_catalog} (catalogue stored
per site); response {license_token, latest_version, waiter_domain,
site_numeric_id} - the unsigned v1 license fields are gone
- sites API: create with a preset, PUT /{id}/modules (validated),
POST /{id}/apply-preset/{preset}; /api/presets CRUD
- sysadmin panel: Licensed modules card per site (built from the reported
catalogue, fallback list), preset picker on register, Presets page
- .dockerignore: local *.db, .env and tests no longer baked into the image
- tests (new): baseline = v1, unstamped refused, stamp+upgrade of a v1 DB,
drift, token v2 shape/signature, module edits, presets; CL-2/CL-7 rules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per-client domains are retired (client-services plan step 9); the field
and column stay for sites not yet migrated (never drop columns).
Documents xenia-api / xenia-admin / registry .bonamin.net.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>