# Technology Stack This records adopted rebuild decisions, not proof that deployment or integration has passed. See `docs/specs/ai-platform-lead-scoring.md` for behavior and `ARCHITECTURE.md` for placement. - Backend: Python 3.13, uv, FastAPI/Pydantic at HTTP boundary, PostgreSQL 16+ with SQLAlchemy async + **asyncpg**, Alembic. Domain uses Python values and pure functions; no transport/ORM models inside it. - Runtime: one backend process, ephemeral asyncio tasks; PostgreSQL owns run durability, unique idempotency and transactional outbox. Startup terminalizes lost work before readiness. No broker/Redis or distributed leases in v1. - AIHub: the client supplies its AI key per request in `X-AI-Key` (RAM only). The active AI profile revision chooses AIHub or an OpenAI-compatible endpoint, its URL, model and timeout. The optional server-side OpenAI key is sent only to `AI_PLATFORM_OPENAI_BASE_URL`. Only development permits loopback HTTP; production URLs require HTTPS. Actual provider protocol, model and quotas require sandbox verification. - Admin Web: SvelteKit 5, TypeScript 5, Bun, adapter-node after runtime verification; generated types from FastAPI OpenAPI, server-only session/backend access. DotB-Omni owns business UI. - Tooling: pytest, Ruff, Pyright, Import Linter, Alembic lifecycle, Svelte check/Vitest and one browser flow; pre-commit opt-in, GitHub CI authoritative. uv/Bun lockfiles required. Dockerfiles separate for backend and web; Compose local only. Before production choose hosting, TLS/proxy, secret manager, DB backup/restore and retention, alerts/on-call and deployment verification. Never imply local Compose alone establishes production readiness.