All environment variables are prefixed with INVOICE_. The .env file should be placed in backend/ and is in .gitignore. A .env.example is committed as a template.
Required
| Variable | Description | Example |
|---|
INVOICE_DB_URL | PostgreSQL connection string | postgres://invoice:invoice@localhost:5433/invoice?sslmode=disable |
INVOICE_CLICKHOUSE_DSN | ClickHouse HTTPS connection | https://default:[email protected]:443/default |
INVOICE_JWT_SECRET | Secret key for signing JWT tokens | Random 32+ character string |
PDF Generation
| Variable | Description | Default |
|---|
INVOICE_PDF_CONVERTER_URL | Gotenberg endpoint | https://convert.prxm.uz |
INVOICE_PDF_CONVERTER_TIMEOUT | PDF generation timeout | 30s |
Server
| Variable | Description | Default |
|---|
INVOICE_SERVER_PORT | HTTP server port | 8081 |
INVOICE_CORS_ORIGINS | Allowed CORS origins (comma-separated) | http://localhost:5173 |
INVOICE_LOG_LEVEL | Log level (debug, info, warn, error) | info |
PlanFact (Phase 3) ✅
| Variable | Description | Default |
|---|
INVOICE_PLANFACT_API_KEY | PlanFact API key (enables PlanFact sync) | — |
INVOICE_PLANFACT_COMPANY_ID | PlanFact company ID | 146673 |
Cloudflare R2 (Phase 3) ✅
| Variable | Description | Default |
|---|
INVOICE_R2_ACCOUNT_ID | Cloudflare account ID (all 3 required to enable R2) | — |
INVOICE_R2_ACCESS_KEY | R2 access key ID | — |
INVOICE_R2_SECRET_KEY | R2 secret access key | — |
INVOICE_R2_BUCKET | R2 bucket name | proxima-invoices |
INVOICE_R2_PUBLIC_DOMAIN | Public URL domain for PDF links | invoices.prxm.uz |
Didox (Phase 4)
| Variable | Description | Default |
|---|
INVOICE_DIDOX_API_URL | Didox API endpoint | — |
INVOICE_DIDOX_API_KEY | Didox API key | — |
INVOICE_DIDOX_SELLER_TIN | Seller TIN for Didox | 309630523 |
Telegram (Phase 2, Optional)
| Variable | Description | Default |
|---|
INVOICE_TELEGRAM_BOT_TOKEN | Telegram bot token | — |
INVOICE_TELEGRAM_CHAT_ID | Notification chat ID | — |
INVOICE_TELEGRAM_ENABLED | Enable/disable Telegram | false |
Test
| Variable | Description | Default |
|---|
TEST_DB_URL | Test database URL | postgres://invoice:invoice@localhost:5433/invoice_test?sslmode=disable |