🏗️ Tech Stack & Architecture

Solomon — AI-powered biblical counseling — authoritative technical reference

← Back to Documentation Hub
Last updated: 2026-03-10

Tech Stack

Angular 19.2 TypeScript 5.8 Firebase 11 @angular/fire 19.2 Node.js 20 RxJS 7.8 Claude Sonnet (AI) Capacitor 8 (iOS) Stripe (Subscriptions) GitHub Actions + WIF
LayerTechnology
FrameworkAngular 19.2 (standalone components, no NgModules)
LanguageTypeScript 5.8, SCSS
BackendFirebase 11 (Auth, Firestore, Hosting, Functions, Storage)
Angular/Firebase@angular/fire 19.2
AI@anthropic-ai/sdk via Cloud Functions (claude-sonnet-4-6)
MobileCapacitor 8 (iOS — keyboard, status bar plugins)
PDF ExportjsPDF 2.5
Document Exportdocx 9.6
Markdownmarked 17
PaymentsStripe (counselor subscriptions, via Cloud Functions)
StateRxJS 7.8 (no NgRx)
TestingKarma/Jasmine (unit)
CI/CDGitHub Actions + Workload Identity Federation
RuntimeNode.js 20

Architecture

Routing

Lazy-loaded routes. Guards: authGuard (session/dashboard routes), noAuthGuard (/auth and /invite/:token), adminGuard, counselorGuard.

State Management

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.

Key Services

ServiceResponsibility
AuthServiceSign-in/up, user profiles, session management
SessionServiceCounseling session CRUD, individual and couples modes
MessageServiceMessage retrieval, sequence ordering
AiServiceWraps Cloud Function chat for AI counseling conversations
UserServiceUser profile management, profile context for AI
CounselorServiceCounselor profiles, annotations, assignment
InviteServiceCouples invite tokens, partner connection workflow
ApplicationServiceCounselor application and approval flow
SubscriptionServiceStripe subscription management for counselors
EncryptionServiceAES-256-GCM encrypt/decrypt for stored messages
PdfExportServicejsPDF-based session export

Project Structure

/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)

Counseling Modes

ModeDescription
IndividualSingle user + Solomon AI counselor
CouplesTwo 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.

Firestore Collections

CollectionPurpose
usersUser profiles (church role, age, marital status, spiritual disciplines, counseling goals)
sessionsCounseling sessions (mode, status, participants, counselor assignment)
messagesEncrypted session messages (AES-256-GCM, sequence-ordered)
counselorsCounselor profiles, credentials, availability
counselorApplicationsApplication submissions and approval status
counselorAnnotationsPastoral notes/guidance injected into AI context
invitesCouples invite tokens for partner connection
guidedPromptsCounselor-created prompt cards for structured guidance
subscriptionsStripe subscription state per counselor

Security: Messages encrypted at application layer (AES-256-GCM) before Firestore write. Decryption only in Cloud Functions and client.

Core Features

Safety Pre-Flight: Every message is checked for crisis keywords (suicide, self-harm) and abuse keywords before any AI response. Matches trigger automatic hotline responses (988, Crisis Text Line, National DV Hotline) — Anthropic is never called.

Firebase Configuration

SettingValue
Project IDsolomon-3ead2
App sitehttps://solomon-3ead2.web.app
Docs sitehttps://solomon-docs.web.app
Hosting targetsapp (Angular SPA), docs (this site)
AuthEmail/password
Functions runtimeNode.js 20
Service accountfirebase-adminsdk-fbsvc@solomon-3ead2.iam.gserviceaccount.com

Cloud Function: chat

CI/CD Pipeline

5-job workflow on push to main (skipped if [skip ci] in commit message):

version
build
deploy
release-notes
create-release
JobWhat it does
versionSemantic versioning from conventional commits
buildNode 20, npm install, npm run build:prod
deployfirebase deploy --only hosting,firestore,functions via WIF auth
release-notesAI-generated via Claude API (grep fallback)
create-releaseGit tag + GitHub Release

AI-Powered Release Notes

The release-notes job calls the Anthropic API directly via curl to generate human-readable release notes from the commit log:

PropertyValue
Modelclaude-sonnet-4-6
InputConventional commit log for the release (feat:, fix:, perf:, docs:, refactor:)
OutputCategorized markdown: Features, Bug Fixes, Performance, Documentation, Refactoring
FallbackShell grep/sed pipeline renders the same section structure if API call fails
SecretANTHROPIC_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.

Claude Code as Development Assistant

Beyond CI automation, Claude Code (Anthropic's AI coding assistant) is used interactively throughout development:

Claude 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.

Local Development

npx ng serve --configuration production --port 4202
# App: http://localhost:4202

With Firebase Emulators

firebase emulators:start
# Emulator UI: http://localhost:4000

Key File Reference

FilePurpose
package.jsonDependencies + npm scripts
angular.jsonBuild config, lazy loading, budget limits
firebase.jsonHosting targets, Firestore/Storage config, emulator setup
firestore.rulesFirestore security rules
storage.rulesFirebase Storage security rules
src/main.tsBootstrap with Firebase providers
src/app/app.routes.tsRoute definitions with lazy loading
functions/src/index.tschat Cloud Function and Stripe handlers
.github/workflows/deploy-and-release.ymlMain CI/CD pipeline
docs/Static docs site (Solomon hub, architecture)
AGENTS.mdAI assistant guide (universal)
CLAUDE.mdClaude Code-specific workflow