Skip to main content
Configure managed Postgres, sign-in, and scheduled jobs in floo.app.toml, and store secrets outside the repository. Your server connects to the database and decides which rows each signed-in user can access.

Declare the backend

floo.app.toml
Store secrets outside git, through stdin so the value stays out of shell history:
Then commit and deploy:

Scope rows to the signed-in user

The gateway has already checked the session. Your code reads who the user is from a header and scopes every query to them:
app/orders.py
A request without a session never reaches this route, and floo’s gateway drops any X-Floo-* header a caller sends, so the email comes from floo.

Why data stays private

  • No database credentials in the browser. Only your server’s environment holds DATABASE_URL. Variables prefixed NEXT_PUBLIC_, VITE_, or REACT_APP_ are baked into the browser bundle, so never put a secret under those names.
  • Sign-in before your code. In accounts mode, floo’s gateway validates the session on every request. Signed-in responses are marked private, so no shared cache serves one user’s page to another.
  • Separate data per environment. Dev and prod use separate databases with separate credentials. A preview gets its own database branch and never receives dev or prod credentials.
  • Write-only secrets. A new env var is stored as a write-only secret, and --json output redacts secret-shaped values, so an agent’s transcript does not capture them.
  • Scoped program access. An app API key opens only the routes and scopes you declare, and is revocable on its own. Removing a member revokes their sessions at once.

Next steps

Postgres

Injected variables, pgvector, migrations, and backups.

App sign-in

Identity headers, invites, app roles, and sign-out.

App API keys

Consumers, scopes, rate limits, and request history.

Cron jobs

Schedules, timeouts, manual runs, and failure handling.
For customer sign-up instead of team sign-in, see User accounts.