Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Quickstart

You need Docker, and the reactor CLI built from v2/. Commands below assume the working directory is v2/.

Terminal window
docker compose -f deploy/compose/compose.yaml build keys
docker compose -f deploy/compose/compose.yaml up -d

build keys builds the app image and generates the signing key. Do not leave the keys service running; Compose runs it once and it exits. The app listens on http://127.0.0.1:18000. A second replica listens on 18001.

GET /health answers when Postgres and the blob store are reachable.

Open http://127.0.0.1:18000/console. The first screen asks for a cluster name and the first operator. That operator is a platform admin. There is no public signup after that.

From the CLI, the same first step is:

Terminal window
reactor setup --url http://127.0.0.1:18000 --cluster local --email you@example.com --name "Ada Lovelace"

The password is prompted, or pass --password, or set REACTOR_PASSWORD. The session is stored in ~/.config/reactor/credentials.json. REACTOR_HOME overrides that directory.

Terminal window
reactor projects create todos --link

The command prints the project ref, the anon key, and the service key once. --link writes reactor.toml and .reactor/service_key in the current directory. Keep .reactor/ out of git. The anon key is what clients embed. The service key deploys.

reactor.toml looks like this:

url = "http://127.0.0.1:18000"
ref = "yourprojectref"

The todos example is v2/examples/todos. From that directory, after linking:

Terminal window
reactor deploy

Deploy applies sql/project/ to this project, uploads each directory under functions/ as a zip, and uploads site/ as a deployment that goes live only when every file succeeds.

The site is then at:

http://{ref}.apps.localhost:18000/

Signup on that page calls /auth/v1 on the same host with the anon key. Todos are rows in todos. The page also calls POST /fn/v1/ping.

  • Projects for keys, schemas, and a dedicated database.
  • CLI for the rest of the commands.
  • Configuration when you leave the Compose defaults.