pwE (Pray With Me) is a premium digital companion and private sanctuary for the practice of Lectio Divina (Prayerful Reading), built in strict adherence to Catholic Doctrine, the 73-book Biblical Canon, and an official copyright licensing agreement with Edições CNBB (ADR 0079). Live in global production on the Google Play Store (177 countries, official Go-Live on November 2, 2026) and on the Web (pwe.jhhsolutions.dev/app), the project serves as my flagship showcase of advanced cross-platform software engineering (Android, iOS, and Web): a Flutter 3.50.0 / Dart 3.14.0 ecosystem combining modular Clean Architecture, On-Device Artificial Intelligence (Gemma 4 via LiteRT-LM with native token streaming), Dual AI with On-Device RAG (TFLite/MiniLM), Zero-Knowledge Security (AES-256-GCM) & Zero-Key Cloud Proxy (Cloud Run + App Check), 0 ms True Local-First offline boot, a single pure-Dart liturgical engine shared with Cloud Run Jobs + GCS Static CDN (>98% offload) across 18 languages, 360° theological and operational observability (Langfuse OTLP v4 + GA4 GitOps), and engineering governance powered by 18 specialist Google Antigravity AI agents, 16 executable SDD specifications (SPEC-*), and 79 formal ADRs.
Architecture & Software Engineering
- Bleeding-Edge Platform (
Flutter 3.50.0&Dart 3.14.0): Coordinated platform upgrade achieving zero outdated packages (flutter pub outdated), hardened Android native toolchain (Gradle 9.5.0, AGP 9.3.1, Kotlin 2.4.20, andcompileSdk = maxOf(flutter.compileSdkVersion, 37)), authentication migrated togoogle_sign_in ^7.2.0over Credential Manager API (Android) and GIDSignIn 9 (iOS) with idempotent initialization and OIDCidToken, alongside FlutterFire v7 and RevenueCat v11. - Clean Architecture + Modular DDD at Scale (
513.dartfiles inlib/): Strict boundary isolation between an agnosticlib/core/, a pure Domain layer (zero dependencies on UI, Flutter, or Firebase), 56+ UseCases, typed Repositories, and a de-monolithized Presentation Layer (ADR 0073). Each of the 8 features (auth,lectio_divina,onboarding,profile,recollection,preferences,subscription,support) and thesecurity_vaultmodule manages its own isolated dependency injection container (GetIt), preventing cross-domain leakage (ADR 0004 and ADR 0032). - Complete 16-BLoC Decomposition (ADRs 0015 & 0027): Architectural evolution featuring the permanent removal of the legacy monolithic BLoC and decomposition of the prayer journey into 10 cohesive, decoupled Sub-BLoCs (
LectioSessionBloc,DailyLiturgyBloc,ExegesisBloc,PrayerJournalBloc,AiOratioBloc,PassageDiscoveryBloc,ModelDownloadBloc, among others), enforcing immutable state transitions viaEquatableand eliminating UI race conditions. 0 msTrue Local-First Cold Start & Interior Recollection Mode (ADRs 0060 & 0062): Deterministic offline-resilient startup backed by a network circuit breaker, transactional offline outbox, and 22 bundled.ttfsacred fonts. At the native OS layer, Interior Recollection Mode (Mt 6:6) integrates Android 15+AutomaticZenRule/ZenPolicyand iOS 16+ Focus Filters with a 4-layer Zero-Orphaned-DND safety protocol so system notifications are reliably restored even after abrupt app termination.- 100% SDD + TDD Governance & Autonomous Runtime Validation (ADRs 0034, 0050 & 0064): Governed by 18 specialist AI agents and 16 executable
SPEC-*contracts, featuring theperf-validatorsubagent performing live runtime inspection via Marionette and Dart MCP on physical hardware (validated on Android 16/17 with PSS memory profiling and zero runtime errors). - Reactive Routing & Functional Error Handling: Powered by
GoRouteracross 16 declarative sacred routes, single-door Progressive Visio Divina Onboarding (A1 → A2, ADR 0067), and strict functional error handling withdartz(Either<Failure, Success>).
Artificial Intelligence & Machine Learning (Edge-First)
The core technical differentiator of pwE is its hybrid AI strategy with privacy by design and audited theological observability:
- Gemma 4 E2B with Native Token Streaming (ADRs 0005 & 0065): Local smartphone inference powered by LiteRT-LM via native Kotlin JNI (Android) and Swift C API (
GemmaInferencePlugin.swifton iOS), real-timeEventChanneltoken streaming, on-device Echoes of Grace synthesis, and Android 14+ compliant background OTA downloads (FOREGROUND_SERVICE_DATA_SYNC) verified with SHA-256 checksums. - Dual AI & On-Device RAG: Long-term spiritual memory generating vector embeddings 100% on-device via TFLite (
all-MiniLM-L6-v2, 384 dimensions), native WordPiece tokenization (BertTokenManager), and adaptive Mean Pooling — with zero private spiritual notes ever leaving the device. - Gemini Staircase, Langfuse OTLP v4 & Dogmatic LLM Eval (ADRs 0046 & 0065): Resilient cloud fallback parameterized via Zero-Public-URL Firebase Remote Config (
14/14versioned prompts), Smart Retry, and an automated 30-scenario Dogmatic Eval suite across the 73-book Catholic Canon — sustaining a100.0%theological orthodoxy score in production. - Transparency, Explicit Consent & Fading Scaffolding (ADRs 0025, 0033 & 0035): Visual Golden Shield indicator for 100% local inference, strict explicit opt-in prior to cloud calls, native "Flag this passage" reporting aligned with Google Play's Generative AI policy, and adaptive verbosity reduction (Beginner → Practitioner → Contemplative).
- Two-Column Biblical OCR (ADR 0065): Offline digitization using Google ML Kit Vision, native Canvas adaptive binarization, geometric two-column page reconstruction, and lexical correction.
Zero-Knowledge Security, Zero-Key Proxy & Official CNBB Licensing
- Zero-Key Cloud Run Proxy + Firebase App Check (ADR 0072): Complete elimination of client-side AI API secrets; all cloud inference requests route through a dedicated serverless Cloud Run proxy verified with Firebase App Check tokens and strict Firestore allowlist rules.
- AES-256-GCM Rest Encryption & Zero-Loss Account Linking (ADRs 0026, 0029, 0032 & 0076): Entries in the Spiritual Notebook are encrypted at rest in Hive and per-field in Cloud Firestore using AES-256-GCM, 96-bit random IVs, PBKDF2 key derivation, Android Keystore / iOS Keychain anchoring, an optional passphrase vault (
wrapped:v3), and Zero-Loss late linking of guest sessions — protecting 190+ active production vaults. - Official Edições CNBB Licensing &
AndroidManifestHygiene (ADRs 0042, 0043, 0057 & 0079): Formal copyright licensing contract signed with the National Conference of Bishops of Brazil (CNBB) featuring adaptive monochrome official branding (CanonicalCreditFooter), explicittools:node="remove"stripping of transitive permissions (AD_ID,READ_PHONE_STATE,STORAGE), dynamic runtimeFLAG_SECURE(ADR 0044), and cryptographic purging atdelete-account.
Cloud-Native Infrastructure, Shared Pure-Dart Engine & Live Day-2 Operations
- Shared Pure-Dart Liturgical Engine & 18-Language GCS Static CDN (ADRs 0041, 0047, 0069 & 0074): Shares a single canonical pure-Dart engine (
package:pwe/core/liturgy/liturgical_engine.dart) between the Flutter app and the AOT-compiled native worker (FROM dart:3.14.0-sdk) on Cloud Run Jobs, publishing static JSONs, precomputed sacred audio, and WebP Sacred Icons (Veni Creator) to GCS Static CDN, keeping live production consumption at just4.11%of Firestore's daily free-tier read quota ($0/monthinfrastructure bill). - Pastoral Communion ("Pray With All") & Ethical PPP Across 174 Regions (ADRs 0009, 0048, 0056 & 0078): Manages Mission Friends via native RevenueCat SDK v11 + Web Billing REST v1, canonical Pray With All / Integrated Journey vocabulary enforced by automated static guards, and
pwe_monetization_sync.dartprovisioning 54 localized listings (3 plans × 18 languages) across 174 countries using PPP and a 30-dayprepaidBasePlanType. - Zero-CI CLI Tooling, 360° Monitor (5-Act MECE) & Privacy-First Attribution (ADRs 0049, 0051, 0063, 0077 &
v1.0.56): tool/pwe_local_deploy.dart: Builds obfuscated.aabbundles, uploads Crashlytics symbols, and publishes via native RS256 JWT directly to the Google Play Android Publisher API v3 in ~3 minutes at zero CI cost;tool/pwe_production_monitor.dart&tool/pwe_ga4_admin_sync.dart:$0/month360° executive monitor in 5 MECE Acts withO(Δ)delta sync, 3-layer internal bench segregation (Firestore, GA4, and RevenueCat v2), declarative GA4 GitOps provisioning (33 Custom Dimensions, 6 Custom Metrics, 10 Key Events, 9 Audiences), and cookie-free campaign attribution (UTM+ Play Install Referrer);tool/sync_showcase.dart(ADR 0051): Strict Allowlist orchestrator (guarded by a 16-rule Redaction Engine + 13-pattern Security Leak Scanner) syncing the publicpwe-architecture-showcaserepository, exposing ADRs, 8 C4/Mermaid specs, 18-agent governance, and 20 real Clean Code Slices (*.dart+*_test.dart) across 5 domains.
Quality, Real Production Telemetry & Internationalization
- 1,778+ automated tests across 260 test suites (
*_test.dart), featuring deterministic global preloading of all 22 static fonts intest/flutter_test_config.darton Flutter 3.50, validated across a 6-viewport canonical matrix (360×640to1920×1080) withTextScalerup to2.0xand8.10:1WCAG AA contrast. - Live Global Production Telemetry (
Nov 2, 2026+):99.07%organic Crash-Free Sessions, zero Crash/ANR alerts in Google Play Android Vitals,5.0 ★store rating, 440+ active users across 18+ countries and 37+ distinct physical Android models, averaging17.2 minof engaged time per user (70.0%engaged rate). - Deterministic 18-Language Internationalization (
ADR 0068): 1,013+ audited ARB keys per catalog (ar,de,en,es,fr,hi,it,ja,ko,la,nl,pl,pt,sw,tl,uk,vi,zh), bundled withenableSplit = falseandlocales_config.xmlfor instant in-app switching without Play Feature Delivery split loss.
Status: Version 1.0.56+232 (211+ releases) — Live in global production on the Google Play Store (177 countries, 5.0 ★ rating and 99.07% Crash-Free), Public Web App (pwe.jhhsolutions.dev/app), and Public GitHub Showcase (github.com/evslopes/pwe-architecture-showcase), featuring official Edições CNBB licensing, 260 test suites (1,778+ tests), 79 formal ADRs, 16 executable SDD specs, and 18 Antigravity specialist agents (November 2026).