10 Commits

Author SHA1 Message Date
aaac2bedff feat(display): add layout manager with element CRUD (Task 8)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:56:05 +02:00
2990f9aa4d feat(display): add display builder for ESP32 JSON + tests (Task 7)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:56:01 +02:00
47d746cf71 feat(datapoints): add datapoint manager with CRUD and transform support (Task 6)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:55:57 +02:00
7b60fc252d feat(middleware): add MQTT payload parser with dot-notation JSON path extraction
- src/modules/mqtt/payload-parser.ts: extractValue() supporting \$.field and \$.nested.deep paths
- Returns raw string when no path provided, null for invalid JSON or missing paths
- Stringifies numbers/booleans, returns JSON string for objects/arrays
- tests/payload-parser.test.ts: 19 tests covering no-path passthrough, simple/nested fields, missing paths, invalid JSON, and edge cases (null, zero, arrays)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:48:29 +02:00
0df1c523bd feat(middleware): add datapoint transform engine with round, scale, and map support
- src/modules/datapoints/transforms.ts: applyTransform() supporting map (priority), scale, and round
- tests/transforms.test.ts: 17 tests covering no-transform passthrough, round precision, scale multiply, map lookup, map priority over numeric transforms, combined transforms, and edge cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:47:41 +02:00
f7d16c077e feat(middleware): add JWT auth module with bcryptjs login and protected routes
- src/api/middleware/auth.ts: signToken, verifyToken, authMiddleware (Bearer JWT, 24h expiry)
- src/api/routes/auth.ts: POST /api/auth/login (bcryptjs verify) and GET /api/auth/me (protected)
- src/index.ts: mount auth router at /api/auth
- tests/api/auth.test.ts: 7 tests covering login success, wrong password, no token, invalid token, valid access
- Using bcryptjs (pure JS) instead of bcrypt (requires Visual Studio on Windows)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:46:50 +02:00
34e0dcfe32 feat(middleware): add SQLite DB init with WAL mode, FK support, and 9-table migration
- 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>
2026-04-06 12:45:21 +02:00
00968a4626 feat(middleware): scaffold Node.js/Express/TypeScript project with health endpoint
- 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>
2026-04-06 12:40:54 +02:00
b1085e1ea4 docs: add implementation plan for ESP32 E-Paper display system
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:44:16 +02:00
7ffad8364b docs: add design specification for ESP32 E-Paper display system
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 10:35:01 +02:00