pediatric-ai-scribe-v3/src/utils
Daniel b5abbb69fc Add node-pg-migrate for versioned schema changes + better mobile UA labels
Infrastructure only — no existing data or tables modified.

  src/db/migrate.js           — programmatic runner, fires at boot after
                                 the existing idempotent initDatabase()
  migrations/1744600000000...  — intentionally empty example, documents
                                 the file shape. Registered in the new
                                 pgmigrations tracking table so it won't
                                 rerun.
  .node-pg-migraterc.json     — CLI config (migrations-dir, utc naming)
  docs/migrations.md          — workflow + conventions
  package.json                — migrate:up/down/new/status npm scripts
                                 (status is a direct pgmigrations query
                                 since node-pg-migrate v7 lacks a status
                                 subcommand)

src/utils/sessions.js:
  - parseUserAgent now recognizes the Capacitor wrapper (UA suffix
    "PedScribe-Android" / "PedScribe-iOS") and labels sessions
    "PedScribe (Android)" instead of "Chrome on Android".

Going forward: schema changes go in /migrations as versioned files
with up() + down(); the inline init in database.js is the implicit
baseline for everything already in production.
2026-04-14 05:06:19 +02:00
..
ai.js feat: Add model search, testing, and TTS/STT/embedding management to admin 2026-04-03 19:55:11 +00:00
config.js Feat: admin CMS, save/resume encounters, user templates, SSHADESS, well visit notes, sick visit, ROS/PE checklists, ICD-10 diagnoses 2026-03-22 16:43:39 -04:00
crypto.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
embeddings.js feat: Add model search, testing, and TTS/STT/embedding management to admin 2026-04-03 19:55:11 +00:00
errors.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
fileType.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
logger.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
models.js Fix model management: empty LiteLLM list, always reload panel, clear-all 2026-03-29 19:32:09 -04:00
notify.js Add biometric auth, ntfy push notifications, mobile improvements 2026-04-11 02:35:07 +02:00
passwords.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
platform.js Sliding 24h idle timeout (web) + persistent mobile + 2FA backup codes 2026-04-14 04:24:54 +02:00
prompts.js Expand ROS/PE: pertinent negatives for WNL, clinical descriptions for abnormal 2026-03-23 23:45:09 +01:00
redact.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
sessions.js Add node-pg-migrate for versioned schema changes + better mobile UA labels 2026-04-14 05:06:19 +02:00
transcribeAWS.js Revert chunk size to 8KB — larger sizes cause AWS deserialization errors 2026-03-29 01:21:43 +00:00
transcribeGoogle.js Add per-user voice preferences (STT model + TTS voice selection) 2026-03-31 14:47:00 +00:00
transcribeLocal.js v10: Local Whisper transcription, bigger text areas, flexible AI memory 2026-03-28 22:00:30 +00:00
ttsGoogle.js Add per-user voice preferences (STT model + TTS voice selection) 2026-03-31 14:47:00 +00:00