Never send: passwords, keys, raw logs, credentials
Privacy note: AI requests go through /api/* proxy. No PII is stored server-side. All patient data remains in client localStorage. AI providers receive only clinical context, never raw patient identifiers.
📝
Ko System Prompt
View, edit, and save Ko's personality & medical prompt — syncs to webapp + Telegram
loading…
▼
Edit Ko's system prompt below. Changes apply to both webapp and Telegram instantly.
Leave empty to use the built-in default prompt.
0 chars
How it works: Custom prompt is stored in D1 database. Both webapp (ko-ai.js) and Telegram bot (telegram.js) load the latest prompt on every request. If no custom prompt is set, the hardcoded default is used. Max 50,000 characters.
👤
RBAC & Admin Users
Role matrix, admin management, least privilege, audit trail
4 RolesLeast privilege
▼
Role-based access control matrix
Permission
Admin
Manager
Nurse
CHW
Admin Settings
✅
👁️
❌
❌
Patient Records
✅
✅
✅
👁️
Prescriptions
✅
✅
✅
❌
Lab Orders
✅
✅
✅
❌
Schedule Mgmt
✅
✅
✅
👁️
Finance/Billing
✅
✅
❌
❌
HR / Staff
✅
✅
❌
❌
Audit Logs
✅
👁️
❌
❌
Ko AI Chat
✅
✅
✅
✅
Community Health
✅
✅
👁️
✅
Data Export
✅
✅
❌
❌
Reset / Delete
✅
❌
❌
❌
✅ Full access 👁️ Read-only ❌ No access
Audit: All role changes logged to Store.actionLog with timestamp, actor, and previous value. Admin role changes require confirmation.
Architecture: Client data in localStorage (L1 cache) with D1 database as source of truth. Bi-directional sync via ko-sync.js. Backups are JSON exports. Data deletion is permanent and instant.
📡
Observability & Health
Deep health checks, D1 metrics, request tracking, GDPR audit, performance