Skip to main content

Environment Variables

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​

VariableDescriptionExample
INVOICE_DB_URLPostgreSQL connection stringpostgres://invoice:invoice@localhost:5433/invoice?sslmode=disable
INVOICE_CLICKHOUSE_DSNClickHouse HTTPS connectionhttps://default:[email protected]:443/default
INVOICE_JWT_SECRETSecret key for signing JWT tokensRandom 32+ character string

PDF Generation​

VariableDescriptionDefault
INVOICE_PDF_CONVERTER_URLGotenberg endpointhttps://convert.prxm.uz
INVOICE_PDF_CONVERTER_TIMEOUTPDF generation timeout30s

Server​

VariableDescriptionDefault
INVOICE_SERVER_PORTHTTP server port8081
INVOICE_CORS_ORIGINSAllowed CORS origins (comma-separated)http://localhost:5173
INVOICE_LOG_LEVELLog level (debug, info, warn, error)info

PlanFact (Phase 3) ✅​

VariableDescriptionDefault
INVOICE_PLANFACT_API_KEYPlanFact API key (enables PlanFact sync)—
INVOICE_PLANFACT_COMPANY_IDPlanFact company ID146673

Cloudflare R2 (Phase 3) ✅​

VariableDescriptionDefault
INVOICE_R2_ACCOUNT_IDCloudflare account ID (all 3 required to enable R2)—
INVOICE_R2_ACCESS_KEYR2 access key ID—
INVOICE_R2_SECRET_KEYR2 secret access key—
INVOICE_R2_BUCKETR2 bucket nameproxima-invoices
INVOICE_R2_PUBLIC_DOMAINPublic URL domain for PDF linksinvoices.prxm.uz

Didox (Phase 4)​

VariableDescriptionDefault
INVOICE_DIDOX_API_URLDidox API endpoint—
INVOICE_DIDOX_API_KEYDidox API key—
INVOICE_DIDOX_SELLER_TINSeller TIN for Didox309630523

Telegram (Phase 2, Optional)​

VariableDescriptionDefault
INVOICE_TELEGRAM_BOT_TOKENTelegram bot token—
INVOICE_TELEGRAM_CHAT_IDNotification chat ID—
INVOICE_TELEGRAM_ENABLEDEnable/disable Telegramfalse

Test​

VariableDescriptionDefault
TEST_DB_URLTest database URLpostgres://invoice:invoice@localhost:5433/invoice_test?sslmode=disable