Skip to content

Architecture

amabledata has no servers to maintain. It is made of two Cloudflare Workers and the Cloudflare storage products they use, all created in your own account. This page explains each piece, what it stores and how a request travels through it.

your Cloudflare account
┌──────────────────────────────────────────────────────────────────┐
│ amable-core (Worker) crm.example.com / workers.dev│
│ dashboard (single-page app) · REST API /api · cron · queues │
│ D1 amable-installation: users, sessions, workspaces, domains │
│ Durable Objects per workspace: TenantDb (CRM), Engine │
│ (automations), MailDb (email); BookingCalendar per calendar; │
│ EditSession per landing page being edited │
│ Queues: email-send, events-rollup, webhooks-out, │
│ form-submissions, esign-seal │
│ R2 amable-files: files, images, archives, backups │
│ │
│ amable-edge (Worker) t.example.com / workers.dev│
│ tracker and event ingest · hosted forms · booking pages · │
│ landing pages · email click/open/unsubscribe links │
│ AnalyticsDO: one analytics database per site │
│ Queue: analytics · Analytics Engine: amable_analytics │
└──────────────────────────────────────────────────────────────────┘

Your team uses the core Worker. Your visitors and contacts only ever reach the edge Worker.

Part What it does
Dashboard The React single-page app, served as static assets. Every document request runs through the Worker first, which adds the security headers (Content Security Policy with nonces) and your language and theme before the first paint.
/api The internal API of the dashboard and the public REST API v2 (/api/v2/...) with its OpenAPI reference.
Signed edge gateway Calls from the edge Worker (hosted forms, booking pages, landing pages, media), authenticated with an HMAC secret shared by the two Workers.
Email endpoints Delivery webhooks of the email provider, and verification of email click, open and unsubscribe tokens.
OAuth callbacks /oauth/google/callback and /oauth/ads/callback.
Queue consumers email-send (sending), webhooks-out (signed outgoing webhooks with retries), form-submissions (submission → contact, automations, connections), esign-seal (sealing of completed signature requests: signed PDF and certificate, one per invocation). The core Worker runs with a CPU limit of 120 seconds per invocation (limits.cpu_ms 120000) for this work.
Cron, every 5 minutes CRM → analytics sync of every workspace, ad spend sync (hourly current day, daily reconciliation), tracking domain checks, webhook log pruning, daily R2 backups, daily update check (self-hosted), marketplace catalog sync.
Part What it does
Tracker and ingest Serves the JavaScript tracker and receives page views, goals, identify calls and payments.
Funnel links Tracking links, redirects and postbacks of funnel traffic sources.
Hosted forms and booking pages Public pages for forms and calendars; data comes from the core through the signed gateway.
Landing pages Server-side rendered published pages on your hostname, with media under /m/* and booking under /b/*.
Email links Click redirects, open pixels and the unsubscribe page of emails.
/health Answers {"ok":true,"worker":"amable-edge"}. Used to verify custom hostnames.
AnalyticsDO One SQLite database per tracked site with visitors, sessions, events, goals, funnels and attribution, plus one site index per workspace.
Storage Product Contents Scope
Installation database D1 amable-installation Users, sessions, workspaces, memberships, invitations, domains, API keys, audit log, installation settings The whole installation
Workspace database Durable Object TenantDb (SQLite) Contacts, companies, deals, tasks, custom fields, saved searches, commerce, forms, reports, the event outbox One per workspace
Email database Durable Object MailDb Templates, messages, suppressions, broadcasts, email settings (time zone) One per workspace
Automation engine Durable Object Engine Automations, runs, schedules, webhook fan-out One per workspace
Booking calendars Durable Object BookingCalendar Availability and bookings of a calendar One per calendar
Editing locks Durable Object EditSession Who is editing a landing page One per page
Web analytics Durable Object AnalyticsDO (edge) Visitors, sessions, events, funnels, ad data One per site
Files R2 amable-files Uploaded files and images, workspace logos, raw analytics archive, backups The whole installation

Because each workspace has its own database, workspaces are isolated by construction: a query in one workspace cannot read another.

  1. Every change in the CRM (a contact created, a tag applied, an order paid) is written to the workspace database together with an event in a transactional outbox, in the same transaction.
  2. The Engine Durable Object drains the outbox to run automations and to fan out signed webhooks to the webhooks-out queue.
  3. The cron job reads the same outbox to push facts to web analytics: visitor ↔ contact links, payments and refunds of CRM orders, subscription lifecycle goals and contact merges.
Who Hostname Worker
Your team (dashboard, API) App hostname, for example crm.example.com amable-core
A website visitor (tracker) Tracking hostname, for example t.example.com, or a site’s tracking domain amable-edge
A contact clicking an email link Tracking hostname amable-edge, which verifies the token with the core
A visitor of a landing or booking page Landing site hostname amable-edge, which loads the page from the core
An integration using the REST API App hostname amable-core

Every installation is identical. Database schema migrations run automatically when the Workers start (the installation database at the first request, each workspace database when its Durable Object starts), so upgrading is a deploy. See Updating.

Every outside dependency sits behind an interface and is selected by configuration, so a self-hosted installation never needs the amabledata cloud:

Capability Cloud (license key) Self-hosted default
Marketing email Provider account provisioned for you Your own provider account
System email Central notify service Your send_email binding (Cloudflare Email Sending)
Email quota Included volume plus prepaid wallet credits Unlimited
Error reporting Fleet monitoring Local logs, or your own HTTPS endpoint
DNS automation Your Cloudflare zone through the API token Your zone through an optional token, or manual records
Google OAuth Central verified app Your own OAuth client
Payments Recorded in the UI or API (no processor inside the installation) Same
Support, assisted access, ideas board Portal and in-app Community on GitHub

There is nothing to configure in this page. To create the architecture above:

Resource Name
Workers amable-core, amable-edge
D1 amable-installation
R2 amable-files
Queues email-send, events-rollup, webhooks-out, form-submissions, esign-seal, analytics
Durable Object classes TenantDb, Engine, MailDb, EditSession, BookingCalendar, AnalyticsDO
Analytics Engine dataset amable_analytics
Cron */5 * * * *
Compatibility date 2026-10-01
  • Rate limits protect sign-in (60 requests per minute per IP, coarse) and API keys (600 requests per minute, coarse), with exact per-account counters in D1.
  • The analytics database of a site keeps raw data for the site’s retention (default 395 days; 0 keeps it forever); older rows are archived to R2.
  • See Configuration reference for every binding.
Symptom Cause Fix
Analytics answers analytics unavailable The edge Worker is missing (core deployed alone) Deploy the edge Worker with the setup script.
Hosted forms, booking or landing pages fail The two Workers do not share the same gateway secret Set the same EDGE_GATEWAY_SECRET on both.
Email links point at the dashboard hostname No edge origin configured Set --edge-origin and redeploy.