Recipe: Bootstrap a Personal Circle
This recipe is the first one — before you build anything inside Triform, you need
the thing everything lives inside: a circle. A
circle is your tenant, your identity, your private database, your git repository, and
your wallet, all at once. This recipe walks the bootstrap: how a personal circle comes
into being, what you get for free the moment it exists, and the first elements you put
in it.
The problem it solves
Most platforms make you assemble a workspace by hand — provision a database, wire up an auth layer, bolt on a secret store, create a repo. In Triform that assembly is one act: the circle. The moment you have one, you already have the isolated schema, the git history, and the wallet, with nothing left to wire. The trick is knowing that a circle is not created the way every other element is — it is bootstrapped through signing in, not through element creation.
Elements
| Element | Role |
|---|---|
circle | The tenant itself — your identity, isolated schema, git repo, and wallet. |
app (or any frontend) | The product-facing face you point the circle at, once you have one. |
api-token | A scoped credential for calling your circle’s operations from outside. |
circle-ref | A pointer to a sub-circle, if you later grow into a tree of circles. |
Flow
- Bootstrap the circle by authenticating — not by creating an element. A circle is
the one type you do not
POSTinto existence like a function or a table; it is minted when an identity first signs in. In a debug/dev environment the shortcut isPOST /api/auth/devwith{ "circle_name": "<name>" }, which auto-creates the circle if it does not exist. The name is the circle’s globally unique slug: 3–32 characters, lowercase letters, numbers, and hyphens, starting with a letter. Choosepersonalas the circle type for an individual (useorganizationalfor a team or company). - You now have a sovereign namespace — for free. The instant the circle exists it
already carries the three things you would otherwise assemble by hand: a dedicated
circle_{uuid}Postgres schema (data never leaks across circles), a git repository for version-controlled element storage, and a wallet holding your credentials, secrets, and AU balance. You provisioned nothing; the circle is all of them. - Confirm what is inside it.
GET /api/{name}returns the circle itself;GET /api/{name}/(note the trailing slash) lists its children. A fresh personal circle lists empty — that empty list is the canvas you are about to fill. - Add your first elements, flat. Everything you build sits flat directly under the
circle — there is no library or folder wrapper. Create an action, a data element, a
view; they compose by lookup and operation dispatch, not by nesting. (When you
genuinely need a separate tenant later — a client, an environment whose data must
never mingle — that is when you reach for a sub-circle, via the circle’s
add_subcircleop, which mints a nestedcircle-ref.) - Give the circle a face (optional). When you have a frontend or
appelement, point the circle at it with the circle’sset_frontendop so the circle has a product-facing entrypoint;unset_frontendclears it. - Reach it from outside (optional). Mint an
api-tokenfor scoped programmatic access, and invite collaborators with the circle’sinvite/membersops if the circle should not stay solo.
What this shows
The circle is the platform’s bottom turtle: it is simultaneously the identity you authenticate as and the boundary your data lives in, so isolation and identity are the same wall. An AI agent that signs in gets its own circle exactly as a human does — because the circle is the user, not a workspace the user owns. Bootstrap one, and every other recipe has somewhere to run.
Next pages
- Circle
- Circle-ref
- Concept: tenancy-airtight
- Concept: identity-and-circles