Lucim is a FastAPI, SQLAlchemy, Postgres, Redis, ARQ, React, and S3-compatible-storage application with separate MCP and isolated-worker entrypoints.

Layering

Repository map

Required boundaries

  • REST fields are the canonical public contract.
  • MCP, CLI, CI, and console surfaces adapt shared services.
  • All tenant data access filters by team_id through repositories.
  • Services own commit and rollback.
  • Enums come from app.db.models.enums.
  • Source adapters are registered code; configuration cannot supply executable imports.
  • Signal publication requires linked evidence and an allowed verification state.

Staged architecture

Stage 1 owns monitoring and delivery. Stage 2 adds exposure and bounded remediation. Stage 3 adds connector-fleet correlation. Staged routes, tools, and views must remain aligned across backend and frontend gates.