mirror of
https://github.com/temetro/temetro.git
synced 2026-07-26 11:58:14 +00:00
bb536ba6da
A clinician can push an updated record to a wallet-linked patient (permanent share). The snapshot is signed with the clinic Ed25519 key and sealed to the wallet's X25519 key — derived from its Ed25519 wallet number via the birational map, verified byte-for-byte against the wallet's own derivation. Stored pending, delivered over the /wallet relay live and on the wallet's next authenticated connect (offline catch-up). The patient approves/denies in-app; the wallet signs its decision, the backend verifies it, and the record is replaced only on approval. Wallet pins the clinic key (TOFU) and warns on change. Backend: walletRecordUpdates table + service, ed25519PubToX25519Hex helper, POST /api/patients/wallet/push, GET .../link/:fileNumber|updates|updates/:id, wallet:update-request / wallet:update-response relay events. Frontend: "Push to wallet" dialog with live status, wallet-link gating on the patient sheet, "Sent updates" list under Settings → Signing, walletPush / walletUpdatesList locale namespaces across all five languages. Bumps to v0.5.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
58 lines
1.7 KiB
JSON
58 lines
1.7 KiB
JSON
{
|
|
"name": "temetro-backend",
|
|
"version": "0.5.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "temetro backend — Express + Postgres API with Better Auth (email/password, organizations) and org-scoped patient records.",
|
|
"license": "MIT",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"scripts": {
|
|
"dev": "tsx watch src/index.ts",
|
|
"dev:tunnel": "node scripts/dev-tunnel.mjs",
|
|
"docker:tunnel": "docker compose -f docker-compose.yml -f docker-compose.tunnel.yml up --build",
|
|
"build": "tsc -p tsconfig.json",
|
|
"start": "node dist/index.js",
|
|
"typecheck": "tsc --noEmit",
|
|
"auth:generate": "better-auth generate --config src/auth.ts --output src/db/schema/auth.ts -y",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:migrate": "drizzle-kit migrate",
|
|
"db:apply": "node dist/migrate.js",
|
|
"db:push": "drizzle-kit push"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/anthropic": "^3.0.84",
|
|
"@ai-sdk/google": "^3.0.82",
|
|
"@ai-sdk/openai": "^3.0.71",
|
|
"@ai-sdk/openai-compatible": "^2.0.50",
|
|
"@noble/ciphers": "^2.2.0",
|
|
"@noble/curves": "^2.2.0",
|
|
"@noble/hashes": "^2.2.0",
|
|
"@types/multer": "^2.1.0",
|
|
"ai": "^6.0.204",
|
|
"better-auth": "^1.6.13",
|
|
"cors": "^2.8.6",
|
|
"dotenv": "^17.4.2",
|
|
"drizzle-orm": "^0.45.2",
|
|
"express": "^5.2.1",
|
|
"multer": "^2.2.0",
|
|
"nanoid": "^5.1.11",
|
|
"nodemailer": "^8.0.10",
|
|
"pg": "^8.21.0",
|
|
"socket.io": "^4.8.3",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"@better-auth/cli": "^1.4.21",
|
|
"@types/cors": "^2.8.19",
|
|
"@types/express": "^5.0.6",
|
|
"@types/node": "^25.9.1",
|
|
"@types/nodemailer": "^8.0.0",
|
|
"@types/pg": "^8.20.0",
|
|
"drizzle-kit": "^0.31.10",
|
|
"tsx": "^4.22.4",
|
|
"typescript": "^6.0.3"
|
|
}
|
|
}
|