Solomon — AI-powered biblical counseling — authoritative technical reference
← Back to Documentation Hub| 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 |
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 with Reformed theology system promptANTHROPIC_API_KEY set via gcloud run services update --update-env-vars5-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 Cloud Function 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 |