Files
temetro/backend/package.json
T
Khalid Abdi 99aa534e88 feat: multi-clinic Temetro Network with per-clinic identity (v0.8.0)
The relay is now multi-clinic. Each clinic authenticates to the /hub
namespace by signing a challenge with its own Ed25519 clinic signing key
(a per-clinic identity, not a shared RELAY_TOKEN), and the relay routes
every device response back to only the clinic that originated the request
(keyed by requestId) — so clinics never see each other's traffic.

Backend:
- clinic_signing_keys.network_enabled + GET/PUT /api/signing/network
  (owner/admin) to join/leave the network.
- relay-client keeps one authenticated hub connection per network-enabled
  org (connectOrg/disconnectOrg, hubs map keyed by orgId); emitToWallet/
  sendToWallet take orgId; offline flush is org-scoped.
- Wallet import/push return 409 until a clinic joins.
- RELAY_TOKEN is now optional/legacy (open relay needs no shared secret).

Frontend:
- "Join Temetro Network" toggle in Settings → Signing, localized in all
  five languages (en, fr, de, so, ar).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 18:30:19 +03:00

59 lines
1.8 KiB
JSON

{
"name": "temetro-backend",
"version": "0.8.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",
"socket.io-client": "^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"
}
}