- something the website’s code works on itself: likes, stock it counts, scores, a game’s state;
- a quote from your own rates, or “is this day still free?”;
- your CRM reached from code: counting bookings, or adding a row after checking something first;
- a supplier’s or provider’s service called from the website, with a key only SuperIntern holds;
- something that runs on a schedule, or when a row in your CRM changes;
- an API for something else you run, such as your own mobile app.
How to get one
Ask for what you want, in your own words, and SuperIntern’s builder (or Claude, connected to your website) adds the backend for you:“Add a like button to each blog post, and show how many likes it has.” “Let visitors check whether a day is still free before they book.”The backend is part of your website, not a separate service. It lives in your website’s code, is built and checked with every change, and goes online when you publish.
What you approve
Your website’s code can only reach what you approve. When you publish a version that asks for something new, it waits for you, and the website’s page shows the request in plain words before anything changes. For example:- A database of its own, for what the website keeps for itself;
- Adding rows to a table, such as Bookings;
- Counting rows in a table, without seeing them;
- Reading or changing a signed-in customer’s own rows, such as their saved address;
- An outside service, such as
api.example.com, and the key it is sent; - Files customers upload, such as photos for their listing, and whether pictures can show on your website (see Letting Customers Upload Files);
- A schedule, such as a route that runs every hour;
- Changes to a table sent to the website, with the columns it is told.
Your website’s database
A website with a database gets one of its own, separate from your CRM:- You can look through its tables on your website’s Data tab, under Database.
- Changing the website never deletes data: tables and columns are only ever added.
- SuperIntern copies it every day and keeps each copy for 90 days. Claude Code can list the copies, download one or make one now.
- It can also be put back to any minute of the last 30 days. Contact support@superintern.ai if you need that: putting it back loses everything visitors wrote since that time.
- Going back to an earlier version of your website brings back the earlier pages and code, not earlier data.
Signed-in customers
On a website with customer accounts, the backend knows which signed-in customer is asking, so it can show their own bookings or count what is theirs. Favourites, a wishlist or a saved address go in a CRM table where each customer keeps their own rows, not in the website’s database: you gain from seeing them, and no backend is needed (a small script on the page saves a row’s link to a product, which must be public) (see Visitors adding items). SuperIntern vouches for who they are; the website’s code can’t pretend to be someone else.Files customers upload
Customers signed in to your website can send you pictures and PDFs, up to 10 MB each: photos of a home they want listed, a CV with an application. The website’s database keeps only a note of each file; the file itself is checked and kept safely by SuperIntern, and a picture shows on your website only once you approve it. See Letting Customers Upload Files.Outside services and their keys
Your website’s code can call a service outside SuperIntern, such as a supplier’s prices or your mail provider, once you approve that service. If it needs a key, you enter it on your website’s Settings under Keys for outside services. SuperIntern adds it to the website’s calls to that service only: the key never goes into your website’s code, and nobody can read it back, you included. A website can make up to 60 such calls a minute and 5,000 a day.Schedules and CRM changes
A backend can run something on a schedule, from every 15 minutes to once a week, such as fetching a supplier’s prices each morning. It can also be told when a row in one of your tables changes: “a booking was made” can send the customer a confirmation. It is told only the columns you approved, and never anything from People, Companies, Properties or members-only tables.For Claude Code and developers
Never add a backend or a database on your own. Add one only when the owner asks for something that pages, forms, table forms, the chat, the shop and sign-in can’t do. Not to be ready for later, and not because a template or an example has one. A backend is TypeScript in the website’s own repository, run by the website’s own Cloudflare Worker:npx site-kit backend:addadds these files from the site kit’s template, with one example route.- After a change to
src/db/schema.ts,npx site-kit db:generatewrites the migration. Never write one by hand. Migrations only add tables and columns: the command keeps none that removes or renames. @superintern/site-kit/servergives the code:siteApi();siteDatabase(schema);crm(request), the CRM door:create,count,rows,ownRowsandupdateOwn, for the tables and actions the manifest lists and the owner approved;visitorOf(request):{ personId }for a signed-in customer, the one id a route can trust;scheduledRun(request): the platform’s scheduled run, ornull;crmEvent(request): a CRM change, its signature checked.
- Outside services: a plain
fetchto a host listed underservices, with{{secret:NAME}}where the key goes in a header. The owner sets the key (website Settings, orsites secret set NAME). Never ask for it, and never write it into a file. - Schedules and events: each names a route of its own, listed with
POST(src/pages/api/sync.ts, handing the request to the API as the catch-all does). Do the work once perrun.atorevent.id. - Approval: publishing a version that asks for more stops with “waits for approval”. Tell the owner, in plain words, what they will be asked, and let them choose Approve and publish.
npm run checkmust pass before every push.npm run devruns the routes with a local copy of the database (npx site-kit db:local "select …"queries it; put test rows there).SITE_DEV_VISITOR=<a uuid> npm run devruns them as that signed-in customer; the published site never trusts it. The CRM is on the published website only, and answers 503 innpm run dev.- Several rows that change together (a booking and its stock) go in one
db.batch([...])of query builders, with acheckor a foreign key refusing what must not happen, so a refusal undoes all of it. Never putdb.run(sql`…`)in a batch: with a value in it, the batch fails. - The published database’s rows are live data. Look at them with
sites db tables,sites db rows <table>andsites db query "select …". Change them only when the owner asks, withsites db insert,updateordelete(--dry-runfirst).sites db historylists the changes, andsites db undoputs one back. See Working on it yourself. - Any SQL on the site’s own database:
sites db sql "<sql>" --params '[…]'(or@file.sql). Reads, writes andCREATE/ALTER/DROP, several statements at once, all or none, within 30 seconds; it never reaches anything but this site’s database. It is recorded insites db historybut can’t be undone, so read first, useinsert,updateordeletefor a few rows, and put values in--params, never in the SQL. Change the tables insrc/db/schema.tsanddb:generate, not here: SQL that changes them warns that the site’s code doesn’t know about it.sites db schemaprints the SQL that made each table, index and trigger. - Copies:
sites db copy list,sites db copy download [<copy>] --out <file>(SQL that rebuilds the database; the newest unless named) andsites db copy make(once every ten minutes). Take one before a change you can’t undo.
GUIDE.md, in every website at node_modules/@superintern/site-kit/GUIDE.md. See also the Builder Reference and Build with Claude.

