- src/db/index.ts: initDb/getDb/closeDb using node-sqlite3-wasm (pure WASM, no VS build required)
- src/db/migrations/001-initial.ts: creates all 9 tables with FK constraints and CHECK constraints
- tests/db.test.ts: 10 tests verifying WAL mode, FK cascade, all table columns, and constraint enforcement
- Switched from better-sqlite3 (requires Visual Studio on Windows) to node-sqlite3-wasm
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- package.json with express, better-sqlite3, mqtt, pg, bcrypt, jsonwebtoken, cors
- tsconfig.json targeting ES2022/commonjs
- src/index.ts with GET /health on port 4000
- vitest.config.ts for test runner configuration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Based on Pflichtenheft v2.2, documents the full system design
including daemon, API, frontend, and infrastructure with agreed
deviations (Axum 0.8, SQLx 0.8, Vite 6, Tailwind 4).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>