Skip to content

Configuration

All configuration is via environment variables, loaded from .env file or system environment. Defaults are in src/slidefactory/app/config.py.

Core

Variable Default Description
SECRET_KEY "secret-development-only" Session encryption key. Generate for production: openssl rand -hex 32
SERVER_URL "" Public URL for webhooks and external links
API_ONLY_MODE false Disable SPA, serve REST API only
WORKFLOW_MODE "database" database, filesystem, or hybrid
DEBUG_MODE false Verbose logging
ENFORCE_HTTPS false Force HTTPS scheme

Database & Cache

Variable Default Description
DATABASE_URL PostgreSQL connection. Use postgresql:// prefix
REDIS_HOST "" Redis host (for Azure Redis)
REDIS_PORT 6380 Redis port
REDIS_PASSWORD "" Redis password
REDIS_SSL true Redis SSL
CELERY_BROKER_URL Redis URL for Celery broker (overrides REDIS_* vars)
CELERY_RESULT_BACKEND Redis URL for Celery results

Storage

Variable Default Description
STORAGE_PROVIDER "minio" minio or azure
MINIO_CLIENT_URL MinIO endpoint (e.g. http://localhost:9000)
MINIO_ACCESS_KEY MinIO access key
MINIO_SECRET_KEY MinIO secret key
MINIO_USE_SSL false MinIO SSL
AZURE_STORAGE_CONNECTION_STRING Azure Blob connection string
AZURE_STORAGE_ACCOUNT_NAME Azure account name (alternative to connection string)
AZURE_STORAGE_ACCOUNT_KEY Azure account key
USE_PRESIGNED_DOWNLOAD_URLS false Use presigned URLs for downloads

Bucket names are configurable (BUCKET_PRESENTATIONS, BUCKET_TEMPLATES, etc.) — see config.py for the full list of 14 buckets.

AI Providers

Variable Default Description
AI_PROVIDER "" Default provider: openai, azure_openai, anthropic, mistral, ollama, openrouter, cohere
AI_MODEL "" Default model name
OPENAI_API_KEY OpenAI API key
AZURE_OPENAI_API_KEY Azure OpenAI key
AZURE_OPENAI_ENDPOINT Azure OpenAI endpoint URL
AZURE_OPENAI_DEPLOYMENT_NAME Azure deployment name
ANTHROPIC_API_KEY Anthropic API key
MISTRAL_API_KEY Mistral API key
OLLAMA_BASE_URL Ollama endpoint (e.g. http://localhost:11434)
OPENROUTER_API_KEY OpenRouter API key
COHERE_API_KEY Cohere API key

N8N

Variable Default Description
N8N_API_URL N8N API endpoint (e.g. http://localhost:5678)
N8N_API_KEY N8N API key (create in N8N: Settings > API)
N8N_DB_HOST Direct N8N database access (optional, for vector collections)
N8N_DB_PORT 5432 N8N DB port
N8N_DB_NAME N8N DB name
N8N_DB_USER N8N DB user
N8N_DB_PASSWORD N8N DB password

Authentication

Variable Default Description
JWT_SECRET_KEY SECRET_KEY JWT signing key
JWT_ALGORITHM HS256 JWT algorithm
JWT_ACCESS_TOKEN_EXPIRE_MINUTES 15 Access token TTL
JWT_REFRESH_TOKEN_EXPIRE_DAYS 7 Refresh token TTL
COOKIE_NAME "slidefactory" Session cookie name
SESSION_COOKIE_MAX_AGE 1800 Session timeout (seconds)
EMERGENCY_ADMIN_EMAIL Bootstrap admin (used only if no admin exists)
EMERGENCY_ADMIN_PASSWORD Bootstrap admin password

Azure Entra (AD)

Variable Default Description
AZURE_TENANT_ID Azure AD tenant ID
AZURE_CLIENT_ID Azure AD client ID
AZURE_CLIENT_SECRET Azure AD client secret
AZURE_REDIRECT_URI OAuth redirect URI

Branding (Whitelabel)

Variable Default Description
CLIENT_NAME "Slidefactory" Application name
CLIENT_LOGO "/static/img/logo.png" Logo URL
CLIENT_PRIMARY_COLOR "#ee0000" Primary UI color
CLIENT_TITLE "" Page title (defaults to CLIENT_NAME)
CLIENT_DESCRIPTION "AI-driven..." Application description

Context System (RAG)

Variable Default Description
JINA_API_KEY Jina AI key (chunking + embedding)
JINA_CHUNKING_MAX_SIZE 64000 Max content size for chunking (bytes)
EMBEDDING_DIMENSIONS 1024 Embedding vector dimensions

Web Scraping

Variable Default Description
GOOGLE_SEARCH_API_KEY Google Custom Search key
GOOGLE_CUSTOM_SEARCH_ENGINE_ID Google search engine ID
FIRECRAWL_API_KEY Firecrawl API key
SERPER_API_KEY Serper API key

SPA & CORS

Variable Default Description
SPA_BASE_PATH "/app" SPA URL path
SPA_DIR "" SPA dist directory (auto-detected)
CORS_ENABLED false Enable CORS headers
CORS_ORIGINS "localhost:5173,..." Allowed origins (comma-separated)

Advanced

Variable Default Description
GOTENBERG_URL "" Gotenberg service for thumbnail generation
THUMBNAIL_WIDTH 400 Thumbnail width (px)
THUMBNAIL_HEIGHT 300 Thumbnail height (px)
MARKER_FRONT {{ Template placeholder open marker
MARKER_BACK }} Template placeholder close marker
MCP_AUTH_TOKEN Model Context Protocol token
MS_CLIENT_ID Office365 OAuth client ID
MS_CLIENT_SECRET Office365 OAuth client secret

Example .env Files

Development (local)

DATABASE_URL=postgresql://postgres:postgres@localhost:5432/slidefactory
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/1
STORAGE_PROVIDER=minio
MINIO_CLIENT_URL=http://localhost:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
AI_PROVIDER=openai
OPENAI_API_KEY=sk-your-key
N8N_API_URL=http://localhost:5678
N8N_API_KEY=n8n_api_your-key
DEBUG_MODE=true
CORS_ENABLED=true

Production (Azure)

DATABASE_URL=postgresql://user:pass@host.postgres.database.azure.com:5432/slidefactory?sslmode=require
REDIS_HOST=your-redis.redis.cache.windows.net
REDIS_PORT=6380
REDIS_PASSWORD=your-password
REDIS_SSL=true
STORAGE_PROVIDER=azure
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...
ENFORCE_HTTPS=true
DEBUG_MODE=false

Validation

slidefactory status          # check all connections
slidefactory init check      # verify prerequisites