Solomon β AI-powered biblical counseling β authoritative technical reference
Last updated: 2026-03-10| Layer | Technology |
|---|---|
| Framework | Angular 19.2 (standalone components, no NgModules) |
| Language | TypeScript 5.8, SCSS |
| Backend | Firebase 11 (Auth, Firestore, Hosting, Functions, Storage) |
| Angular/Firebase | @angular/fire 19.2 |
| AI | @anthropic-ai/sdk via Cloud Functions (claude-sonnet-4-6) |
| Mobile | Capacitor 8 (iOS β keyboard, status bar plugins) |
| PDF Export | jsPDF 2.5 |
| Document Export | docx 9.6 |
| Markdown | marked 17 |
| Payments | Stripe (counselor subscriptions, via Cloud Functions) |
| State | RxJS 7.8 (no NgRx) |
| Testing | Karma/Jasmine (unit) |
| CI/CD | GitHub Actions + Workload Identity Federation |
| Runtime | Node.js 20 |
Lazy-loaded routes. Guards: authGuard (session/dashboard routes), noAuthGuard (/auth and /invite/:token), adminGuard, counselorGuard.
RxJS observables + Firestore as single source of truth. Services are providedIn: 'root' singletons. All messages encrypted at application layer (AES-256-GCM) before Firestore write.
| Service | Responsibility |
|---|---|
AuthService | Sign-in/up, user profiles, session management |
SessionService | Counseling session CRUD, individual and couples modes |
MessageService | Message retrieval, sequence ordering |
AiService | Wraps Cloud Function chat for AI counseling conversations |
UserService | User profile management, profile context for AI |
CounselorService | Counselor profiles, annotations, assignment |
InviteService | Couples invite tokens, partner connection workflow |
ApplicationService | Counselor application and approval flow |
SubscriptionService | Stripe subscription management for counselors |
EncryptionService | AES-256-GCM encrypt/decrypt for stored messages |
TtsService | ElevenLabs TTS streaming, voice selection, quota-exceeded error signal |
PdfExportService | jsPDF-based session export |
/solomon/ βββ src/app/ β βββ components/ β β βββ auth/ # Sign-in, sign-up, password reset β β βββ counselor/ # Counselor dashboard, annotations, management β β βββ terms/ # Terms of service β β βββ admin/ # Admin panel β β βββ dashboard/ # User dashboard β β βββ profile/ # User profile management β β βββ session/ # Chat/counseling session UI β βββ services/ # 12 core services β βββ models/ # 10 data models β βββ guards/ # authGuard, adminGuard, counselorGuard β βββ app.routes.ts # Lazy-loaded routes βββ functions/src/index.ts # AI counseling Cloud Functions βββ firebase.json # Hosting targets (app + docs)
| Mode | Description |
|---|---|
| Individual | Single user + Solomon AI counselor |
| Couples | Two users sharing a session; Solomon addresses each partner by name with speaker-labeled messages |
Both modes support counselor assignment (licensed counselor can view sessions, add annotations), guided prompt injection, and full encrypted session history.
| Collection | Purpose |
|---|---|
users | User profiles (church role, age, marital status, spiritual disciplines, counseling goals) |
sessions | Counseling sessions (mode, status, participants, counselor assignment) |
messages | Encrypted session messages (AES-256-GCM, sequence-ordered) |
counselors | Counselor profiles, credentials, availability |
counselorApplications | Application submissions and approval status |
counselorAnnotations | Pastoral notes/guidance injected into AI context |
invites | Couples invite tokens for partner connection |
guidedPrompts | Counselor-created prompt cards for structured guidance |
subscriptions | Stripe subscription state per counselor |
Security: Messages encrypted at application layer (AES-256-GCM) before Firestore write. Decryption only in Cloud Functions and client.
| Setting | Value |
|---|---|
| Project ID | solomon-3ead2 |
| App site | https://solomon-3ead2.web.app |
| Docs site | https://solomon-docs.web.app |
| Hosting targets | app (Angular SPA), docs (this site) |
| Auth | Email/password |
| Functions runtime | Node.js 20 |
| Service account | firebase-adminsdk-fbsvc@solomon-3ead2.iam.gserviceaccount.com |
chatfunctions/src/index.ts)sessionId, userMessage, mode (individual/couples), userIdclaude-sonnet-4-6 as primary model with Reformed theology system promptclaude-haiku-4-5-20251001 (less likely to trigger infrastructure-level filters on biblical imagery); if the fallback also fails, surfaces a user-friendly invalid-argument HttpsErrorresource-exhausted HttpsError with a user-friendly messageunavailable HttpsError immediately (no retry)synthesizeSpeechquota_exceeded and returns a structured { error, reason } JSON response (HTTP 502) instead of a plain text errorTtsService) reads reason and sets a ttsError signal, displayed as a dismissible banner in the chat UI5-job workflow on push to main (skipped if [skip ci] in commit message):
| Job | What it does |
|---|---|
version | Semantic versioning from conventional commits |
build | Node 20, npm install, npm run build:prod |
deploy | firebase deploy --only hosting,firestore,functions via WIF auth |
release-notes | AI-generated via Claude API (grep fallback) |
create-release | Git tag + GitHub Release |
The release-notes job calls the Anthropic API directly via curl to generate human-readable release notes from the commit log:
| Property | Value |
|---|---|
| Model | claude-sonnet-4-6 |
| Input | Conventional commit log for the release (feat:, fix:, perf:, docs:, refactor:) |
| Output | Categorized markdown: Features, Bug Fixes, Performance, Documentation, Refactoring |
| Fallback | Shell grep/sed pipeline renders the same section structure if API call fails |
| Secret | ANTHROPIC_API_KEY GitHub Actions secret β CI only, never deployed to runtime |
The final release notes are written to release-notes.md and passed to gh release create in the create-release job.
Beyond CI automation, Claude Code (Anthropic's AI coding assistant) is used interactively throughout development:
feat:, fix:, docs:, etc.), ensuring consistent style and accurate version bumpingClaude Code is configured via CLAUDE.md (Claude Code-specific instructions) and AGENTS.md (universal AI assistant instructions shared with other tools like Copilot and Cursor).
Key settings: npm install (not npm ci), NODE_TLS_REJECT_UNAUTHORIZED=0, Firebase Tools pinned to v13.15.2, WIF authentication.
npx ng serve --configuration production --port 4202 # App: http://localhost:4202
firebase emulators:start # Emulator UI: http://localhost:4000
| File | Purpose |
|---|---|
package.json | Dependencies + npm scripts |
angular.json | Build config, lazy loading, budget limits |
firebase.json | Hosting targets, Firestore/Storage config, emulator setup |
firestore.rules | Firestore security rules |
storage.rules | Firebase Storage security rules |
src/main.ts | Bootstrap with Firebase providers |
src/app/app.routes.ts | Route definitions with lazy loading |
functions/src/index.ts | chat and synthesizeSpeech Cloud Functions and Stripe handlers |
.github/workflows/deploy-and-release.yml | Main CI/CD pipeline |
docs/ | Static docs site (Solomon hub, architecture) |
AGENTS.md | AI assistant guide (universal) |
CLAUDE.md | Claude Code-specific workflow |