Skip to content

Adapters and fake mode

Haden depends on a handful of outside systems: Constant Contact for marketing, Resend for email, Claude for the Gmail agent, QuickBooks for billing, Zoom for virtual sessions. Each one is slow to connect, has its own account and its own paperwork, and would normally block the build until it was in hand.

Instead, the system wraps each outside system in a small internal interface called an adapter. Every adapter has two implementations: a fake one, which uses fixtures or an internal queue, and a live one, which calls the real service. Which one runs is controlled by one environment variable per adapter.

Fake mode is the default. The whole platform — applications, payments, portal, Zoom imports, Gmail drafts — works end-to-end without a single live credential. This is how the office walks a demo, and how the client walks their client.

System Live when What the fake does today Flip it live with
Marketing Constant Contact granted API access Writes every tag change to marketing_sync_queue; a hidden Marketing export page downloads it as a CSV for import MARKETING_ADAPTER=constant_contact
Email Resend account connected Writes every system email to a message_log table so you can see exactly what was sent and to whom EMAIL_ADAPTER=resend
AI (Gmail agent) Anthropic key set Uses a deterministic keyword classifier and template-based drafts AI_ADAPTER=anthropic
Gmail intake Gmail workspace granted push access Lets you fire fixture emails from the Demo page GMAIL_ADAPTER=gmail
Billing QuickBooks Online connected Keeps a plausible invoice ledger in memory; Mark deposit paid fires the live trigger BILLING_ADAPTER=quickbooks
Video Zoom API connected Keeps fixture participant reports; one Import Zoom attendance run per cohort VIDEO_ADAPTER=zoom

Each adapter’s current mode is visible on System Health.

Three things.

One: the system is honest about where it stands. Each page says plainly when it is driven by a fake. The Inbox says “Trigger one from the Demo page” when there are no threads yet. The Marketing export page explains the manual CSV step. The Dashboard reads real numbers from real rows — just that those rows were written by the fake adapter.

Two: switching to a live integration is a one-line change. Nothing in the app code imports a real SDK directly — everything goes through the adapter interface. The day Constant Contact grants API access, the office sets MARKETING_ADAPTER=constant_contact and the pending queue drains automatically. No UI change, no re-training.

Three: the client walkthrough is self-contained. The whole arc — inquiry → applicant → student → alumni — can be demonstrated on Demo in ten minutes, in a fresh browser, with no outside logins.

Next: Coming later.