FinanceIQ pairs a deterministic, logistic-style risk scorer with a Gemini-powered conversational interface. Users can chat with the assistant about portfolio risk, assess new loan applicants, and explore a dashboard of 100 synthetic applicants — all in South African Rand (R).
# FinanceIQ — AI Loan Risk Assistant
An AI-powered loan risk assessment chatbot for the South African retail banking sector. Built for the **Clickatell × CAPACITI AI Bootcamp 2026 — Week 4**.
FinanceIQ pairs a deterministic, logistic-style risk scorer with a Gemini-powered conversational interface. Users can chat with the assistant about portfolio risk, assess new loan applicants, and explore a dashboard of 100 synthetic applicants — all in South African Rand (R).
---
## Features
- **AI Chat** — Conversational assistant grounded in live portfolio data (powered by Gemini via the Lovable AI Gateway).
- **Risk Assessment** — Submit a new applicant and receive a risk level, default probability, recommendation, key risk factors, conditions, and plain-English explanation.
- **Portfolio Dashboard** — 100 pre-loaded applicants with sortable table, filter chips, donut chart, feature importance bar, and insight cards.
- **Deterministic Scoring** — Reproducible risk scoring formula so results stay stable across requests.
- **Rand Throughout** — All currency formatted as `R` (en-ZA).
---
## Tech Stack
| Layer | Choice |
|--------------|------------------------------------------------------------------------|
| Frontend | React 19 + TanStack Start + Tailwind CSS (dark theme) |
| Server | TanStack `createServerFn` handlers (TypeScript on Cloudflare Workers) |
| AI | Google `gemini-3-flash-preview` via the Lovable AI Gateway |
| Data | 100 synthetic applicants generated in-memory with a seeded RNG |
| Tooling | Vite 7, TypeScript (strict), Bun |
> **Note on the original spec.** The original brief proposed a Python/FastAPI + scikit-learn backend. Lovable runs on Cloudflare Workers (TypeScript only), so the same logistic-style risk model was ported to TypeScript server functions. Behavior matches …