Skip to content
Back to Projects
fullstackLive in Production

Sadhana Chart: Spiritual Habit Tracker & Sangha ERP

11K+ LOC · 21 Routes · Offline-First (Android & iOS)

Production-grade, offline-first spiritual habit tracker and sangha ERP built with Flutter, native Kotlin, and Supabase, featuring Android screen-time forensics, home screen widget synchronization, and dynamic database-driven scoring algorithms.

Google Play Listing
App Store (iOS)Launching Soon
View Source
Sadhana Chart spiritual habit tracker and sangha ERP mobile app preview

Overview & Scope

Sadhana Chart is a cross-platform, offline-first spiritual habit tracker and sangha ERP engineered for the Krishna Consciousness Society (KCS) community, built for both Android and iOS with Flutter, native Kotlin, and Supabase. The platform tracks multi-segment daily spiritual practices across diurnal time slots, sloka memorization, scriptural study, and seva reflections. It features a resilient offline synchronization engine powered by an embedded Hive NoSQL queue and Riverpod state management, guaranteeing zero data loss across fluctuating network conditions. On Android, a custom MethodChannel interfaces with UsageStatsManager and AppOpsManager to provide kernel-level digital screen-time intelligence, classifying 30+ applications into Prajalpa (distractions) vs. Productivity. The system also features an offscreen rasterization pipeline that renders a dynamic, living Tulsi habit streak card and injects it into native Android RemoteViews home screen widgets. Backed by 15 PostgreSQL migrations and 11 relational tables, the backend executes a dynamic 92-point scoring engine, contiguous streak state machines, and cohort oversight with granular Row-Level Security. It also includes an offline Theatre multimedia engine with weekday-aware smart video routing and automated weekly content pack sync.

Key Highlights & Impact

Architected 11,000+ active LOC across 51 Dart source files and 15 PostgreSQL migration scripts for dual Android & iOS targets
Engineered an offline-first sync engine using Hive NoSQL queue and Riverpod, ensuring zero data loss via idempotent sync
Built native Android UsageStatsManager bridge for foreground screen-time intelligence and 5-tier Prajalpa distraction detection
Engineered offscreen Flutter widget rasterization pushing dynamic Tulsi habit streak bitmaps into native Android RemoteViews
Designed dynamic 92-point scoring engine and contiguous streak state machines implemented in PostgreSQL triggers and PL/pgSQL RPCs

Architecture Breakdown

Flutter Client
GoRouter (Stateful Shell), Riverpod Reactive State Management, Material 3, and Phosphor Icons
Native Android & Kotlin
MethodChannel bridge to UsageStatsManager, AppOps, and RemoteViews AppWidget IPC
Native iOS (Darwin)
APNs push notifications, ProMotion 120Hz scrolling, and Apple Background Execution modes
Database & Logic Layer
Supabase (PostgreSQL 15), 11 tables, RLS policies, and PL/pgSQL scoring triggers/RPCs
Edge & Push Pipeline
Deno Edge Functions with FCM v1 OAuth 2.0 service account authentication
Offline Sync & Storage
Hive NoSQL queue with idempotent reconciliation and Supabase Storage chunked media packs

Core Capabilities & Features

  • •Multi-Segment Daily Accounting tracking Japa rounds across 4 diurnal segments, deity offerings, scriptural reading, and seva notes
  • •Resilient Offline-First Data Pipeline caching reports in local Hive storage with automated reconnection flushing and conflict resolution
  • •Digital Screen-Time Forensics bridging Android UsageStatsManager to categorize installed apps into Prajalpa vs. Productivity
  • •Interactive Living Tulsi Plant Home Screen Widget evolving visually from seed to flourishing bush based on daily consistency
  • •Offline Theatre Engine with weekday-aware smart routing, chunked background media sync, and timestamped realization notes
  • •Sangha Mentorship & Cohort ERP allowing mentors to review daily devotee reflections, answer theology inquiries, and log group study
  • •Comprehensive Security & RLS enforcing strict cohort access isolation and input validation constraints across 11 relational tables
  • •Full iOS Target Architecture with Darwin APNs background execution modes, ProMotion 120Hz display, and iPad optimization