Edge — Cloudflare Worker
One Worker (worker.js) serves the whole domain to avoid Custom-Domain vs
Route conflicts. Config: wrangler.toml (account pinned; assets ./public;
run_worker_first = true). Custom domains are bound in the dashboard, not
declared as [[routes]] (zone permission / silent abort of activation —
documented in wrangler.toml comments).
Routing (high level)
| Area | Modules |
|---|---|
| Static site | public/ via ASSETS binding |
| Billing / session | billing.js, billing-session.js, billing-topup.js, balance-store.js, stripe-client.js, reviewer-billing.js |
| Trial / OAuth | oauth-trial.js, mcp-oauth-authorize.js |
| Graph proxies | graph-agent-proxy.js → App Runner; mcp-proxy.js → /mcp (SSE/chunked, no buffer) |
| Aura HTTP reads | graph-pulse.js, graph-slice.js, graph-neighborhood.js, atlas-api.js, code-library.js |
| Other | feedback.js, correction.js (KV only — never auto-applied to graph), rate-limit.js, turnstile.js, agent-telemetry.js |
KV / Analytics (bindings — ids in wrangler; secrets via wrangler secret put)
| Binding | Purpose |
|---|---|
WAITLIST | Legacy waitlist |
BILLING | Entitlement / prepaid balance |
TRIAL_TOKENS | Short-lived trial bearers (token:<value>, TTL) |
FEEDBACK | Beta feedback |
CODE_LIBRARY_RATE | Code-library abuse caps |
AGENT_TELEMETRY | Analytics Engine dataset syntology_agent_telemetry |
Secret names (values never in git): STRIPE_SECRET_KEY,
STRIPE_WEBHOOK_SECRET, SESSION_SIGNING_KEY, plus Neo4j web password and
GRAPH_API_BASE_URL / internal key as used by proxies (see Worker module
headers and wrangler.toml comments).
Public assets worth knowing
public/llms.txt/llms-full.txt— agent-oriented truthfulness about what is live vs illustrative.public/app/— Atlas (WebGL citation map); largedata/gitignored.- Marketing pages (
demo.html,methodology.html, …): headline numbers often static/illustrative; live widget is graph-pulse (and related).
Deploy notes
wrangler deploy under the Syntology Cloudflare account. Confirm deploy
output shows triggers activated, not only “Uploaded.” Managed robots.txt in
the CF dashboard can override public/robots.txt if enabled.