01 · Context
The problem
Saving consistently is a workflow problem as much as a budgeting problem. DhanSathi brings goals, spending signals and guidance into one product while experimenting with an on-chain path for savings discipline.
02 · Product
How it works
The app uses Next.js for the product surface, Firebase for identity and cloud data, Genkit/Gemini for AI flows, and Algorand Testnet smart contracts for on-chain goals. Supporting flows cover SMS parsing, receipt OCR, payments, government-scheme suggestions and wallet interactions.
Two goal modes: off-chain INR savings and on-chain ALGO savings.
AI flows cover financial advice, goal planning, achievement coaching and goal-specific advice.
Expense intelligence includes SMS parsing, manual cash entries and receipt OCR.
Pera Wallet is used for Algorand Testnet transactions in the on-chain flow.
Razorpay and Twilio are integrated through server-side route handlers.
The repository contains both an AlgoKit workspace and a legacy/reference contract path.
03 · Architecture
The system, broken down
Product layer
Next.js pages and components provide dashboard, goals, analytics, schemes, scan and assistant experiences.
Cloud layer
Firebase Auth, Firestore and Storage handle identity, persisted app data and uploaded assets.
AI layer
Genkit flows call Gemini for financial-advisor, goal-planning, achievement-coach, goal-advice and receipt-analysis workflows.
Blockchain layer
Algorand Testnet smart contracts enforce the on-chain savings path; Pera Wallet connects the user's wallet.
Integration layer
Route handlers cover payments, SMS, receipt uploads and other application APIs.
04 · Flow
A request through the system
Set a goal
A user creates a normal INR goal or chooses the on-chain ALGO path.
Add signals
Transactions can come from goal deposits, parsed SMS, manual cash entries, receipts or payments.
Understand
Analytics and AI flows use the available context to surface spending or goal guidance.
Act
The user deposits, plans, adjusts or connects a wallet depending on the goal workflow.
Progress
Dashboard and goal views keep financial state visible over time.
05 · Engineering
Decisions worth noticing
Off-chain + on-chain
The project does not force every savings goal onto blockchain; it keeps an off-chain path for flexible INR savings.
AI with fallback behavior
The AI assistant includes quota-aware and fallback logic rather than assuming model availability on every request.
Workflow-specific AI
AI is split into multiple flows instead of one catch-all prompt, making the product features easier to reason about.
Testnet-first blockchain
The repository explicitly targets Algorand Testnet, which is appropriate for experimenting with contract-driven product flows.
06 · Proof
From the actual project

Scope note
The case study separates product behavior that is present in code from future-facing possibilities. No usage or financial-outcome metrics are claimed here.