Product Architecture

From QR scan to confirmed order in under 30 seconds.

Castille Concierge is a stateless edge web app fronting a thin orchestration layer. Each room's QR encodes its own URL; the guest never types anything. Orders are paid online, then fanned out to the right operator by category — F&B, Adventure, or Taxi — with a parallel notification to the owner.

Core guest flow

1. Scan
Per-room QR encodes /room/{n}
2. Land
Edge-rendered page (<1.5s LCP)
3. Choose
F&B · Adventure · Taxi
4. Pay
Stripe Checkout (3-D Secure)
5. Route
Category → operator
6. Notify
WhatsApp + Email + screen
Notification routing engine
            ┌──────────────┐
            │ Order paid    │
            └──────┬────────┘
                   │
        ┌──────────┴──────────┐
        │ category dispatcher │
        └──┬────────┬─────────┘
           │        │        │
       ╔═══▼══╗  ╔══▼═══╗ ╔══▼═══╗
       ║ F&B  ║  ║ Adv. ║ ║ Taxi ║
       ╚═══╤══╝  ╚══╤═══╝ ╚══╤═══╝
           │        │        │
   WhatsApp ► +356 9900 2201  2202   2203
   Email    ► owner@castille.mt (always)
   In-app   ► role-scoped dashboard
F&B kitchen
+356 9900 2201
Adventure desk
+356 9900 2202
Taxi dispatch
+356 9900 2203
Availability rules
F&B
Order window 10:00 — 04:00. Outside hours: menu browseable, checkout disabled with polite notice.
Adventure
24/7. Subject to weather hold on water activities.
Taxi
24/7. 30-second double-tap block after order placement.

Technology & data

Edge runtime
Cloudflare Workers, sub-30ms cold start, deployed to EU-South-1.
Orchestration
TanStack Start server fns; idempotent webhook handlers.
Data
Postgres + RLS. Orders, rooms, menu, audit log.
Payments
Stripe Checkout (Malta-compatible, SCA-ready).
WhatsApp
Meta Cloud API templates; per-category number routing.
Email
Postmark transactional with retries + DKIM/SPF.
Security
TLS 1.3, signed webhooks, scoped session cookies.
Performance
P95 page load 1.2s on hotel Wi-Fi; image LQIP.

Order state machine

  draft ─► pending ─► preparing ─► out_for_delivery ─► completed
              │             │                │
              └────► cancelled ◄─────────────┘   (refund issued via Stripe)
draft
pending
preparing
out for delivery
completed

© Castille Concierge — architecture v1.2. Designed for an 86-room property with multilingual roadmap (IT, FR).