Skip to main content

Technology Stack

Frontend

TechnologyVersionPurposeMaturity
Next.js16React framework, routing, SSR capabilitiesProduction-ready
React19UI libraryProduction-ready
Tailwind CSSv4Utility-first stylingProduction-ready
shadcn/uilatestComponent primitives (29 components installed)Production-ready
CopilotKitv1.56.5 (v2 APIs)AI assistant integration in dashboardProduction-ready -- migrated to v2 APIs (ADR-0013)
RechartslatestFinancial charts and analytics visualizationsProduction-ready
Framer MotionlatestAnimations (particle background, transitions)Production-ready
@uiw/react-json-viewlatestJSON data viewer for evidence displayProduction-ready
@tanstack/react-queryv5Server state caching and synchronizationProduction-ready
AxioslatestHTTP client with typed API wrapperProduction-ready
TypeScript5.xType safetyProduction-ready
note

All frontend rendering is client-side. Next.js SSR/RSC capabilities are available but not currently leveraged -- all page components use the "use client" directive. The dashboard is inherently interactive (real-time pipeline visualization, CopilotKit AI chat, form-heavy workflows), making client-side rendering the natural fit. Server components may be adopted for initial data loading in future iterations.

Backend

TechnologyVersionPurposeMaturity
Python3.13+Runtime (requires-python = ">=3.13")Production-ready
FastAPIlatestHTTP API frameworkProduction-ready
Pydanticv2Data validation and serializationProduction-ready
pydantic-settingslatestConfiguration management (.env + env vars)Production-ready
SQLAlchemylatest (async)Database engine, session management, and ORM modelsProduction-ready
AlembiclatestDatabase migration managementProduction-ready
asyncpglatestPostgreSQL async driverProduction-ready
uvicornlatestASGI serverProduction-ready
note

SQLAlchemy ORM models are defined as 63 mapped classes in app/db/models.py. Alembic is configured with async support and 58 migrations covering the full schema evolution (initial schema, portal token expiry, calibration, reasoning templates, alerts, tool invocations, governance checks, EVOI decisions, automation tiers, signal events, multi-tenancy RLS, diagnostics, finding intelligence, Lex knowledge layer, PII classification, risk configurations, discrepancy resolutions, sanctions suppression rules, and decision memoranda; latest is 058_decision_memoranda). Per ADR-0008 (now superseded), the data layer is migrating from raw sqlalchemy.text() queries to a generic ORM BaseRepository[T] pattern; admin.py and auth.py are fully migrated, with remaining modules converted incrementally.

Workflow Engine

TechnologyVersionPurposeMaturity
TemporallatestDurable workflow orchestrationProduction-ready
temporalio (Python SDK)>=1.9Workflow/activity definitionsProduction-ready
Temporal UIlatestWorkflow monitoring dashboardProduction-ready

Temporal was chosen over alternatives (Celery, custom state machines) for its durable execution guarantees, built-in retry policies, and signal/query pattern that maps naturally to the compliance review loop. See ADR-0002.

AI Layer

TechnologyVersionPurposeMaturity
PydanticAIv1.60+Agent framework with structured outputsProduction-ready
AG-UI ProtocollatestAgent-to-UI communication standardPoC -- emerging standard
OpenAI GPT-4.1-mini / GPT-5.2latestLLM for the agent fleet (33 agent modules)Production-ready API
MCP (Model Context Protocol)latestTool integration (NorthData, BrightData, Tavily)PoC -- Anthropic protocol

Per-Agent Model Configuration

Each agent can be configured to use a different LLM model via environment variables:

REGISTRY_AGENT_MODEL=openai:gpt-5.2
SYNTHESIS_AGENT_MODEL=openai:gpt-5.2
BELGIAN_SCRAPING_AGENT_MODEL=openai:gpt-4.1-mini

Most agents default to openai:gpt-5.2; the Belgian scraping agent and the document extractor use gpt-4.1-mini for cost efficiency (see ADR-0029, cost-optimized model tiers). In test mode, all agents use PydanticAI's TestModel.

Data Layer

TechnologyVersionPurposeMaturity
PostgreSQL16Relational data (cases, audit events, evidence, MCC, PEPPOL)Production-ready
Neo4j2026 (Community)Knowledge graph for cross-case entity analyticsProduction-ready
MinIOlatestS3-compatible object storage for documentsProduction-ready
Redis8 (Alpine)Cache layer (PEPPOL, inhoudingsplicht results)Production-ready

