OPEN/REPORTING

Configuration

All backend and frontend environment variables for Open Reporting.

Configuration

Copy the example files before starting:

cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env

Backend (backend/.env)

Core

VariableDefaultDescription
SECRET_KEYRequired. JWT signing secret. Generate with openssl rand -hex 32.
ENVIRONMENTdevelopmentdevelopment, staging, or production.
DATABASE_URLsqlite:///openrep.dbDatabase connection string. SQLite for dev, PostgreSQL for production.

Database

SQLite requires no setup and is the default for local development. For production, use PostgreSQL with pgvector:

DATABASE_URL=postgresql://user:password@localhost:5432/openrep

pgvector is required for semantic search. Without it, search falls back to keyword matching. Install the pgvector extension on your PostgreSQL instance before connecting.

If your PostgreSQL provider gives a pooled connection URL that doesn't support schema setup (e.g. Vercel Postgres), set the direct URL separately:

POSTGRES_URL_NON_POOLING=postgresql://user:password@db.example.com:5432/openrep

CORS

VariableDefaultDescription
CORS_ORIGINShttp://localhost:5173Comma-separated list of allowed frontend origins.
CORS_ORIGIN_REGEXhttps://.*\.vercel\.appRegex for additional origins (e.g. preview deploy URLs).

Storage

Controls where uploaded report HTML files are stored.

VariableDefaultDescription
STORAGE_PROVIDERlocallocal, vercel_blob, or s3.
BLOB_READ_WRITE_TOKENRequired when STORAGE_PROVIDER=vercel_blob.
S3_BUCKET_NAMERequired when STORAGE_PROVIDER=s3.
AWS_ACCESS_KEY_IDAWS credentials for S3.
AWS_SECRET_ACCESS_KEYAWS credentials for S3.
AWS_REGIONus-east-1AWS region.
AWS_ENDPOINT_URL_S3Custom S3-compatible endpoint (e.g. Cloudflare R2, MinIO).

Authentication

VariableDefaultDescription
AUTH_PROVIDERlocallocal (email/password) or google (OAuth).
VITE_FRONTEND_BASE_URLhttp://localhost:5173Frontend URL — used for OAuth redirects.
GOOGLE_CLIENT_IDRequired when AUTH_PROVIDER=google.
GOOGLE_CLIENT_SECRETRequired when AUTH_PROVIDER=google.
GOOGLE_ALLOWED_DOMAINRestrict Google logins to a specific domain (e.g. yourcompany.com). Leave blank to allow any Google account.

Authoring Coach

The authoring coach evaluates report quality before publish.

VariableDefaultDescription
AUTHORING_COACH_MODEenforceenforce — blocks publish when quality check fails. shadow — advisory only, never blocks.

Frontend (frontend/.env)

VariableDefaultDescription
VITE_API_BASE_URLhttp://localhost:8000Backend API base URL. In production, set this to your deployed backend URL.
VITE_FRONTEND_BASE_URLhttp://localhost:5173Public frontend URL. Used for building absolute links.

Production checklist

  • Set a strong random SECRET_KEY
  • Switch DATABASE_URL to PostgreSQL
  • Set CORS_ORIGINS to your frontend domain
  • Set VITE_API_BASE_URL to your deployed backend URL
  • Set STORAGE_PROVIDER to s3 or vercel_blob (local storage won't persist across deploys)
  • Set AUTH_PROVIDER=google and configure OAuth credentials, or keep local and manage users manually

On this page