# Spendprofile: case study by Yusuf Ibrahim (Saint)

> A financial intelligence layer for Nigerian bank statements. One extraction engine behind a consumer app, a business API and an open developer platform.

Page: https://madebysaint.xyz/work/spendprofile

- Role: Lead AI Product Engineer (Oct 2025 – Sept 2026), then Co-founder & Creative Lead
- Timeline: Oct 2025 – present
- Status: Live
- Shipped: Consumer app, business API and portal, developer platform
- Product: https://spendprofile.app
- Tags: Co-founder · Product Design & Engineering · Web App, API & Platform

## At a glance

- Problem: Nigerian bank statements are dense PDFs nobody can act on, and lenders and HR teams still key them in by hand.
- What he did: Scaled an early engine draft to read 14 banks, built the backend, UI, business API and LLM features to MVP. Now co-founder and creative lead.
- Outcome: Live with paid Premium subscriptions, a business API and portal, and an open bank-data library on npm and PyPI.

Hi, this is Spendprofile: it turns the bank statement PDF people already have into a clear, reconciled picture of their money. It's live, it's grown into three products on one engine, and I've worn two hats on it. Ask away, or just scroll.

## So what exactly is Spendprofile?

Nigerians download bank statements for visas, loans, rent and their own clarity, then get a dense PDF nobody can act on. You upload that PDF and get back every transaction sorted, categorised and checked against the bank's own totals, plus budgets, cash-flow runway and an AI you can ask about your own money. No bank login, and statements delete themselves after seven days.

![The Spendprofile landing page: Your bank statement, read properly.](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp/lp-hero.png)

- **14**: Nigerian banks it can read
- **3**: products on one engine
- **7 days**: until a statement auto-deletes
- **0**: bank passwords asked for

## What was your part in it?

Two roles. As Lead AI Product Engineer I took over an early engine draft from contract engineers and scaled it to read statements from 14 banks into one transaction model, then built the backend and UI that got the product to MVP, the business API and portal, the LLM features, and the open bank-data library. When a technical co-founder joined to run engineering, I became co-founder and creative lead: product design, brand and the whole web experience.

- **Oct 2025 – Sept 2026:** Lead AI Product Engineer. Engine, backend, UI, business API, LLM features, bank library.
- **Oct 2026 – present:** Co-founder & Creative Lead. Product design, brand and the web experience across all three products.

## What does the app actually show you?

Upload a statement and you land on analytics split into Overview, Spending, Income, Tools and Financial Health, so no single screen tries to say everything. Every transaction is searchable and re-categorisable in place, and Premium adds Ask AI, All Accounts and Compare. These screens use a sample statement for a fictional account, run through the real analytics code.

![Upload screen](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/m-upload.png)
![Overview tab](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/t-overview-a.png)
![Spending tab](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/t-spending-a.png)
![Income tab](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/t-income-a.png)
![Financial Health tab](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/t-financial-health-a.png)
![Transactions list](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/m-txns.png)
![Ask AI](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/m-chat.png)
![All Accounts](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/m-all-accounts.png)
![Compare](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp/m-compare.png)
*Scroll sideways. Sample data, fictional account.*

## Why one engine instead of parsing inside each app?

Every Nigerian bank formats statements differently: text PDFs, scans, password-protected files, mobile-money layouts. Parsing in each backend would drift. So I made extraction its own product: one private engine that both backends install pinned to the same version, so a bank added once ships everywhere. Tap a step to see what it does.

1. **Detect bank:** Works out which of the 14 banks issued the statement, so the right parser runs.
2. **Decrypt:** Opens password-protected PDFs with the password the user provides.
3. **Extract:** Pulls text and tables out of the PDF, with OCR only when the file is a scan.
4. **Parse:** Turns the bank's own layout into one consistent transaction model.
5. **Categorise:** Sorts every line into one of 15 categories, and learns from users' corrections.
6. **Reconcile:** Checks the result against the totals the bank printed on the statement.

```dockerfile title="Spendprofile-Backend/Dockerfile.worker"
ARG ML_TAG=v0.1.30
COPY scripts/install_ml_engine.sh /tmp/install_ml_engine.sh
# Referencing $ML_TAG here makes the tag part of the layer's cache key,
# so a tag bump always rebuilds the ML install.
RUN echo "Installing ML engine ${ML_TAG}" && sh /tmp/install_ml_engine.sh
```

- 2026-07-25: feat(parsers): pdfplumber Palmpay + Stanbic parsers; balance-derived reconciliation
- 2026-08-02: Add Providus / ProvidusUnity support (v0.1.22); fix Providus->UBA misdetection

Support grew from 11 banks to 14, and each new bank reached the consumer app and the business API in the same release.

The cache-key comment is there for a reason: without it Docker reused a cached layer and silently kept production on an older engine after a tag bump. One line in the Dockerfile fixed it for good.

## How can anyone trust numbers parsed from a PDF?

A parser can miss a row at a page break, and a dashboard that quietly under-counts is worse than none: people make money decisions on it. So every statement is checked against its own opening and closing balance, or its printed totals. If it doesn't add up, the product says so. Try it: drop a row and watch what happens.

