Architecture
Docuvate uses clean architecture in the API and worker: domain, application, infrastructure, and presentation stay separate.
Runtime
The web app talks to the NestJS API. The API uses PostgreSQL for metadata, MinIO (S3-compatible) for files, Valkey for queues and cache, and the FastAPI worker for OCR, embeddings, and chat RAG.
Layers
- Domain: entities, ports, domain errors (no framework imports).
- Application: use cases orchestrating ports.
- Infrastructure: Postgres, MinIO, Valkey, HTTP worker, better-auth.
- Presentation: Nest controllers and React routes in the web app.
Core ports (selection)
See docs/architecture.md in the repository for the full port table. OpenTelemetry is off in default Compose; production can export to SigNoz or Sentry.
- DocumentRepository, ObjectStorage, ExtractionPort, SearchPort, DocumentChatPort.
- FolderRepository, DuplicateRepository, EmbeddingPort.
- Session auth via better-auth; service API keys for headless access.