FabricFabricExperiments
Getting started

Quickstart hosted

Run the hosted API and Studio locally against Postgres.

Hosted mode runs the same product shape used in staging: API, Studio, Better Auth, organization-scoped routes, API keys, and Postgres.

Start the API

export DATABASE_URL=postgres://...
export BETTER_AUTH_SECRET=$(node -e "console.log(crypto.randomBytes(32).toString('hex'))")
export MANIFEST_KEY_ENC_KEY_HEX=$(node -e "console.log(crypto.randomBytes(32).toString('hex'))")
export FX_BASE_URL=http://localhost:4000
export FX_TRUSTED_ORIGINS=http://localhost:3000
pnpm --filter @fabricorg/experiments-api dev

Start Studio

In another shell:

export FX_API_BASE_URL=http://localhost:4000
export NEXT_PUBLIC_FX_API_BASE_URL=http://localhost:4000
pnpm --filter @fabricorg/experiments-studio dev

Then open http://localhost:3000, sign up, verify the email link from the API logs, and create an organization.

Create or import experiments

In Studio:

  1. open /app/{orgSlug}/experiments,
  2. click Create experiment to use the no-code authoring form, or
  3. click Import YAML to import existing fx YAML files.

To push from the CLI instead, create an API key in /app/{orgSlug}/settings, then run:

fx push experiments/ \
  --api-url http://localhost:4000 \
  --api-key fx_key_... \
  --tenant <organization-id>

Required services

  • Any standard Postgres-compatible database.
  • Neon is recommended for hosted/serverless staging, but not required.
  • Optional Resend/OAuth env vars for production-like auth emails and social login.

On this page