The Secret Fund Feature Started as a Single User Request — Here's the Whole Story

When you build in public, the most interesting features rarely come from a roadmap document.

They come from unexpected, vulnerable conversations with real users.

Early in FinLedger's development, I believed that a personal finance application should be a single, unified transparent ledger: every rupee you own displayed proudly on a single screen.

Then, during our private beta testing phase, I received an email from a freelance developer that completely challenged my assumptions:

*"I love FinLedger because it's offline and private. But I have a problem: I share my tablet and laptop with my family. When I open FinLedger to log an expense or split a bill with friends, my entire emergency buffer of Rs. 2,00,000 is visible to anyone sitting next to me.

When my relatives see that balance, they assume I have tons of disposable cash and pressure me to fund their vacations or lend them money. I don't want to hide my money from the tax authorities; I want to hide it from daily social view so I can protect my emergency safety net."*

A week later, another beta tester reached out:

"I'm saving up for an anniversary surprise for my spouse. But because we share visibility into our household budget, any deposit I make gives away the surprise immediately. I need a private pocket in the app that only I can unlock."

That was the spark that led to the creation of the Secret Fund Vault (docs/SYSTEM_ARCHITECTURE.md).

Here is the story of how a simple user request evolved into an isolated, geofenced cryptographic vault, and the ethical engineering questions we wrestled with along the way.

The Ethical Dilemma: Is a "Secret Fund" Ethical?

When you tell people you are building a "Secret Vault" inside a finance app, their immediate reaction is often skepticism:

"Are you helping people hide money? Is this for tax evasion or illicit activity?"

As an engineer building tools that touch people's financial lives, you cannot ignore ethical implications. We established clear ethical boundaries before writing a single line of code:

flowchart TD subgraph EthicalBoundaries["FinLedger's Ethical Guardrails"] direction TB Q1["1. What is the threat model? Social pressure, impulse spending, and physical theft. NOT regulatory evasion."] Q2["2. Where does data live? 100% on the user's phone in encrypted SQLite. Zero anonymous offshore servers. Fully auditable and exportable by the device owner."] Q3["3. Who holds the keys? The user holds the master passphrase. If a user chooses to export their records for tax auditing, all vault transactions export with 1-tap transparency."] Q1 --> Q2 --> Q3 end

The Secret Fund was never designed to hide assets from legal authorities; it was designed to give individuals personal boundaries and psychological autonomy:

  • Protecting young adults from intrusive family financial demands.
  • Protecting freelance workers with variable incomes from lifestyle inflation.
  • Protecting emergency reserves from being plundered for impulsive consumer electronics.

Privacy is a fundamental human right, and that includes the right to decide who gets to see your savings balance when you are sitting on a crowded subway or sharing a table with colleagues.

The Evolution of the Architecture

The feature underwent three distinct developmental phases:

flowchart LR P1["Phase 1: The Fragile 'is_hidden' Flag (Rejected: Leaked in search and net worth)"] --> P2["Phase 2: Isolated SQLite Schema (vault_accounts & vault_transactions decoupled)"] P2 --> P3["Phase 3: Full Multi-Asset Hardening (7 Account Types, Physical Geofencing, and Ephemeral RAM Sessions)"]

Phase 1: The Naive Prototype (A Simple Toggle)

Our first prototype simply added is_hidden = 1 to the existing accounts table. As documented in our earlier architectural deep dives, this was an immediate failure: global search matched hidden transactions, and dashboard queries frequently forgot to filter the flag. We scrapped the prototype after three days.

Phase 2: Schema Isolation

We went back to the drawing board and created completely independent database tables: vault_accounts and vault_transactions. Master ledger queries were physically severed from the vault schema. Even if a developer made a coding error, the SQL compiler prevented secret records from leaking into public net worth calculations.

Phase 3: The Four-Factor Security Vault

Once the database was hardened, we layered on real-world defensive engineering:

  • Discreet Gestures: Eliminating the vault from standard navigation menus.
  • Ephemeral RAM Sessions: 5-minute sliding auto-lock timers with zero disk persistence.
  • Physical Geofencing: Pure Kotlin Haversine distance checks anchoring vault access to trusted physical coordinates.
  • 7 Account Archetypes: Expanding the vault to support everything from physical cash envelopes to emergency Fixed Deposits and secondary credit cards.

Building in Public with Radical Transparency

When we released the Secret Fund in v2.0, we didn't hide its implementation details behind marketing slogans.

We documented the entire architecture publicly: the database schemas, the PBKDF2 key derivation, the Haversine trigonometric equations, and our automated test assertions.

The developer community embraced the feature because they could see that it was engineered with integrity: it was not a gimmick or an ad tracker, but an authentic, offline-first security tool designed to solve a real human problem.

Key Takeaway

The best features in software engineering are born when you listen deeply to the quiet, unvarnished problems your users face every day.

By treating user privacy as an ethical obligation rather than a feature checkbox, FinLedger's Secret Fund grew from a simple beta tester's plea into one of the most sophisticated, mathematically rigorous offline security vaults on Android.

FinLedger is a privacy-first, offline-first personal finance application for Android that models bank accounts, credit cards, and cash without double-counting.

Explore FinLedger on Google Play: https://play.google.com/store/apps/details?id=com.devanshufinance.app