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.

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
Architecture Breakdown
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