Appearance
Environment Variables
Client (.env)
These variables are read by Vite at build time and inlined into the JavaScript bundle. They are publicly visible.
| Variable | Required | Default | Description |
|---|---|---|---|
VITE_API_URL | Yes | http://localhost:3000 | Base URL of the NestJS API |
VITE_APP_VERSION | No | 0.0.0 | Version string displayed in the UI |
VITE_APP_BASE_URL | No | http://localhost:5173 | Public 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
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | Yes | — | PostgreSQL connection string |
POSTGRES_USER | Yes | tt | PostgreSQL username (Docker Compose) |
POSTGRES_PASSWORD | Yes | — | PostgreSQL password — change from default in production |
POSTGRES_DB | Yes | tt | PostgreSQL database name |
Redis
| Variable | Required | Default | Description |
|---|---|---|---|
REDIS_URL | Yes | redis://localhost:6379 | Redis connection string for BullMQ |
Authentication
| Variable | Required | Default | Description |
|---|---|---|---|
BETTER_AUTH_SECRET | Yes | — | Session signing secret. Generate with openssl rand -base64 32. Minimum 32 characters. |
BETTER_AUTH_URL | Yes | http://localhost:3000 | Public URL of the API, used for OAuth redirect URIs |
Google OAuth
| Variable | Required | Description |
|---|---|---|
GOOGLE_CLIENT_ID | For login | OAuth client ID from Google Cloud Console |
GOOGLE_CLIENT_SECRET | For login | OAuth client secret |
File Storage
| Variable | Required | Default | Description |
|---|---|---|---|
RUSTFS_ENDPOINT | Yes | http://localhost:9000 | S3-compatible storage endpoint |
RUSTFS_BUCKET | Yes | tt-invoices | Bucket for invoice files |
RUSTFS_ACCESS_KEY | Yes | minioadmin | Storage access key |
RUSTFS_SECRET_KEY | Yes | minioadmin | Storage secret key |
AI / OCR
| Variable | Required | Description |
|---|---|---|
OPENAI_KEY | For OCR | OpenAI API key for structured data extraction |
GOOGLE_APPLICATION_CREDENTIALS | For OCR | Path to GCP service account JSON (Cloud Vision API) |
API Server
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | No | 3000 | Port the NestJS API listens on |
Observability (all optional)
| Variable | Description |
|---|---|
SENTRY_DSN | Sentry DSN for API + worker error tracking |
SENTRY_DSN_FRONTEND | Sentry DSN for frontend error tracking (returned via /config) |