Skip to content

Environment Variables

Client (.env)

These variables are read by Vite at build time and inlined into the JavaScript bundle. They are publicly visible.

VariableRequiredDefaultDescription
VITE_API_URLYeshttp://localhost:3000Base URL of the NestJS API
VITE_APP_VERSIONNo0.0.0Version string displayed in the UI
VITE_APP_BASE_URLNohttp://localhost:5173Public URL of the client (used for OAuth redirects)

Backend (.env.backend)

Read at runtime by both services/api and services/worker. Never exposed to the browser.

Database

VariableRequiredDefaultDescription
DATABASE_URLYesPostgreSQL connection string
POSTGRES_USERYesttPostgreSQL username (Docker Compose)
POSTGRES_PASSWORDYesPostgreSQL password — change from default in production
POSTGRES_DBYesttPostgreSQL database name

Redis

VariableRequiredDefaultDescription
REDIS_URLYesredis://localhost:6379Redis connection string for BullMQ

Authentication

VariableRequiredDefaultDescription
BETTER_AUTH_SECRETYesSession signing secret. Generate with openssl rand -base64 32. Minimum 32 characters.
BETTER_AUTH_URLYeshttp://localhost:3000Public URL of the API, used for OAuth redirect URIs

Google OAuth

VariableRequiredDescription
GOOGLE_CLIENT_IDFor loginOAuth client ID from Google Cloud Console
GOOGLE_CLIENT_SECRETFor loginOAuth client secret

File Storage

VariableRequiredDefaultDescription
RUSTFS_ENDPOINTYeshttp://localhost:9000S3-compatible storage endpoint
RUSTFS_BUCKETYestt-invoicesBucket for invoice files
RUSTFS_ACCESS_KEYYesminioadminStorage access key
RUSTFS_SECRET_KEYYesminioadminStorage secret key

AI / OCR

VariableRequiredDescription
OPENAI_KEYFor OCROpenAI API key for structured data extraction
GOOGLE_APPLICATION_CREDENTIALSFor OCRPath to GCP service account JSON (Cloud Vision API)

API Server

VariableRequiredDefaultDescription
PORTNo3000Port the NestJS API listens on

Observability (all optional)

VariableDescription
SENTRY_DSNSentry DSN for API + worker error tracking
SENTRY_DSN_FRONTENDSentry DSN for frontend error tracking (returned via /config)

TT Time Tracker — Internal Documentation