Skip to content

Build and run

  • Node and Bun: The protobase command runs on Node 22.12 or later or on Bun, and a bundle runs on both unless it is built for Bun only.
  • Dev server: The admin app and the API on one port, with changes shown without a restart; each project keeps its own port, so its address and bookmarks stay the same.
  • Dev server without jobs: protobase dev --no-jobs runs no jobs and delivers no events, webhooks or pushes, to develop against a hosted app’s database without doing its work twice.
  • UI-only dev server (beta): protobase dev --api <url> serves the app’s UI from the project with the API of an app already running, such as its staging deploy, with no database.
  • Editor types: protobase types gives the editor and tsc the types of the CLI that builds the app, with nothing installed.
  • Project scripts: protobase run runs a seed or a migration script on the CLI’s packages.
  • Migrate command: protobase migrate applies the project’s SQL migrations in one transaction, with nothing installed, and --plan prints the SQL it would apply.
  • Migrations from config: Writes the SQL migrations for what the config turns on, as files of the project.
  • Schema snapshot (beta): protobase.snapshot.json in the project describes the schema its migrations make, so each new migration is the next numbered file and the change shows in review. The sign-in tables are worked out from it without a database, protobase migration check fails CI when the config has a change the migrations lack, and drop takes the newest file back.
  • User and organization commands: Create users, set roles and manage organizations from the terminal.
  • Encryption commands: Report and fix plaintext or old-key values of encrypted fields.
  • One bundle: protobase build writes one folder with everything the app needs, without a database or secrets. It fails on a view that filters, sorts or searches by a field its resource does not allow.
  • Source maps: The bundle and plugins can carry source maps with debug ids, for an error tracker to read browser stack frames.
  • Extensions: A host adds its own widgets, dock assistant tools (assistant/tools.ts) and MCP tools (mcp/tools.ts) to every app it builds.
  • Native packages: npm packages with native add-ons are bundled for Linux.
  • Serve runtime: Runs a bundle, set by environment variables, with a health check, startup checks, jobs and a clean shutdown. PROTOBASE_HOST=127.0.0.1 keeps it to this computer.
  • Host module list: Each release of @protobase/cli carries the modules its runtime supplies to a bundle as @protobase/cli/host-modules.json, for a host to check a bundle’s imports against the version that serves it.
  • Migrations at update time: The bundle carries the project’s migrations, and the runtime applies them in one transaction before the new version serves.
  • Single-file runtime: The runtime as one file, so a host needs only Bun and that file.
  • Separate worker: Jobs and event delivery in their own process.
  • Container images: A runtime image for each release, for amd64 and arm64.
  • Self-hosted image: One image with the app inside that serves, migrates and creates the first admin.
  • Protobase Cloud deploys: A push to the app’s GitHub branch builds it, migrates and checks its database in one transaction, and switches to the new version once it answers its health check.
  • Deploy checks in CI: One step in an app’s GitHub workflow runs the checks a Protobase Cloud deploy runs, the server’s startup checks included, on a fresh Postgres of its own, so a change that would not deploy or start fails before it merges.
  • Mobile apps (beta): Runs an app on iOS and Android, also on your own iPhone, with sign-in, and builds signed store releases from a section in its config. Your app shows its own home-screen icon on iOS and Android, generated from one image you name in your config. It can open on a splash screen of its own, an image on a colour, in light and dark mode.
  • Files from the phone (beta): In the iOS and Android app, Import and file fields open the phone’s file picker, offering Excel, CSV and JSON files from the device and its cloud drives.
  • Mobile releases (in development): The server offers the mobile app a newer copy of its files, signed, and any host that serves bundles can offer the same from the bundle’s files without running its config.
  • Live updates (in development): The Android and iOS app update themselves in the background to the server’s release, downloading only the files that changed, switch to it when they come back after 5 minutes or more away, on the same page, and go back to the files they were built with when a release fails to start.