Core primitives
Core is the shared site layer every app uses. It is installed with the first app, runs in the site owner’s own Cloudflare® account, and sends nothing to us. This page lists what it gives every app, read from the code (core 0.32.2).
Core comes with every install at no cost, with the free apps: what is free.
One admin for every app, at a private address on the site itself. The default is /site-admin; the installer writes the path into the site’s config, so each site can pick its own.
<admin path>/api/status: the site’s identity (domain, admin path, installed app versions), signed in.<admin path>/api/self-test: every app’s self-test.<admin path>/mcp: the agent connection.
Each app adds its own pages to this admin. Every create and edit form also has a JSON endpoint, so an agent can do what the screen does.
Agent connection
Section titled “Agent connection”An MCP server inside the admin, free with every install. Core gives it 8 tools of its own (site tools) and each app adds more (apps). How it works: the agent connection.
Spend Guard
Section titled “Spend Guard”Limits on what the apps may use of the site’s D1 database, counted in the units Cloudflare bills: rows written and rows read. Every query from core and from every app goes through it.
Starting limits by Cloudflare plan (the owner can change them):
| Plan | Rows written a day | Rows written a month | Rows read a day | Rows read a month |
|---|---|---|---|---|
| Workers Free | 50,000 | 1,500,000 | 2,500,000 | 75,000,000 |
| Workers Paid | 100,000 | 3,000,000 | 10,000,000 | 300,000,000 |
At a limit, logging pauses first (counters, events, 404 logs). Writes the owner can’t lose, such as a form submission, carry on up to a higher safety limit: on Workers Free 80,000 rows a day. The owner can choose to stop everything at the limits instead.
One request can never use more than this, whatever the daily limits are:
| Kind of work | Rows written | Rows read |
|---|---|---|
| A visitor’s request | 200 | 50,000 |
| A request that has not reached an app yet | 20 | 2,000 |
| An admin request | 20,000 | 5,000,000 |
| One run of a background job | 5,000 | 1,000,000 |
| Clean-up work | 10,000 | 1,000,000 |
| Setting up tables | 100,000 | 1,000,000 |
An agent reads and changes the limits with Site Health’s health_spend_get and health_spend_save.
Events
Section titled “Events”Apps never import each other. They talk through core, in three ways.
Core events go from one app to the others on the server. Install order does not matter, and removing an app never breaks another.
| Event | Sent by | Listened to by |
|---|---|---|
forms.submitted |
Core’s form engine, for any form | Social Proof |
reviews.submitted |
Reviews | no app |
reviews.approved |
Reviews | no app |
waitlist.joined |
Waitlist | no app |
The shared event stream (the site_events table) records what happened on the site, with no personal data, so apps can read it later.
The browser event site-event says what a visitor just did, in the same words whichever app handled it. Any script on the page can listen:
document.addEventListener("site-event", (e) => console.log(e.detail));// { name: "form_submit", params: { form: "contact", via: "embed" }, eventId: "sub-42" }| Name | Meaning | Params | Comes from |
|---|---|---|---|
form_submit |
Form sent | form, via |
any form from the form engine (Forms, embeds, placed forms) |
signup |
Signup | method, form, popup, variant |
a newsletter-style form, or a form inside a popup |
waitlist_join |
Waitlist joined | list |
a waitlist form |
review_submit |
Review sent | subject, rating |
a review form (never the review text) |
popup_conversion |
Popup action | popup, variant, kind |
a popup button, copied code or download (popup signups arrive as signup) |
affiliate_click |
Affiliate click | slug, group, host |
a click on a /go/ link |
countdown_end |
Timer ended | countdown |
a countdown timer reaching zero on the page |
Params never carry personal data: no emails, names, phones or free text.
Forms engine
Section titled “Forms engine”One form engine in core handles every form on the site: the fields, the submission, spam checks, and where a form is placed. Forms, Popups, Social Proof and Waitlist use it, so a form made for one works in the others.
Contacts
Section titled “Contacts”One contact per email address, in the site_contacts table: the name, the app it first came from, consent, and when it was last seen. The form engine adds or updates the contact when a submission carries an email, so every app that takes signups shares one list.
Consent
Section titled “Consent”Every app obeys one consent state. On the server an app asks ctx.consent(category); in the browser window.siteConsent. Without Cookie Consent installed, consent is not required and nothing is added to pages.
| Category | Label | What it covers |
|---|---|---|
necessary |
Necessary | Needed for the site to work and to remember your choices here. Always on. |
preferences |
Preferences | Remember things you chose or dismissed, such as a closed pop-up or a timer you’ve already seen, so they don’t repeat. |
analytics |
Analytics | Help the site owner understand how the site is used, for example counting returning visitors and which links get clicked. |
marketing |
Marketing | Used to credit referrals and campaigns and to measure or personalise advertising. |
Every app declares each cookie and storage item it sets, with a category. Apps that set any: Cookie Consent, Countdown Timers, Popups, Social Proof, Tag Manager and Waitlist.
Public parts of an app pick up the host site’s look: the page’s own fonts and colors first, then a brand (name, logo, favicon, font, colors) read from the site at install time. Apps that draw something visitors see and use it: Cookie Consent, Countdown Timers, Forms, Popups, Reviews, Site Health, Social Proof and Waitlist.
Placement
Section titled “Placement”Apps can put a form, a timer or a widget on a page without touching the page’s code. The spots core offers:
| Spot | Where |
|---|---|
main-end |
End of the main content |
main-start |
Start of the main content |
after-h1 |
After the page title |
before-footer |
Just above the footer |
Several apps can use the same spot on one page; core gives each its turn in a single pass over the page.
Self-test
Section titled “Self-test”Every app ships a self-test, and core has its own (database, tables, admin sign-in, the license). A failing check says what is wrong and the fix: a tool call an agent can make as it stands, or a step only the owner can take. Results show on Site Health’s page, at <admin path>/api/self-test and through the site_self_test site tool.
Core’s own tables: site_migrations, site_visitors, site_events, site_contacts, site_settings, site_forms, site_form_submissions, site_countdowns.