Users by Week
Avg. Symptom Scores by Week
Recent Signups
Course Metrics
System Health
About this page
Purpose: Manage all registered users — view profile and progress, grant or revoke access, impersonate for support, and bulk-delete test accounts.
How to use:
- Search by name or email; sort columns by clicking headers; filter by status if needed.
- Click a row to open the user detail panel (week, language, problems, payment, audit history).
- Use Create User to onboard staff or test accounts; Export CSV for offline review.
- Impersonation mints a 60-minute session — use only when troubleshooting a specific user issue.
Next: Sensitive actions (impersonation, access grants, deletes) appear in Audit Log — check there to confirm an action was recorded.
| Name | Role | Week | Language | Status | Access | Joined | Last Active | ||
|---|---|---|---|---|---|---|---|---|---|
About this page
Purpose: Review new Stripe and iCount orders, failed/refunded states, receipts, refunds, billing changes, and manual follow-up work.
How to use:
- Filter by processor or status, then click an order to open the timeline and action panel.
- Stripe refunds and subscription changes are automated when Stripe has the needed IDs.
- iCount actions are guarded: Diana automates document email, document refund, and recurring billing only when the stored iCount IDs allow it; otherwise the order is marked manual review.
Next: Use Audit Log for broader admin history; order-specific actions are preserved in each order timeline.
Monthly Charts
Revenue
Paid Active Users
Unpaid Active Users
Refunds
Cancellations
Unpaid-to-Paid Conversion
iCount Automation Health
| Order | User | Processor | Status | Plan | Amount | Created |
|---|---|---|---|---|---|---|
Order Detail
Select an order to view actions and timeline.
About this page
Purpose: Track unhandled exceptions, API failures, and other system errors logged by the chatbot, with stack traces and severity.
How to use:
- Triage by severity — Critical first, then Unresolved.
- Open an entry to view stack trace, request context, and the user (if any) affected.
- Mark errors resolved once fixed; add a brief resolution note for future reference.
Next: Recurring errors that affect users may also appear in Warnings (when chat safety rules trip) or Feedback (when users report them) — cross-check before closing.
| Time | Type | Severity | Endpoint | Message | Status | Actions |
|---|---|---|---|---|---|---|
About this page
Purpose: Review safety and policy warnings that the content monitor surfaced during conversations — crisis keywords, off-protocol questions, age issues, and similar flags.
How to use:
- Start with Unreviewed — these need a human decision.
- Open a warning to see the full message context and the rule that fired.
- Mark reviewed once you've taken action (no action needed, contacted user, escalated, etc.).
Next: If a warning reflects a real bug, file it under Errors; if a user complaint, capture in Feedback; if it surfaced via direct user message, reply via Questions.
| Time | User | Type | Severity | Description | Status | Actions |
|---|---|---|---|---|---|---|
About this page
Purpose: Inbox for bug reports, feature requests, and other free-form feedback users sent to Diana via the chat interface.
How to use:
- Filter by category (bug / feature / other) and status (pending / reviewed / closed).
- Open an item to see the full message and the user who sent it; reply or mark resolved.
- Aim to keep Pending empty — even a brief acknowledgement keeps users engaged.
Next: If feedback is actually a question, move it to Questions; if it points at a system failure, file under Errors.
| Date | User | Title | Type | Source | Status | Actions |
|---|---|---|---|---|---|---|
About this page
Purpose: Direct user-to-admin Q&A inbox — questions Diana couldn't or shouldn't answer (clinical edge cases, billing, etc.) routed to a human.
How to use:
- Set the Notification Email so new questions ping you outside the dashboard.
- Filter by Unanswered first; aim for low average response time.
- Open a question to see the full conversation context, then post your reply — the user sees it in their next chat session.
Next: If the question reveals a bug or pattern, log it in Feedback or Errors; if it's a safety concern, check Warnings first.
| Date | User | Week | Question | Status | Actions |
|---|---|---|---|---|---|
About this page
Purpose: Browse and search every conversation users have had with Diana — for QA, content tuning, and tracking how the bot handles real cases.
How to use:
- Search by user, filter by date, duration, or sentiment to spot outliers.
- Open a conversation to read the full transcript with role indicators (user / Diana / system).
- Use sentiment dips and long sessions as candidates for prompt or content fixes.
Next: If a conversation reveals a recurring bot failure, file it in Errors; a safety concern → Warnings; a content gap → fix in Lessons.
| Date | User | Week | Messages | Last Activity | Actions |
|---|---|---|---|---|---|
About this page
Purpose: Edit the source CBT lesson content (English & Hebrew) that Diana streams to users — text, topic markers, and inline images.
How to use:
- Pick a language and a week; edit text directly. Use
<img>tags on their own line to embed diagrams (place files understatic/images/lessons/). - Save changes here, then run
scripts/structure_lessons.pyfrom the backend to regeneratestructured_lessons.json, and restart the server. - Respect chunk boundaries — Diana delivers 3 paragraphs per chunk and never splits across topic markers.
Next: Use Chat History to spot-check how live users experience your edits; cross-reference exercises in Exercise Definitions.
About this page
Purpose: Configure which video lessons Diana shows to users on video learning mode — week-by-week mapping with EN/HE variants.
How to use:
- Pick a language and edit the video URL / metadata for each week + lesson slot.
- Save changes — they apply immediately to users in video mode.
- Empty slots = no video for that lesson (users in video mode will be told to switch back to chat).
Next: Users can switch their preference between chat and video at any time; check Users to see who is on video mode.
Video Lessons Configuration
About this page
Purpose: Edit the 10-question symptom survey users complete on intake, weekly, and at course completion (scored 0–40, lower is better).
How to use:
- Pick a language; edit each question and its 5 response options (0–4 scoring).
- Save — changes affect new submissions only; historical responses remain anchored to the version they were taken under.
- Keep EN/HE in sync — users see whichever matches their detected language.
Next: Per-user scores are visible in Users; aggregate trends in the Overview KPIs.
About this page
Purpose: Define the practice exercises Diana guides users through each week — title, instructions, prompts, and example wording.
How to use:
- Pick a language and a week; edit each exercise definition.
- Be precise: Diana's prompt builder reads these directly when guiding users.
- Reminder: during exposure weeks (6+) never include relaxation, breathing, or cognitive-challenging language — exposure goal is to tolerate distress.
Next: Edits flow through to the user-facing Exercises screen and the chat practice flow; cross-check related Lessons content stays consistent.
About this page
Purpose: Read-only HIPAA 164.312(b) audit trail of administrative actions — logins, impersonations, access grants, deletes, content edits, and configuration changes.
How to use:
- Filter by event type or actor to narrow the timeline.
- Open an entry to see the full payload (before / after, IP, user agent).
- Use this page to verify any sensitive action was recorded — required during compliance reviews.
Note: Entries here cannot be edited or deleted; this is the system's source of truth for "who did what, when".
| Time | Event | App | Actor | IP | Target User | Description | Details |
|---|---|---|---|---|---|---|---|
About this page
Purpose: Configure system-level settings: dashboard branding, Text-to-Speech, email provider, HIPAA / SOC 2 controls, API keys, and webhooks.
How to use:
- Each card below is independently collapsible — click a card header to expand it.
- Changes save per card via the card's own Save button — there is no global "save all".
- Treat API keys as secrets; the audit log records every read and update.
Note: SECRET_KEY and ENCRYPTION_KEY are shared with the marketing engine — never rotate them on only one app or you will break cross-app login and PHI decryption.
Dashboard Customization
Click to expand
Text-to-Speech (ElevenLabs)
Not configured
Email Verification (Clearout)
Disabled
Verifies email addresses during registration to block invalid and disposable emails. Uses 1 credit per verification.
HIPAA/SOC2 Compliance
In Progress
Security hardening plan for HIPAA-level compliance. Reference: security-compliance-plan.md
Phase 1 — Immediate
| Item | Status | Date | Details |
|---|---|---|---|
| 1.1 Password Hashing | Done | 2026-03-08 | SHA256 → bcrypt with auto-upgrade on login. Min 8-char passwords with EN/HE errors. |
| 1.2 JWT Secret Key | Done | 2026-03-08 | 256-bit key via openssl rand -hex 32. Both .env files updated. |
| 1.3 Rate Limiting | Done | 2026-03-08 | Login 5/min, register 3/min, forgot-pw 3/min, chat 60/min. Both apps. |
| 1.4 Security Headers | Done | 2026-03-08 | X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, HSTS. |
| 1.5 .gitignore Verified | Done | 2026-03-08 | .env excluded, repo is private. |
Phase 2 — Short-term
| Item | Status | Date | Details |
|---|---|---|---|
| 2.1 Audit Logging | Done | 2026-03-08 | 12 event types, both apps, shared table, IP tracking, app_source column. |
| 2.2 Structured Logging | Done | 2026-03-08 | Replaced print() with Python logging module. PII scrubbed from logs. |
| 2.3 CSRF Protection | N/A | 2026-03-08 | Not applicable — app uses Bearer token auth, not cookies. CSRF only affects cookie-based auth. |
| 2.4 Email Provider | In Progress | 2026-03-10 | Dual-provider system (SendGrid + SES) built. SNS bounce/complaint webhook live. SES production access pending AWS approval. Provider switchable in dashboard settings. |
Phase 3 — Medium-term (Month 2)
| Item | Status | Details |
|---|---|---|
| 3.1 Field-Level Encryption | Done | Fernet AES encryption: Message.content, User.problems, SymptomScore.responses. Transparent via TypeDecorators. |
| 3.2 HttpOnly Cookies | Done | HttpOnly + SameSite=Lax cookies. Dual auth: header + cookie. Logout clears cookie. |
| 3.3 Incident Response Plan | Done | incident-response-plan.md: breach procedures, HIPAA/GDPR/FTC timelines, EN+HE templates. |
| 3.4 Data Retention Policy | Done | Cleanup script: error logs 90d, tokens 7d, warnings 1yr, audit 6yr (HIPAA). |
| 3.5 Encrypted Backups | Done | Fernet-encrypted .db.enc backups. --decrypt for restore, --no-encrypt for dev. |
Phase 4 — Long-term (Month 3+)
| Item | Status | Details |
|---|---|---|
| 4.1 Admin 2FA | Done | WebAuthn passkey 2FA for admin. Compatible with Proton Pass, 1Password, YubiKey. |
| 4.2 RBAC | Planned | Role-based access control (user, admin, support, therapist). |
| 4.3 Self-Hosted Fonts | Done | Varela Round woff2 served locally. 23 files updated, zero CDN refs remaining. |
| 4.4 Infrastructure Eval | Done | Vendor BAA assessment documented. Current mitigations acceptable; AWS migration deferred. |
| 4.5 Penetration Testing | Planned | External security firm pen test after Phase 3. |
| 4.6 SOC 2 Type II | Planned | Engage auditor, 6-12 month observation period. TBD. |
Vendor BAA Tracker
| Vendor | Handles PHI? | BAA | Alternative | Solution |
|---|---|---|---|---|
| Anthropic Claude | Yes | No | AWS Bedrock (has BAA) | No PII sent to AI — only first name shared, no email/phone/last name |
| Voyage AI | Yes | No | Self-hosted embeddings | User messages embedded for search — contains health context but no identifiers (FAST_RAG_MODE=true; Voyage AI bypassed as of 3/8/2026) |
| Render | Yes | Organization plan only | AWS/Azure/GCP | Hosts DB + app with user data. BAA available on Render Organization plan — upgrade required for HIPAA compliance. |
| Email Provider | Yes | SendGrid: No | SES: Yes (via BAA) | AWS SES (BAA available), Postmark | Dual-provider system built — currently SendGrid, SES ready when AWS approves production access. Provider selectable in Marketing Dashboard → Settings → Email Provider |
| Stripe | No | N/A | — | Payment data only — no health info sent |
| iCount | No | N/A | — | Payment data only — no health info sent |
| Google Analytics | No* | GA360 only | Self-hosted (Plausible) | Anonymous page views only — no PII or health data |
| Cloudflare | No | No | — | DNS/CDN only — no application data passes through |
Incident Response Plan
Click to expand
Data Retention Policy
Click to expand
Chatbot Instructions
3 files
Edit the instruction files that control Diana's behavior. Changes take effect immediately after saving.
Security: Passkey 2FA
Not configured
Add a passkey (FIDO2/WebAuthn) as a second factor for admin login. After setup, admin login will require both your password and passkey. Works with Proton Pass, hardware keys, and built-in authenticators.
Application
Click to expand
AI Configuration
Click to expand
Geo-Redirect (Israel)
Click to expand
When enabled, visitors from Israel are redirected to cbtisrael.co.il on both the marketing site and the chatbot app. Requires Cloudflare proxy (provides CF-IPCountry header).
Course Settings
Click to expand
Risk & Safety
Safety & Referrals
Click to expand
At-Risk User Safety Rules
Click to expand
These rules are built into Diana's system prompt and control how she handles sensitive situations. Changes require code updates.
- Diana does NOT engage with or validate hallucinatory/delusional content
- Responds with empathy, explains this is beyond a CBT educational tool
- Refers to a clinician (itacbt.co.il for Israel)
- User CAN continue with the course — not blocked unless danger of harm
- Redirects to different examples during exercises
Examples: "I have thoughts of hurting myself", "I've hurt myself in the past", "Sometimes I don't want to go on living"
- Diana asks: "Can you assure me that you will not hurt yourself?"
- If user CONFIRMS safety → acknowledge, recommend professional, allow course to continue
- If user CANNOT guarantee safety → switch to Crisis Mode
Examples: "I want to hurt myself", "I have a plan", "I can't live another day like this"
- Detected by keyword matching (30+ crisis keywords in EN/HE)
- System prompt switches to crisis-only mode automatically
- Provides crisis resources: ERAN (*6363/1201), findahelpline.com, itacbt.co.il
- ALL course content is BLOCKED — no lessons, exercises, or educational material
- De-escalation requires user to contact support@selfhelp.doctor
- Taken seriously — not dismissed or minimized
- Does NOT engage with specifics of any plan
- Provides crisis resources and recommends professional help urgently
- Course content BLOCKED
- User is NOT blocked from the course
- Acknowledged compassionately without judgment
- Course exercises may help with underlying emotional patterns
- Recommends also speaking with a substance use specialist
- Under-18 users are blocked during onboarding (age verification required)
- Anorexia with BMI < 16 referred to specialized treatment
- Diana never proactively asks about depression, self-harm, or suicidal thoughts
- Diana is an educational tool, NOT a therapist — corrects users who call her a therapist
- Medication/diagnosis questions always referred to licensed clinicians