The Problem We Couldn't Ignore

Pakistan has 65 million people using digital banking. 5.2 million small businesses contributing 40% of the country's GDP. And almost none of them have real visibility into their own money. We watched people around us - freelancers, shopkeepers, small factory owners - juggling paper registers and four different apps, abandoning every finance tool within weeks because typing every transaction by hand just doesn't stick. Banks reject 70–80% of SME loan applications not because the businesses aren't viable, but because they can't prove their cash flow. There's no record. No history. Nothing. That's what FynX started from.

What Existed Before the Hackathon

Before May 19, 2026, FynX had a working foundation:

  • Flutter app structure for Android and iOS
  • Firebase backend with auth and Firestore sync
  • Core expense tracking UI with category management
  • Manual transaction entry forms
  • Basic receipt scanner using Google ML Kit OCR

This gave us a stable base. But it was still a passive tool - it recorded what you told it and showed it back. The intelligence wasn't there yet.

What We Built During the Hackathon Period

Everything that makes FynX actually smart was built between May 19 and August 2026.

MSG Tracker was the first major addition. The app now reads incoming bank SMS alerts in the background through an Android BroadcastReceiver and automatically logs the merchant, amount, and transaction type without the user touching anything. Building a reliable parser across HBL, Meezan, UBL, MCB, and Bank Alfalah formats took far longer than expected. We ended up building a pattern library with a manual correction fallback for edge cases.

Voice-Powered Tracking came next. Users can now speak a transaction "spent 450 on lunch at Howdy" and Gemini extracts the amount, merchant, and category from natural speech.

Financial Health Score v2 replaced the basic scoring from the original build. The updated version runs through Gemini and produces a composite 0–100 score across four dimensions:

$$\text{Health Score} = 0.40 \cdot \text{SR} + 0.30 \cdot \text{SC} + 0.20 \cdot \text{CF} + 0.10 \cdot \text{Activity}$$

Where $\text{SR}$ is savings rate relative to income, $\text{SC}$ is spending consistency over 30 days, $\text{CF}$ is cash flow stability, and $\text{Activity}$ is logging frequency.

CreditIQ is the feature we built specifically for this hackathon. It uses Gemini to analyze a business's transaction history, cash flow patterns, and vendor payment behavior and outputs a Credit Readiness Score:

$$\text{CreditIQ} = 0.35 \cdot \text{CF}{\text{consistency}} + 0.25 \cdot \text{SR}{\text{rate}} + 0.25 \cdot \text{VPR} + 0.15 \cdot \text{Activity}$$

The score also generates a Gemini-written explanation of the top three factors affecting it and what the user can do to improve each one.

Business CFO Chat lets an owner type or say "Can I afford to hire someone next month?" and get an answer pulled from their actual transaction data using Gemini function calling.

Investment Tracker adds manual and SMS-based logging for mutual funds, stocks, and savings instruments. Users can finally see their complete net worth in one screen.

Payment Gateway integration allows users to collect payments and log them directly into their FynX ledger.

How We Built It

Flutter for the mobile layer. Firebase for Firestore, auth, and cloud functions. Google ML Kit for on-device OCR. Android telephony listeners for the SMS pipeline. Every AI feature runs through Gemini with a multi-model fallback chain gemini-1.5-flashgemini-2.0-flashgemini-flash-latest with exponential backoff so rate limits are invisible to the user. The CreditIQ prompt went through around 30 iterations. Getting Gemini to return a structured, explainable score in a strict JSON schema required significant prompt engineering work. Clean Architecture with BLoC state management kept the AI layer, data layer, and UI from bleeding into each other.

What Actually Gave Us Trouble

SMS format inconsistency across Pakistani banks was the hardest engineering problem. Three different formats from Bank Alfalah alone depending on transaction type.

Voice tracking accuracy dropped on Urdu-English mixed input. We worked around it by prompting Gemini to handle code-switched input explicitly. The CreditIQ explanation quality was inconsistent early on. The fix was constraining output to always name specific transactions or time periods rather than speaking in generalities.

What We Took Away

Alternative credit scoring from behavioral transaction data works. Early testers with zero formal credit history got CreditIQ scores that matched our manual read of their financial health. Gemini function calling changed how we think about the product. Letting users talk to their finances rather than navigate menus makes the app feel like an advisor rather than a ledger.

Built With

Share this project:

Updates