Local development

Backify apps run locally without a cloud deployment. Install Node.js 20+, npm and PostgreSQL 16+. Set BACKIFY_POSTGRES_BIN to the PostgreSQL binary directory if discovery fails. Connected delivery also needs Git and browser approval.

npx @backifydev/cli new my-app --template web
cd my-app
npm install
npm run dev

Templates are web (React/Vite plus backend), api (backend only), and worker (jobs only). npm run dev runs backify dev. Request the actual URL printed by the command before claiming readiness; --port 0 chooses a free port.

The local process starts a private PostgreSQL cluster in .backify/dev/postgres with separate migrate/runtime/inspection roles; applies migrations; starts web and worker roles using the same backify_runtime schema as hosted apps; and runs a local gateway and broker. Web apps run Vite behind that gateway. Server code and SQL changes rebuild/restart the relevant roles.

Configuration and identity

backify.config.ts holds app intent and, after connecting, literal app.id, instructionVersion, agent and instructionFile metadata. Setup reads and updates these values without executing application code.

Put local secrets in .backify/secrets.local.json as { "NAME": "value" }. Keep .backify/ out of Git. Never use production data or credentials. Do not edit applied SQL migrations.

Visit /.backify/auth/login on the local URL to choose a development email, roles and permissions. This test fixture does not verify email or emulate external OAuth. The gateway forwards a signed user token that the backend verifies. Never expose development sign-in in a deployed app.

Storage is local files in .backify/dev/storage; mail is captured in .backify/dev/mail; outbound HTTP honors configured hosts. AI and integrations require a preview. Local emulation does not verify real delivery, provider consent or cloud permissions; never silently fabricate those results.

Checks

npx backify lock
npx backify check

Commit backify.lock.json. check runs available typecheck, lint, test and build scripts and rejects a stale lockfile. Use --lockfile-only if CI already ran the scripts. Verify a representative user flow with the actual running app. See the runtime contract for variables, broker APIs and database roles.