Export and self-host

Your app is yours. Its source is plain TypeScript, React and SQL files you can pull into your own repository at any time, its data comes out as CSV, JSON or a Postgres dump, and the whole platform runs on servers you control, so a client handover or a move never means a rewrite.

When to use it

  • Pull: work in your own editor and git, review changes as pull requests, hand the code to a client.
  • Data export: a copy of your rows, a handover, an analysis elsewhere.
  • Self-host: data that must stay with you, full control of network and upgrades, internal tools inside your network.

Take the code

export APPBRICX_API=https://appbricx.com/api/dev/v1 APPBRICX_TOKEN=apx_pat_…
appbricx pull <project-id> stillwater          # the dev draft, file by file
cd stillwater && git init && git add . && git commit -m "Stillwater"
# … edit in your editor …
appbricx push <project-id> . --check           # type-check, lint, plan; nothing changes
appbricx push <project-id> . --apply           # becomes the next dev version

You get app.config.ts, db/, routes/, components/, server/, workflows/, messages/ and package.json with its lockfile: the same files your agent edits, with versions, diffs and restore on the platform (versions, project_files { "action": "diff" }). Agents and people can work on the same project; a push answers DRAFT_CHANGED when the draft moved under you. Pages import @appbricx/ui, server code @appbricx/server and @appbricx/workflows: they run on an Appbricx platform, yours or ours.

Take the data

data_transfer { "project_id": "…", "action": "export", "env": "prod", "format": "json" }
// every app table as a file with a signed download link (about an hour)

snapshots { "project_id": "…", "action": "create", "env": "prod" }
snapshots { "project_id": "…", "action": "download", "env": "prod", "id": "…" }   // the whole database as a dump

data_transfer { "action": "import" } brings rows in (through the app's rules, or straight into the table), and copy replaces one environment's database with the other's, after a snapshot.

From a JSON app to code

appbricx migrate --to code app.json stillwater-code
# app.config.ts, db/schema and db/access per table, routes, workflows, actions; MIGRATION.md lists what didn't carry over

A converted app is a new project: export the old one's rows and import them, and people sign up again or are invited (their profile rows wait for them by email).

Self-host

The platform is one Go binary, appbricx serve, with Postgres next to it; the published image adds the sandboxed runtime and the browser verify uses. appbricx doctor checks an install. Point your agents and CLI at it: MCP at https://<your host>/mcp, and APPBRICX_API=https://<your host>/dev/v1 for pull and push. The steps, sizes and backups are in the self-host guide.

Gotchas

  • Push replaces the draft with your folder: a file the project has and your folder doesn't is deleted from the draft. Pull first.
  • Commit package-lock.json with package.json: the platform installs exactly the lockfile.
  • Secrets and config values don't travel with the code or the data. Set them again in the new project or install.
  • Sign-in accounts don't move between projects. People sign up again or are invited; their rows wait for them by email.
  • On your own install you own the backups: keep the database dumps and the file store off the machine.

Related