Custom face mapping editor. Built on react-konva with a canvas model that stores annotations as positioned markers tied to a patient ID. Injection markers carry dose, product, and timestamp. The output serializes to Firestore and rehydrates into the editor on reload.
Stripe Connect Standard with Direct Charges. Each clinic onboards its own Stripe account. Patient deposits collected at the booking widget flow to the clinic directly; Callidus takes a 0.1% application fee. Twenty webhook events are handled end-to-end, including customer.subscription.trial_will_end, invoice.payment_action_required (which triggers 3D Secure escalation and emails the owner a hosted invoice URL), and the full checkout → subscription → cancellation flow. Annual pricing blocks promo codes via an explicit ANNUAL_PRICE_IDS allowlist to prevent 100%-off abuse.
Multi-tenant architecture with role helpers. Everything lives under tenants/{tenantId}/… in Firestore. JWT claims carry tenantId and role. All mutations are gated by a !isTenantArchived() guard in the Firestore rules. Access helpers replace inline role checks everywhere — changes to the access matrix ripple consistently instead of drifting.
Embeddable booking widget with widget isolation. Shadow DOM portal, unhashed bundle path, Service Worker scoped only to the widget path, NetworkOnly for Firebase and Stripe to satisfy GDPR, tenant bound by slug via a strict regex. The widget scroll-trap fix lives in a standalone overlay script that works across any host page.
Four-stage subscription lifecycle. Coordinator Cloud Function runs daily at 09:00 UTC and fans out one Cloud Task per trialing tenant. The pipeline is 3-day email → 1-day email → expiry with 3-day grace → suspension. A second scheduled function at 09:30 UTC escalates payment-failed tenants. During grace period, pages viewable but mutations blocked at both route and Firestore rules layers — no single-layer bypass.
Multi-location support. Clinics operating from multiple addresses can manage practitioners, schedules, services, and bookings across all sites from a single tenant. Per-location colour coding and primary-location semantics for billing and reporting.
Supporting systems. Calia AI assistant on Vertex AI via @google/genai SDK with thirteen injection regex patterns, 30/100-per-hour rate limits, and a 90-day GDPR cleanup. Native TOTP MFA, no SMS. Single-session enforcement: log in on device B and device A's session ends. Audit logging with three-tier TTL retention (90 days routine, 1 year financial, 2 years GDPR-sensitive; PATIENT_DATA_ERASED has no expiry). Public booking and consent endpoints guarded by App Check. Sentry in strict GDPR mode: sendDefaultPii: false, Replay masks all text, blocks all media, masks all inputs.