- Add .NET 8 backend with Clean Architecture - Add React + Vite + TypeScript frontend - Implement authentication with JWT - Implement Azure Blob Storage client - Implement OCR integration - Implement supplier matching service - Implement voucher generation - Implement Fortnox provider - Add unit and integration tests - Add Docker Compose configuration
107 lines
3.3 KiB
Plaintext
107 lines
3.3 KiB
Plaintext
# Backend Environment Variables
|
|
# Copy this file to .env and fill in your values
|
|
|
|
# ==========================================
|
|
# Application Configuration
|
|
# ==========================================
|
|
APP_NAME=Fortnox Invoice Integration
|
|
APP_ENV=development
|
|
DEBUG=true
|
|
SECRET_KEY=change-this-to-a-random-secret-key-in-production
|
|
|
|
# ==========================================
|
|
# Server Configuration
|
|
# ==========================================
|
|
HOST=0.0.0.0
|
|
PORT=8000
|
|
|
|
# ==========================================
|
|
# Database Configuration
|
|
# ==========================================
|
|
# Format: postgresql://user:password@host:port/database
|
|
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/fortnox_invoice
|
|
# For async SQLAlchemy
|
|
ASYNC_DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/fortnox_invoice
|
|
|
|
# Database pool settings
|
|
DB_POOL_SIZE=5
|
|
DB_MAX_OVERFLOW=10
|
|
DB_POOL_TIMEOUT=30
|
|
|
|
# ==========================================
|
|
# Redis Configuration
|
|
# ==========================================
|
|
REDIS_URL=redis://localhost:6379/0
|
|
REDIS_PASSWORD=
|
|
|
|
# ==========================================
|
|
# Azure Blob Storage
|
|
# ==========================================
|
|
# Get this from Azure Portal > Storage Account > Access Keys
|
|
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxx;EndpointSuffix=core.windows.net
|
|
AZURE_STORAGE_CONTAINER=documents
|
|
AZURE_STORAGE_ACCOUNT_NAME=
|
|
AZURE_STORAGE_ACCOUNT_KEY=
|
|
|
|
# ==========================================
|
|
# Fortnox OAuth Configuration
|
|
# ==========================================
|
|
# Get these from Fortnox Developer Portal
|
|
FORTNOX_CLIENT_ID=your-fortnox-client-id
|
|
FORTNOX_CLIENT_SECRET=your-fortnox-client-secret
|
|
FORTNOX_REDIRECT_URI=http://localhost:5173/fortnox/callback
|
|
FORTNOX_AUTH_URL=https://apps.fortnox.se/oauth-v1/auth
|
|
FORTNOX_TOKEN_URL=https://apps.fortnox.se/oauth-v1/token
|
|
FORTNOX_API_BASE_URL=https://api.fortnox.se/3
|
|
|
|
# ==========================================
|
|
# Invoice Master OCR API
|
|
# ==========================================
|
|
# URL of your existing invoice-master API
|
|
OCR_API_URL=http://localhost:8000/api/v1
|
|
OCR_API_KEY=your-ocr-api-key
|
|
OCR_TIMEOUT=60
|
|
|
|
# ==========================================
|
|
# JWT Configuration
|
|
# ==========================================
|
|
JWT_SECRET_KEY=your-jwt-secret-key-min-32-characters-long
|
|
JWT_ALGORITHM=HS256
|
|
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=15
|
|
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
|
|
|
|
# ==========================================
|
|
# Encryption Configuration
|
|
# ==========================================
|
|
# 32-byte base64 encoded key for AES-256 encryption
|
|
ENCRYPTION_KEY=your-32-byte-encryption-key-base64-encoded=
|
|
|
|
# ==========================================
|
|
# Email Configuration (Optional)
|
|
# ==========================================
|
|
SMTP_HOST=
|
|
SMTP_PORT=587
|
|
SMTP_USER=
|
|
SMTP_PASSWORD=
|
|
SMTP_FROM_EMAIL=noreply@example.com
|
|
|
|
# ==========================================
|
|
# Logging Configuration
|
|
# ==========================================
|
|
LOG_LEVEL=INFO
|
|
LOG_FORMAT=json
|
|
|
|
# ==========================================
|
|
# Monitoring (Optional)
|
|
# ==========================================
|
|
APPLICATIONINSIGHTS_CONNECTION_STRING=
|
|
SENTRY_DSN=
|
|
|
|
# ==========================================
|
|
# Feature Flags
|
|
# ==========================================
|
|
ENABLE_AUTO_SUPPLIER_CREATE=false
|
|
ENABLE_PDF_ATTACHMENT=true
|
|
MAX_FILE_SIZE_MB=10
|
|
ALLOWED_FILE_TYPES=pdf,jpg,jpeg,png
|