Sókrates IDR
Legal Document Intelligence Platform. A full-stack enterprise legal document intelligence platform, built solo in 2025. Features Domain-Driven Design with enforced architectural boundaries, polyglot persistence across four database systems, OpenTelemetry with 13+ instrumentations, and comprehensive testing from unit to E2E with Playwright.
General notes
- DDD with architectural boundaries enforced by import-linter contracts: domain → core → infrastructure → api. Repository pattern with protocol-based interfaces
- Polyglot persistence: PostgreSQL (asyncpg + SQLAlchemy + Alembic), Neo4j knowledge graph, MinIO document storage, PGVector embeddings
- OpenTelemetry with 13+ instrumentations, Logfire + Sentry + structlog for structured observability
- Comprehensive testing: pytest-asyncio, factory-boy, Playwright E2E. Automatic TypeScript client generation from OpenAPI specs
Construction notes
- DDD with architectural boundaries enforced by import-linter contracts (not just convention): domain → core → infrastructure → api. Repository pattern with protocol-based interfaces. Dependency injection throughout (dependency-injector)
- Polyglot persistence: PostgreSQL (asyncpg + SQLAlchemy + Alembic migrations), Neo4j (knowledge graph), MinIO (S3-compatible document storage), PGVector (embeddings)
- OpenTelemetry with 13+ instrumentations: FastAPI, Starlette, ASGI, asyncpg, SQLAlchemy, httpx, requests, aiohttp, Celery, gRPC, Jinja2. Logfire + Sentry + structlog
- Comprehensive testing: pytest-asyncio, factory-boy, freezegun, Playwright E2E. Automatic TypeScript client generation from OpenAPI specs via Orval
- JWT/bcrypt authentication, Celery distributed task queues, Docker multi-stage builds, GitHub Actions CI/CD
4 Persistence backends (PostgreSQL, Neo4j, MinIO, PGVector)
13+ OpenTelemetry instrumentations for full observability
E2E Playwright tests from login to document
Materials
- Python/FastAPI
- React/TypeScript
- PostgreSQL
- Neo4j
- MinIO
- PGVector
- Celery
- Project
- Hákon Freyr Gunnarsson
- Sheet
- Detail I
- Title
- Sókrates IDR
- Scale
- N.T.S.
- Rev
- 2026-10