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 (from duar_auth) | Duar SDK (duar-auth) | DUAR_* |
| LLM Providers | LLMClientPort | Ollama, OpenAI, Anthropic, Gemini | LLM_*, CHAT_LLM_* |
| Embedding Models | EmbeddingGenerator | sentence-transformers (local), OpenAI, Gemini, OpenRouter | EMBEDDING_* |
| Blob Storage | BlobStore | fsspec: local filesystem, S3, Azure Blob Storage | BLOB_* |
| Observability | PromptRepositoryPort | 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 services/.env or passed directly as environment variables.
# .env file example
APP_ENV=development
LOG_LEVEL=INFO
# Core infrastructure
EVENTSTOREDB_URI=esdb://localhost:2114?tls=false # dev compose host port
MONGO_URI=mongodb://localhost:27017/?replicaSet=rs0
QDRANT_URL=http://localhost:6333
TEMPORAL_ADDRESS=localhost:7234 # dev compose host port
KAFKA_BOOTSTRAP_SERVERS=localhost:19092
# LLM
LLM_PROVIDER=ollama
LLM_MODEL_NAME=gemma3:27b
LLM_BASE_URL=http://localhost:11434
# Auth
DUAR_URL=http://localhost:9003
DUAR_SERVICE_KEY=your-service-key
DUAR_IDP_AUDIENCE=your-oauth-client-id
# Observability
LANGFUSE_HOST=http://localhost:3100
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 |
DUAR_URL | http://localhost:9003 | Duar authorization service |
Docker Compose
For local development, all infrastructure services are provided via Docker Compose:
# Start all services (EventStoreDB, MongoDB, Qdrant, Temporal, Kafka, Langfuse, Umami)
make docker-up
# This runs docker-compose.yml, docker-compose-langfuse.yml and
# docker-compose-umami.yml on the shared docu_store-networkThe Makefile provides convenience targets for all common operations:
make run # Start API server
make run-read-models # Start MongoDB read-model projector
make run-workflow-worker # Start pipeline worker
make run-temporal-worker # Start Temporal CPU/IO worker
make run-llm-worker # Start Temporal LLM worker
make run-plugin-consumer # Start plugin consumer (Kafka → Temporal)
make run-all # Start all of the above
make stop-all # Stop everything started by run-all
make docker-up # Start infrastructure
make docker-down # Stop infrastructure