Skip to main content

Configuration

All settings are managed through Pydantic Settings loaded from environment variables (.env file or system env).

Settings Reference

VariableDefaultDescription
DATABASE_URLpostgresql+asyncpg://quint:quint_local_dev@localhost:5432/quintAsync PostgreSQL connection string
VariableDefaultDescription
REDIS_URLredis://localhost:6379/0Redis connection string
REDIS_EVENT_TTL86400Event cache TTL (seconds)
REDIS_POLICY_TTL3600Policy cache TTL (seconds)
REDIS_MAX_EVENTS_PER_CUSTOMER10000Max cached events per customer
VariableDefaultDescription
API_HOST0.0.0.0Server bind address
API_PORT8000Server port
API_WORKERS4Uvicorn worker count
CORS_ORIGINS["http://localhost:3000"]Allowed CORS origins
VariableDefaultDescription
RATE_LIMIT_STARTER10000Events/day for starter tier
RATE_LIMIT_PRO100000Events/day for pro tier
RATE_LIMIT_ENTERPRISE1000000Events/day for enterprise tier
VariableDefaultDescription
GRAPH_REASONER_ENABLEDTrueEnable primary scoring engine
GNN_ENABLEDFalseEnable GNN structural scoring
GNN_MODEL_PATH""Path to trained GNN model
GNN_WEIGHT0.0GNN weight in ensemble
FORWARD_CHAIN_WEIGHT1.0Forward-chaining weight
VariableDefaultDescription
MEMGRAPH_URLbolt://localhost:7687Memgraph Bolt URL
MEMGRAPH_USERNAME""Memgraph username
MEMGRAPH_PASSWORD""Memgraph password
MEMGRAPH_ENABLEDFalseEnable Memgraph
MEMGRAPH_ENRICH_ENABLEDFalseEnable enrichment queries
MEMGRAPH_EVENT_STORE_ENABLEDFalseWrite events to Memgraph
MEMGRAPH_QUERY_TIMEOUT_MS30Query timeout (ms)
VariableDefaultDescription
GEMINI_API_KEY""Google Gemini API key
GEMINI_MODELgemini-2.5-flashModel name
GEMINI_TIMEOUT30.0Request timeout (seconds)
VariableDefaultDescription
RISK_ENGINE_ADDRESSlocalhost:50051gRPC server address
RISK_ENGINE_TIMEOUT120.0gRPC timeout (seconds)
RISK_ENGINE_ENABLEDFalseEnable GPU risk engine
VariableDefaultDescription
BATCH_INTERVAL_MINUTES5Batch processing interval
MAX_EVENTS_PER_CHUNK256Max events per processing chunk
MAX_PARALLEL_CHUNKS10Max parallel chunk processing
MAX_RETRY_COUNT3Max retries before dead letter
VariableDefaultDescription
POSTGRES_CACHE_TTL_DAYS7PostgreSQL L2 cache TTL
VariableDefaultDescription
ARCHIVE_AFTER_DAYS90Days before archival to S3
ARCHIVE_STORAGE_BUCKETquint-archiveS3 bucket name
ARCHIVE_STORAGE_ENDPOINT""S3-compatible endpoint
VariableDefaultDescription
LOG_LEVELinfoLogging level
ENVIRONMENTlocalEnvironment name (local/staging/production)

Local Development

Create a .env file in the infra/ directory:
DATABASE_URL=postgresql+asyncpg://quint:quint_local_dev@localhost:5432/quint
REDIS_URL=redis://localhost:6379/0
GEMINI_API_KEY=your-key-here
GRAPH_REASONER_ENABLED=true
LOG_LEVEL=debug
ENVIRONMENT=local
Start backing services and run:
docker compose up -d postgres redis
python scripts/migrate.py
python scripts/seed.py
uvicorn src.api.main:create_app --factory --reload --port 8000