Actions
9 actions, callable from the panel, the command palette and the API as
POST /api/v1/a/<id>. Internal actions used between modules are not listed.
| Action | What it does | Risk | Preview |
|---|---|---|---|
domains.app_domain.status | Check the app domain (read) | low | No dry run |
domains.app_domain.apply | Apply the app domain | medium | |
domains.app_address.suggest | Suggest an app address (read) | low | No dry run |
domains.app_address.claim | Claim an app address | low | |
domains.create | Add a domain | low | |
domains.list | List domains (read) | low | No dry run |
domains.get | Get a domain (read) | low | No dry run |
domains.verify | Check domain ownership | low | No dry run |
domains.delete | Remove a domain | high |
Permissions and limits
Permissions
domains.manageAdd and remove domainsdomains.viewView domains
Plan limits
domains.countDomains (incl. addon and parked)domains.subdomainsSubdomains
Engineering notes
Generated from modules/domains/docs.md at build 38156245. These are the notes the engineers keep
next to the code: precise, technical, and honest about what is not done yet.
Owns domain names and who they belong to; web, dns, mail, ssl and cdn reference domains by id and react to
domains.created / domains.deleted through manifest subscriptions (ADR 0011 §3).
Patterns on top of modules/accounts (copy these):
- Dry run:
domains.createanddomains.deletedeclaredry_run: true; whenc.DryRunthe handler validates everything, changes nothing and returns amodule.Plan(POST /api/v1/a/domains.create?dry_run=1). - Inverse:
domains.createdeclaresinverse: domains.deletefor the change timeline / assistant rollback. - Resources + scoped grants:
resources: [{kind: domain}]; sub-users see/manage only domains granted to them (c.Can("domains.view", "domain", id)). - Durable subscription:
subscriptions: [{event: accounts.deleted, action: domains.on_account_deleted}]; the action isinternal: true(hidden from the API) and idempotent (a redelivery finds nothing left). - Cross-module checks: a reseller's access to an account is checked by calling
accounts.get(which applies the subtree rule) instead of duplicating it. - Names are normalised with IDNA (UTS-46) -> stored as lower-case punycode, shown as Unicode.
Verified in the lab (2026-10-09): dry run returns a plan and creates nothing; Bücher.lab.test stored as
xn--bcher-kva.lab.test; invalid label rejected; internal action -> 404 from the API; deleting the account removed
its domain via the event within seconds.
Next: UI; per-plan auto-provisioning (website + zone + mail domain on create) lives in those modules' subscriptions.
App domain
The administrator may set one server-wide app_domain (for example apps.example.com). Create screens ask
domains.app_address.suggest for a DNS-safe, unique label. domains.app_address.claim accepts exactly one label
below that root, refuses server-reserved names, assigns it to one hosting account, and marks it verified because the
administrator verified the root once.
List fields (dom-c)
domains.list rows carry project ({id, name} of the domain's own project, never its parent's, or null) and runs (php, static, app, stack, proxy or null), read in two batch calls for the whole page. Pass bare: true (implied by name and under) to skip them.
The Domains list is a tree
Each domain is one row with its subdomains under it (a count such as "6 subdomains" and an expand button; what is open
is remembered for the browser session). Subdomains are never top-level rows, and a search or the Subdomains / Needs
attention filter opens the parents of what it finds. Every row shows its own project (or "No project") and what runs
on it, never its parent's. The expanded row moves the name to another project (projects.remove then projects.add,
each with its preview) and links to its site or to "Set it up". The rules are in ui/src/tree.ts.
Adding from the Domains page (UX round dom-b)
"Add domain", a domain's "Add subdomain" and "Set it up" open the one add sheet over this page (@rc/sdk-ui/add-flow, see
modules/web/docs.md "Adding a site by its address"): type the name, choose what runs there (or Nothing yet) and the project,
one preview, one job (web.sites.add). The kinds "Redirect only" and "Main" are no longer offered there (domains.create still
takes them).