Complete workflows for all personas in the Solomon application
User navigates to /auth and creates an account or signs in with existing credentials. On successful authentication, redirected to /dashboard.
First-time users must accept terms at /terms before accessing the dashboard.
User completes their profile at /profile β church role, denomination, age, marital status, years in faith, spiritual disciplines, prayer preference, counseling goals, theological influences, and TTS voice preference.
From /dashboard, user clicks to create a new session. On /session/new, chooses Individual mode. System generates a session ID and per-session AES-256-GCM encryption key.
At /session/:id, user engages in conversation with Solomon AI. All messages are encrypted before writing to Firestore. Solomon responds with Reformed biblical counsel, one open-ended question per response.
If ttsEnabled: true in profile, a speaker button appears on each AI message bubble. Clicking it streams ElevenLabs TTS via the synthesizeSpeech Cloud Function. Four voices available: female/male American and British. Audio is cached client-side per message so replaying the same message does not make additional ElevenLabs requests. If the ElevenLabs usage limit is reached, a dismissible error banner is shown in the chat input area.
User closes the session, triggering an AI-generated summary. Session becomes read-only. Summary and transcript available at /session/:id/summary.
Creator selects Couples mode on /session/new and enters their partner's email address. System creates the session and generates an invite token (7-day expiry).
Partner receives an email with a link to /invite/:token. If they already have an account, they click Accept. If new, they sign up and auto-join the session.
Both participants chat with Solomon. Messages are labeled with each partner's name ([Name]: prefix). Solomon maintains strict impartiality, pursuing mutual responsibility and genuine reconciliation.
At /counselor, the counselor views assigned counselees and manages their subscription status.
At /counselor/session/:id, the counselor sees a read-only tab view of the counselee's AI conversation, plus a direct messaging tab and an annotation tab.
Annotations: Pastoral notes threaded on specific AI messages, encrypted, and injected into Solomon's context on the next user message. Guided Prompts: Counselor seeds prompt cards that appear for the counselee at session open.
A speaker button on each AI message bubble (visible only when ttsEnabled: true in user profile). Uses ElevenLabs streaming via the synthesizeSpeech Cloud Function.
Technical: Sentence splitting with a rolling prefetch window (2 sentences ahead). iOS uses a persistent <video> element with play-unlock on user gesture. Audio blobs are cached client-side keyed by messageId|voice β replaying the same message reuses cached audio without additional ElevenLabs API calls.
Error handling: If ElevenLabs returns a quota_exceeded error, the synthesizeSpeech function returns a structured JSON error ({ error, reason: "quota_exceeded" }). The client (TtsService) detects this, sets a ttsError signal, and displays a dismissible banner in the chat UI explaining that voice readback is temporarily unavailable.
| Route | Component | Access |
|---|---|---|
/auth |
AuthComponent | Public |
/terms |
TermsComponent | Public |
/invite/:token |
CoupleInviteComponent | Public |
/dashboard |
DashboardComponent | Auth |
/profile |
ProfileComponent | Auth |
/session/new |
NewSessionComponent | Auth |
/session/:id |
ChatComponent | Auth |
/session/:id/summary |
SessionSummaryComponent | Auth |
/counselor |
CounselorDashboardComponent | Counselor |
/counselor/profile |
CounselorProfileComponent | Counselor |
/counselor/pricing |
CounselorPricingComponent | Counselor |
/counselor/session/:id |
ChatComponent | Counselor |
/admin/users |
UserListComponent | Admin |
SessionService.createSession() generates a session ID and a per-session AES-256-GCM encryption key stored in sessionKeys.
User/couple chats with Solomon. Every message is encrypted before Firestore write. Counselor can view, annotate, and send direct messages.
SessionService.closeSession() generates an AI summary, locks the session to read-only.
Only the session creator can delete. Removes all chatMessages and the session encryption key. Permanent, no recovery.