DocuStore.io
Integration

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

IntegrationPortAdaptersConfig Prefix
AuthenticationRequestAuth (from duar_auth)Duar SDK (duar-auth)DUAR_*
LLM ProvidersLLMClientPortOllama, OpenAI, Anthropic, GeminiLLM_*, CHAT_LLM_*
Embedding ModelsEmbeddingGeneratorsentence-transformers (local), OpenAI, Gemini, OpenRouterEMBEDDING_*
Blob StorageBlobStorefsspec: local filesystem, S3, Azure Blob StorageBLOB_*
ObservabilityPromptRepositoryPortLangfuse, YAML fallbackLANGFUSE_*

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-dev

Environment Modes

DocuStore supports three application environments:

ModeAPP_ENVTypical Use
developmentDefaultLocal Docker Compose stack
stagingStagingPre-production testing
productionProductionLive 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

VariableDefaultDescription
APP_ENVdevelopmentApplication environment
LOG_LEVELINFOLogging level
API_HOST127.0.0.1API server bind address
API_PORT8000API server port
EVENTSTOREDB_URIesdb://localhost:2113?tls=falseEventStoreDB connection
MONGO_URImongodb://localhost:27017/?replicaSet=rs0MongoDB connection
QDRANT_URLhttp://localhost:6333Qdrant vector database
TEMPORAL_ADDRESSlocalhost:7233Temporal server
KAFKA_BOOTSTRAP_SERVERSlocalhost:19092Kafka brokers
BLOB_BASE_URLfile://./blobsBlob storage root
LLM_PROVIDERollamaLLM backend
DUAR_URLhttp://localhost:9003Duar 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-network

The 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