*(An interactive demo is on the page: https://madebysaint.xyz.)*

![Landing page section: every line sorted and checked against the bank's own totals](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp/lp-reconcile.png)

- 2026-07-12: feat(reconciliation): capture-completeness flag + guarded balance recovery

Incomplete extraction is flagged instead of shown as a smaller total. Recovering a single dropped row only runs for banks I'd verified, and only when there's exactly one place it could be.

The inserted row's amount is the exact reconciliation gap, so the result reconciles by construction. The guard is what matters: if there's more than one place the row could have dropped from, nothing is inserted and the statement is just flagged.

## Is money moved to your own savings spending?

On a statement, a transfer to your own savings wallet looks exactly like spending, which makes careful savers look like big spenders. Spendprofile detects those moves and reports them as moved to your own savings, and keeps interest earned as income. The detection is deliberately conservative: a false match would hide real spending. Flip the switch to see the difference.

*(An interactive demo is on the page: https://madebysaint.xyz.)*

```python title="Spendprofile-Backend/app/services/transfers.py"
def is_internal_transfer(txn: dict) -> bool:
    """True if this transaction is a move to the user's own savings/lock,
    not spend or income. 'CashBox Interest' is NOT a transfer."""
    text = ((txn.get("description") or "") + " " + (txn.get("name") or "")).strip()
    if not text:
        return False
    low = text.lower()
    # Interest/dividend on a savings product is genuine income: keep it.
    if "interest" in low or "dividend" in low:
        return False
    return bool(_INTERNAL_PATTERNS.search(low))
```

The same split runs in analytics, Compare and Ask AI, so the numbers never disagree between screens.

## What does a visa officer actually look for?

Someone reading a statement for a visa, loan or lease wants income that's earned, not borrowed. A large one-off transfer from a person stands out, and gets questioned. So the analytics now flag the transfers an officer will ask about, with the numbers behind each flag. Move the slider to get a feel for it.

*(An interactive demo is on the page: https://madebysaint.xyz.)*

![The app's card: transfers in an officer may ask about](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_780/casestudies/sp2/app-officer.png)
*In the app, with a sample statement.*

The landing page leads with this job: pick Visa application and it shows income that's earned, not borrowed, and flags the transfers an officer will ask about.

## What did you build for businesses?

Lenders, HR teams and visa consultants don't want a dashboard, they want one API call: post a statement, get structured JSON back, with income, affordability and risk signals. The portal leads with the request a developer will actually make, then shows the decision block a credit team reads, and keys are scoped, hashed and revocable.

![Spendprofile for Businesses: bank statements in, decisions out](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/portal-hero.png)

![One request, no templates to maintain](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/portal-api.png)
![Signals your rules can use](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/portal-decide.png)
![From upload to decision in about half a minute](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/portal-speed.png)
![Pay for what you read, in naira](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/portal-pricing.png)

- **~30s**: typical turnaround
- **20 MB**: max file size
- **3**: webhook events
- **0**: templates to maintain

## What's open source, and what stays private?

Bank names, routing codes and logos had been copied into four apps and were drifting. That data is useful to every Nigerian fintech, so I pulled it into an open, MIT-licensed library on npm and PyPI, served by a small developer platform with a bank directory and the official CBN rate. The logic that actually reads statements stays private.

![Two APIs: bank library and official rates](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/platform-apis.png)
![Nigerian bank directory](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/banks.png)
![Official CBN USD/NGN rate](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/rates.png)
![Seven endpoints, that's the whole API](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/platform-endpoints.png)

```json title="spendprofile-bank-library/data/gtbank.json"
{
  "slug": "gtbank",
  "name": "Guaranty Trust Bank",
  "shortName": "GTBank",
  "type": "commercial",
  "codes": {
    "nip": "000013",
    "sortCode": "058",
    "ussd": "*737#",
    "swift": "GTBINGLA",
    "verified": true
  }
}
```

- **0.0.3**: published on npm and PyPI
- **7**: endpoints on the platform API

## How private is a statement upload?

A statement is about as sensitive as a document gets. Auto-delete after seven days is on by default, and it's stated on the upload screen before you pick a file. Deleting a statement removes the file and the extracted data, the only cookie is the essential sign-in one, and statements used to teach the engine a new bank need explicit consent.

```python title="Spendprofile-Backend/app/models/user.py"
auto_delete_enabled = Column(
    Boolean,
    default=True,
    nullable=False,
    comment="If true, jobs are auto-deleted 7 days after creation (default on)"
)
```

## You redesigned the web experience. What changed?

The three products had drifted apart visually. I redesigned all three into one visual world with an audience switch for Individual, Business and Platform, built around the jobs people actually have, like a visa application, rent proof or a monthly budget, and around the product's real screens and honesty: no bank login, deleted after seven days, totals checked.

![Pick the job](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp/lp-jobs.png)
![Ask it anything](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp/lp-ask.png)
![Your month in numbers](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp/lp-month.png)
![A portal your whole team can use](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/portal-team.png)
![Nigerian bank data as an API](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp2/platform-hero.png)
![Start free, upgrade when you need more](https://res.cloudinary.com/dljwhrpqh/image/upload/f_auto,q_auto,w_1600/casestudies/sp/lp-pricing.png)

## If you started over tomorrow, what would you do differently?

I'd build the engine before any interface, earlier and on purpose. Everything since, from the business API to the developer platform, was cheap because extraction was already its own product.

- **Engine first:** Treat extraction as the product from day one.
- **Admit uncertainty:** Better to say a statement may be incomplete than be confidently wrong about someone's money.
- **One source for the brand:** Four copies of one palette was invisible until it wasn't.
- **Know what to give away:** Open data built goodwill; private detection kept the product defensible.