Database Schema (63 ORM-mapped tables)

TablePurpose
casesCase metadata, status, portal tokens
audit_eventsTimestamped event log per case
mcc_classificationsMCC code assignments with confidence and officer overrides
peppol_verificationsPEPPOL directory lookup results
peppol_api_keysAPI key management for PEPPOL service
belgian_evidenceSHA-256 hashed evidence from Belgian official sources
agent_executionsAgent pipeline execution tracking for observability
signal_eventsCompliance memory signal capture (officer actions)
confidence_calibrationsConfidence scoring calibration records
reasoning_templatesInvestigation reasoning template definitions
reasoning_template_conditionsConditional logic for reasoning templates
alertsCross-case pattern detection alerts
tool_invocationsAudited AI tool invocation records
governance_checksPre/post-execution governance check results
evoi_decisionsExpected Value of Investigation decision records
automation_tiersPer-officer automation tier assignments
automation_tier_overridesCompliance manager tier overrides
automation_tier_historyTier change audit history
express_queue_itemsExpress queue items for automated approval

Scraping and Data Acquisition

TechnologyPurposeUsed For
crawl4aiAsync web crawler with stealth modeBelgian Gazette, Inhoudingsplicht
BrightData MCPCommercial scraping with bot protection bypassCrunchbase enrichment, LinkedIn validation
httpxAsync HTTP clientNBB CBSO REST API (direct, no scraping needed)
KBO scraperCustom HTML parserBelgian company registry
tip

Each data source uses the scraping tool best suited to its protection level. See the OSINT Pipeline page for the full allocation table and rationale.

Testing

TechnologyPurposeScope
pytestBackend test runner4,117+ tests
TestcontainersIsolated database containers for integration tests20 PostgreSQL integration tests
respxHTTP mock library for httpxOSINT and scraping service tests
PydanticAI TestModelDeterministic AI agent testingEntire agent fleet (33 modules)
JestFrontend test runner59 test files
React Testing LibraryComponent testing59 test suites covering dashboard, portal, entity-network, memory
PlaywrightEnd-to-end browser testing6 E2E specs

Test Safety Mechanisms

  • ALLOW_MODEL_REQUESTS=False environment variable prevents accidental real LLM calls in tests
  • PydanticAI TestModel returns deterministic outputs matching agent output schemas
  • asyncio_mode=auto in pytest.ini eliminates need for @pytest.mark.asyncio decorators
  • Temporal WorkflowEnvironment.start_time_skipping() for workflow tests without real timers

Infrastructure

TechnologyPurposePort
Docker ComposeLocal development orchestration--
Next.js dev serverFrontend development3001
uvicornBackend development8002
Temporal ServerWorkflow execution7233
Temporal UIWorkflow monitoring8080
PostgreSQLDatabase5432
MinIO APIObject storage9000
MinIO ConsoleStorage management UI9001
RedisCache6379

:::tip Infrastructure Improvements (Phase 6)

  • GitHub Actions CI pipeline with 4 jobs (backend-tests, frontend-tests, lint, build)
  • Docker Compose health checks with condition: service_healthy dependencies
  • Multi-stage Docker builds for backend and frontend
  • Testcontainers integration for isolated PostgreSQL in tests :::

:::tip Production Readiness Log aggregation (structured JSON logging with correlation IDs) and HTTPS termination (via reverse proxy) are planned for the production deployment phase. See Deployment for the full production roadmap. :::

Development Tool Stack

Claude Code plugins, MCP servers, and LSP integrations that power the AI-driven development workflow.

PluginPurpose
SuperpowersMethodology lifecycle (12 skills, 25 agent types)
code-reviewMulti-agent PR review (5 parallel Sonnet agents)
code-simplifierCode bloat detection (3 review agents)
typescript-lspReal-time TypeScript diagnostics
pyright-lspReal-time Python type diagnostics
serenaSymbol-level code navigation
context7Up-to-date library documentation
aikidoSecurity scanning (SAST, secrets detection)
coderabbitExternal AI code review
codebase-memory-mcpPersistent code knowledge graph
CategoryDetails
MCP servers3 (Neo4j, Temporal, codebase-memory-mcp) + Aikido security
LSP servers2 (TypeScript, Pyright)
Cross-tool compatibilityAGENTS.md symlinked to CLAUDE.md (Linux Foundation Agentic AI Foundation standard)