# Pediatric AI Scribe Developer Guide This page used to be a long, hand-maintained developer guide. It drifted from the codebase and repeated stale details about routes, providers, files, memory behavior, and database tables. Use the focused current docs instead: | Topic | Current doc | |---|---| | Developer workflow and extension points | [`developer-guide.md`](developer-guide.md) | | API endpoints | [`api-reference.md`](api-reference.md) | | Database tables and retention | [`database.md`](database.md) | | Architecture overview | [`architecture.md`](architecture.md) | | Deep implementation notes | [`logic/architecture.md`](logic/architecture.md) | | AI/STT/TTS behavior | [`logic/ai-and-voice.md`](logic/ai-and-voice.md), [`speech.md`](speech.md), [`transcription-options.md`](transcription-options.md) | | Deployment and operations | [`deployment.md`](deployment.md) | | Mobile wrapper | [`mobile-build.md`](mobile-build.md) | ## Current Architecture - Express app entry: `server.js`. - Database: PostgreSQL through `src/db/database.js` and versioned migrations in `migrations/`. - Frontend: vanilla JavaScript modules in `public/js/` and lazy-loaded tab fragments in `public/components/`. - Auth: web uses the `ped_auth` httpOnly cookie; mobile uses secure token storage and `Authorization: Bearer` headers. - AI: `src/utils/ai.js` routes to the configured provider/model allowlist. - STT/TTS: server-side providers plus explicit opt-in browser Web Speech fallback only. Browser Whisper/browser-local model downloads are removed. - User templates: `user_memories` stores encrypted templates/preferences; `/api/memories/context` injects only AI-context categories into prompts. - Audio backups: `audio_backups` is an optional encrypted 24-hour recovery store for failed transcription uploads. ## Maintenance Rule Do not add another large duplicated guide here. Update the focused docs above in the same commit as code changes so the admin docs reader does not serve stale parallel documentation.