Integration Overview
How to configure DocuStore's external dependencies: authentication, LLM providers, blob storage, and observability.
DocuStore integrates with several external services. Each integration follows the port-adapter pattern -- the application layer defines an abstract port (protocol), and the infrastructure layer provides one or more concrete adapters. This means you can swap providers without changing business logic.
Integration Points
| Integration | Port | Adapters | Config Prefix |
|---|---|---|---|
| Authentication | RequestAuth | Sentinel SDK | SENTINEL_* |
| LLM Providers | LLMProvider | Ollama, OpenAI, Gemini | LLM_*, CHAT_LLM_* |
| Blob Storage | BlobStore | Local filesystem, S3 | BLOB_* |
| Observability | PromptRepository | Langfuse, YAML fallback | LANGFUSE_* |
Configuration
All configuration is managed through environment variables, read by a single Settings class (pydantic-settings). Variables can be set in a .env file at the project root or passed directly as environment variables.
# .env file example
APP_ENV=development
LOG_LEVEL=INFO
# Core infrastructure
EVENTSTOREDB_URI=esdb://localhost:2113?tls=false
MONGO_URI=mongodb://localhost:27017/?replicaSet=rs0
QDRANT_URL=http://localhost:6333
TEMPORAL_ADDRESS=localhost:7233
KAFKA_BOOTSTRAP_SERVERS=localhost:19092
# LLM
LLM_PROVIDER=ollama
LLM_MODEL_NAME=gemma3:27b
LLM_BASE_URL=http://localhost:11434
# Auth
SENTINEL_URL=http://localhost:9003
SENTINEL_SERVICE_KEY=your-service-key
# Observability
LANGFUSE_HOST=http://localhost:3000
LANGFUSE_PUBLIC_KEY=pk-lf-docu-store-dev
LANGFUSE_SECRET_KEY=sk-lf-docu-store-devEnvironment Modes
DocuStore supports three application environments:
| Mode | APP_ENV | Typical Use |
|---|---|---|
development | Default | Local Docker Compose stack |
staging | Staging | Pre-production testing |
production | Production | Live deployment |
The environment mode affects default values and logging behavior but does not change the API surface. All features are available in all modes.
Quick Reference: Essential Variables
| Variable | Default | Description |
|---|---|---|
APP_ENV | development | Application environment |
LOG_LEVEL | INFO | Logging level |
API_HOST | 127.0.0.1 | API server bind address |
API_PORT | 8000 | API server port |
EVENTSTOREDB_URI | esdb://localhost:2113?tls=false | EventStoreDB connection |
MONGO_URI | mongodb://localhost:27017/?replicaSet=rs0 | MongoDB connection |
QDRANT_URL | http://localhost:6333 | Qdrant vector database |
TEMPORAL_ADDRESS | localhost:7233 | Temporal server |
KAFKA_BOOTSTRAP_SERVERS | localhost:19092 | Kafka brokers |
BLOB_BASE_URL | file://./blobs | Blob storage root |
LLM_PROVIDER | ollama | LLM backend |
SENTINEL_URL | http://localhost:9003 | Sentinel auth service |
Docker Compose
For local development, all infrastructure services are provided via Docker Compose:
# Start all services (EventStoreDB, MongoDB, Qdrant, Temporal, Kafka, Langfuse)
make docker-up
# This runs both docker-compose.yml and docker-compose-langfuse.yml
# on the shared docu_store-networkThe Makefile provides convenience targets for all common operations:
make run # Start API server
make run-workflow-worker # Start pipeline worker
make run-temporal-worker # Start Temporal worker
make docker-up # Start infrastructure
make docker-down # Stop infrastructure