Good. I now have a thorough understanding of the entire setup. Here's my review:
Review: Local Docker Compose Development Setup
Schema sync: PASS
I compared scripts/init-clickhouse-local.sql with the production migration packages/ch-schema/chx/migrations/20260220190421_auto.sql column-by-column:
claude_sessions — all columns match. Engine correctly changed from SharedReplacingMergeTree + storage_policy='s3' (cloud) to ReplacingMergeTree (local). TTL preserved.
session_analytics — all columns and indexes match. Both use ReplacingMergeTree.
- Materialized view — same logic, just formatted differently (multi-line locally vs single-line in production migration).
Postgres migration (packages/sql-schema/db/migrations/0000_supreme_texas_twister.sql) creates the 4 tables (user, session, account, verification) — this is correct.
dev-local.sh script: PASS (minor observations)
The script is correct. A few notes:
APP_URL=http://localhost:4011 — points to the Vite dev server, which proxies /api and /rpc to :4010. This is correct for local dev since the browser accesses everything through :4011.
ALLOWED_ORIGIN is not explicitly set — defaults to http://localhost:4011, which is correct.
CLICKHOUSE_URL=http://localhost:8123 — matches the Docker Compose port mapping.
docker-compose.yml: PASS
- Postgres 16 with healthcheck, ClickHouse with healthcheck and init SQL mounted.
--wait flag in the script ensures containers are healthy before migrations run.
- Named volumes for persistence across restarts.
Auth flow: PASS
- Email/password signup and login works fully in local mode.
- The web app auth client uses
baseURL: "" (relative), so all auth requests go through the Vite proxy at :4011 → :4010.
- Social login buttons (Google/GitHub) are always visible in the UI but will fail without OAuth credentials. This is documented.
Documentation accuracy (CLAUDE.md): MOSTLY ACCURATE, minor gaps
The "Standalone (local infra)" section is accurate but could be more helpful for first-time contributors. Missing:
- Docker prerequisite — not mentioned that Docker (or OrbStack) must be installed and running