ZenithFlow
All-in-one productivity and wellness platform combining velocity planning with biometric habit analytics.
All-in-one productivity and wellness platform designed to combine velocity planning with biometric habit analytics. Built with tenant-isolated PostgreSQL, Row Level Security, and automated Razorpay subscription webhooks.
The Context
Modern professionals juggle fragmented task managers, habit trackers, and wellness applications, creating cognitive friction and disjointed execution. ZenithFlow unifies sprint-based velocity planning with biometric habit analytics into a single responsive SaaS ecosystem.
Core Constraints & Failure Modes
Synchronizing real-time habit tracking and asynchronous subscription billing requires strict transaction safety. Subscription renewals, cancellations, and tier upgrades must reconcile idempotently with payment provider webhooks without race conditions or access leakage.
Architectural Solution
We engineered a production Next.js application backed by Supabase Auth and tenant-isolated PostgreSQL with Row Level Security (RLS). A secure Razorpay webhook processing pipeline verifies cryptographic signatures, processes subscription lifecycle events idempotently, and updates subscriber tier entitlements in real time.
Verified Scope & Lifecycle Boundaries
Strict truth in engineering: we clearly separate what is functional in code, what is bounded by prototype scope, and what represents future architectural roadmap.
- Production Next.js application with modular responsive dashboard
- Supabase Auth integration for secure user onboarding and session management
- Razorpay webhook pipeline with HMAC-SHA256 signature verification
- PostgreSQL database with Row Level Security (RLS) guaranteeing tenant isolation
- Real-time habit tracking and velocity metric synchronization
- Automated subscription tier provisioning and renewal lifecycle handling
- Production SaaS deployed on Vercel and Supabase cloud infrastructure
- Active payment gateway configured for subscription billing
- Native mobile companion application using React Native
- HealthKit and Google Fit biometric API sync adapters
- Team workspace federation for cross-organizational velocity boards
System Topology & Component Decomposition
Next.js application, Supabase Auth session validation, Razorpay subscription webhook listener, tenant-isolated PostgreSQL with Row Level Security (RLS).
Subscription Webhook Engine
Next.js Route Handlers / Razorpay SDKVerifies Razorpay HMAC signatures, processes recurring billing events idempotently, and provisions tenant tier flags.
Tenant-Isolated Data Core
PostgreSQL / Supabase RLSEnforces PostgreSQL Row Level Security policies ensuring strict isolation between user workspaces.
Velocity Analytics Canvas
React / Tailwind CSS / RechartsRenders real-time habit completion metrics, sprint burn-down rates, and productivity scores.
Critical Architectural Choices
Row Level Security Over Application-Layer Filtering
Relying solely on ORM where-clauses for tenant isolation risks catastrophic data leakage if an endpoint omits a filter.
PostgreSQL RLS policies enforce isolation directly at the database engine level across every query.
Idempotent Webhook Processing
Payment gateways occasionally retry webhooks on transient network blips, risking double-provisioning or duplicated invoices.
Implemented transactional event deduplication keys to ensure every webhook payload executes exactly once.
Complete Technology Stack
Interested in deploying a similar architecture or commissioning a custom digital engineering engagement based on this system pattern?