Skip to content

Core concepts

Comwit Cloud is a project workspace that wraps two systems behind one product API and console: databases (libSQL, reachable at https://db.cloud.comwit.io) and runtime apps (Next/V8 isolate apps). This page defines the handful of terms you’ll meet everywhere else in these docs, so the rest reads smoothly.

You can drive the platform three ways — the web console at https://cloud.comwit.io, the comwit CLI, and the public platform API at https://api.cloud.comwit.io. The CLI and console both call the same platform API, so anything the CLI does, you can do with a raw HTTP call using a token.

A project is the workspace that owns everything else. It groups its databases, apps, and domains, and your access is scoped per project. A project is identified by its project_id, and your token grants access to specific projects.

A database is a libSQL database (powered by Louhi), reachable at https://db.cloud.comwit.io. It is identified by a database_id and has a database_url you connect to.

An app is a deployable runtime application (powered by brrrd), identified by an app_id. You create an app, deploy code to it, set environment variables, roll back, and attach hostnames to it. See Apps overview.

A build is the artifact produced by a single deploy of an app, identified by a build_id. Each deploy produces a new build, and the active build serves traffic. Rolling back means making a previous build the active one again. See Deploy an app.

A runtime app hostname is a hostname attached to one app. There are two flavors, which differ only in who publishes the DNS records:

  • Manual DNS — Comwit returns the DNS records you need, and you publish them yourself at whatever DNS provider hosts that hostname.
  • Automatic DNS — Comwit writes the records for you into a project domain’s Route 53 zone, so there’s nothing for you to publish.

See Custom hostnames.

A project domain is a domain you already own that you’ve onboarded for delegated DNS, so Comwit can manage its Route 53 records. Onboarding a domain is what makes Automatic DNS hostnames possible, and it’s how you manage DNS records through Comwit. See Domains overview and Bring your own domain.

A token is how you authenticate every request to the platform API. A user token looks like cwt_<hex> — a personal access token tied to your user. It can only do what its scopes allow, and it can only touch projects you are a member of. You send it as a bearer token:

Authorization header
Authorization: Bearer cwt_xxx

Get a token with comwit login (device flow) or by creating a personal access token in the console. Full walkthrough in Install the CLI.

Scopes are the permissions attached to a cwt_ token. They decide which actions the token can perform; a request for an out-of-scope action (or a project you’re not a member of) returns 403.

ScopeGrants
project:readList projects you can access
database:readList/inspect project databases
database:writeCreate databases
app:readList/inspect apps, builds, env, domains
app:writeCreate/delete apps, set env, attach hostnames
app:deployDeploy builds, roll back
domain:readList/inspect project domains and DNS records
domain:writeOnboard domains, manage DNS records
domain:purchaseRegistrar purchase