Divinari
Faith-integrated language learning and cultural heritage platform across mobile and web.
01. Problem & Context
Language learning platforms often overlook underserved language communities, particularly those tying cultural identity and spiritual literature together. Divinari addresses this by delivering structured language paths (Tagalog, Cebuano, Ilocano, Hiligaynon, Spanish) with authentic cultural narratives and faith-inspired literature, accessible on both mobile and web.
02. Engineering Solution
Engineered an integrated ecosystem featuring a high-performance cross-platform Flutter application (iOS and Android in active pre-release development), an offline-first local database synchronization engine, an AI-powered conversational tutor powered by the Google Gemini API, and a high-speed static Next.js landing and web presence deployed to Firebase Hosting.
03. System Architecture
The Divinari ecosystem is architected around a unified domain model shared between client and cloud. The mobile app functions with full offline capability using local reactive SQLite storage via Drift, reconciling state asynchronously with Cloud Firestore and custom Cloud Functions upon network connectivity.
Core Architectural Components
Mobile Client (Flutter / Dart)
Cross-platform client delivering 60fps interactive exercises, word-bank quizzes, audio integration, user streak tracking, and local state management via Riverpod.
Offline-First Sync Engine (Drift / SQLite)
Local persistence layer allowing users to complete lessons, record progress, and review flashcards without an internet connection, queued for background reconciliation.
AI Teacher Assistant
Context-aware AI instructional assistant providing real-time grammar feedback, situational dialogue practice, and vocabulary explanations tailored to lesson progress.
Web Platform & Landing (Next.js / TypeScript)
Static-export Next.js web application deployed to Firebase Hosting with sub-second page loads, structured JSON-LD, SEO optimization, and internationalization.
Billing & Lifecycle Infrastructure
Dual-channel monetization integrating Stripe Checkout/Portal for web subscribers and RevenueCat webhooks with server-side reconciliation for mobile in-app subscriptions.
04. Notable Engineering Decisions
Offline-First Local SQLite Architecture
Language learners frequently study during commutes or in low-connectivity areas. Rather than blocking on network calls, lesson state and user progress are written immediately to local Drift/SQLite storage and synchronized asynchronously with optimistic UI updates.
Static Next.js Web Presence with Cloud Functions
Opted for a fully pre-rendered static export (`output: 'export'`) deployed to global Firebase CDN endpoints, paired with dedicated Cloud Functions for webhook ingest and billing workflows, eliminating Node.js server overhead while guaranteeing top Core Web Vitals.
Decoupled Webhook Reconciliation
Designed idempotent Cloud Function handlers for Stripe and RevenueCat events with transactional ledger records, preventing double-entitlements and handling network retry spikes reliably.
05. Engineering Challenges & Solutions
Challenge: Maintaining parity across mobile local state and cloud Firestore documents.
Engineering Solution: Implemented deterministic timestamp-based conflict resolution and local change queues that batch updates when connectivity is restored, ensuring zero lost lesson progress.
Challenge: Sub-second initial page loads across global web visitors.
Engineering Solution: Configured static HTML pre-generation, asset compression, strict cache-control headers, and eliminated client-side render waterfalls.
06. Implementation Highlights
- Cross-platform Flutter application engineered for iOS and Android with 60fps animations
- Local relational database modeling using Drift with automated schema migration tests
- Production Next.js web application deployed to Firebase Hosting with automated CI/CD
- Multi-currency Stripe billing workflows and RevenueCat mobile in-app purchase reconciliation
- Comprehensive test coverage across unit, component, and static parity verification scripts