Tech Stack and Pinned Versions

What the project installs, and the version traps that would otherwise cost a day each. Pins last cross-checked against lockfiles 2026-10-14.

The stack itself was locked during planning — see architecture.md. This document only decides which versions.

Pins

ComponentPinNotes
Python3.13.xThe project pins >=3.13,<3.14; 3.14 is not supported.
FastAPI0.141.1
SQLAlchemy2.0.52Not 2.1 — still beta.
Alembic1.19.1
Pydantic2.13.4
pwdlib[argon2]0.3.1Actively maintained. passlib’s last release is still 1.7.4 from 2020 — the rejection stands.
redis (client)8.1.0
asyncpg0.31.0
pytest · pytest-asyncio9.1.1 · 1.4.0
testcontainers[postgres]4.15.0
ruff · mypy0.16.4 · 2.3.1
uv0.12.5Dependency management. pip-tools 7.6.1 if the team prefers it.
Node24.19.0 LTSFloor is 20.9.0 (Next) / 20.19.0 (ESLint).
Next.js16.3.2
React · react-dom19.2.8
TypeScript6.0.3Not 7.x. See the first landmine — this is the most important pin here.
Tailwind CSS4.3.3v4: CSS-first @theme, no tailwind.config.js.
Radix UIradix-ui 1.6.7The unified package, not individual @radix-ui/react-* installs.
next-intl4.13.7
ESLint · eslint-config-next · typescript-eslint10.9.0 · 16.3.2 · 8.67.0
PostgreSQLpostgres:18.6
Redisredis:8.8.2
Caddycaddy:2.11.4
Mailpitaxllent/mailpit:v1.31.0Not under Docker Hub’s library/ namespace.
Syntheav4.0.0 (synthea-with-dependencies.jar, sha256 ed43c20a…1e6ecc1, 201 164 144 B)Seed-data generator (ADR-0015). Dev-time only, Java 21; output is committed under seed/data/, so no JDK in any runtime image. Pins + checksum live in seed/scripts/common.py.
Synthea patient seed424242 (-s)Fixed. Drives which synthetic patients + clinical histories are generated.
Synthea clinician seed20260901 (-cs)Fixed and independent of the patient seed (ADR-0015). Reference date -r 20260101, population -p 120, base demographic Massachusetts (overlaid away).
Indian identity overlay seed20260901random + Faker.seed; Faker 40.38.0 (seed/requirements.txt). Makes names / phones / addresses deterministic.

Landmines

TypeScript 7 breaks type-aware ESLint

npm’s typescript@latest is 7.x — the Go-native compiler — and it removed the programmatic compiler API that type-aware lint rules depend on. typescript-eslint@8.67.0 excludes it outright (typescript: >=4.8.4 <6.1.0). Angular, Vue and ESLint’s own tooling are in the same position. TypeScript 7.1 is expected to restore a stable API; until then pin 6.0.3. Installing “latest” means type-aware linting does not run at all — and it fails at install time, not at review time, which is at least loud.

Pydantic: populate_by_name is deprecated

Soft-deprecated since 2.11. The current camelCase incantation:

class PulseSchema(BaseModel):
    model_config = ConfigDict(
        alias_generator=to_camel,
        validate_by_name=True,
        validate_by_alias=True,
        serialize_by_alias=True,
    )

Every tutorial still shows the old flag.

SQLAlchemy async + joined-table inheritance

selectin_polymorphic() works under AsyncSession and is the documented fix for the MissingGreenlet crash that implicit lazy-loading of subclass attributes causes in async code. AsyncAttrs and expire_on_commit=False are still worth setting for other reasons, but neither one fixes this particular trap on its own.

next-intl must not swallow /api

Caddy puts Next and FastAPI on the same origin (ADR-0012), so the locale middleware has to be told to leave API paths alone:

export const config = { matcher: '/((?!api|_next|_vercel|.*\\..*).*)' };

Without it every API call gets a locale prefix rewritten onto it, and the symptom looks nothing like the cause.

Next.js 16.3.2: next build — earlier /_global-error crash no longer reproduces

Phase 0 (verified 2026-08-22) recorded next build failing while prerendering /_global-error with TypeError: Cannot read properties of null (reading 'useContext') on a bare scaffold — an upstream Turbopack static-generation bug (vercel/next.js#95741, also #86178, #84994, #94667).

Re-verified 2026-09-08 against the Phase 1 tree: next build exits 0 and prerenders every page. The committed frontend/src/app/global-error.tsx is a plain custom component (present since Phase 0), which is what sidesteps the crashing stock code path — the original note was written against a barer state and not revisited. next build is now part of CI’s frontend job. Keep an eye on it across 16.x bumps; if it regresses, the workaround is still “there isn’t one, pin back”.

Re-verified 2026-09-23: the same /_global-error useContext crash reproduces on main when the shell exports NODE_ENV=development, and next build exits 0 with NODE_ENV=production npm run build. A non-production NODE_ENV makes Next prerender with development React while the build expects production, so the crash was environmental, not upstream. If it shows up locally, check echo $NODE_ENV first. CI does not set it, so it is unaffected.

Unrelated: next build prints a deprecation warning for the middleware file convention (renamed proxy in 16.x). Non-blocking; the next-intl middleware still works. Migrate with npx @next/codemod@canary middleware-to-proxy . when convenient.

postgres:18 changed its data volume mount point

postgres:18+ images store data in a pg_ctlcluster-compatible layout and refuse to start if a volume is mounted at the old 18--era path /var/lib/postgresql/data — confirmed during Phase 0 integration (docker compose up failed with Error: in 18+, these Docker images are configured to store database data in a format which is compatible with "pg_ctlcluster"...). Mount the volume at /var/lib/postgresql (no /data suffix) instead; Postgres places its versioned subdirectory underneath on its own. See compose.yaml.

testcontainers

The PyPI package is testcontainers (not testcontainers-python); import is from testcontainers.postgres import PostgresContainer, and get_connection_url(driver=...) is how you get an asyncpg URL rather than the psycopg default.

pg_trgm

Ships in contrib but still needs CREATE EXTENSION pg_trgm; per database — it belongs in the first migration alongside the two database roles. Confirmed via live smoke test during Phase 0 integration: CREATE EXTENSION pg_trgm; on postgres:18.6 (the Debian variant compose.yaml pins) succeeds and pg_roles/pg_extension reflect it after alembic upgrade head. The Alpine variant remains unconfirmed — not in use here, so untested by this pass.

What was not verified

One item from the version research remains an honest gap: the pg_trgm bundling in postgres:18-alpine specifically (not the tag this project uses — postgres:18.6, the Debian variant, which Phase 0 integration confirmed live). The testcontainers Postgres module is exercised by the backend and seed tests. The Alpine pg_trgm question is cheap to settle if it ever becomes load-bearing.

This page is docs/tech-stack.md in the repository, rendered as written.