BankBot-AI / docs /PPT_STRUCTURE.md
mohsin-devs's picture
Deploy to HF
a282d4b
|
Raw
History Blame Contribute Delete
7.15 kB

BankBot AI β€” Presentation Structure (12 Slides)


Slide 1 β€” Title Slide

BankBot AI An AI-Native Financial Operating System

Subtitle: Production-grade Β· Real-time Β· Intelligent

Visual: Dark glassmorphism background, animated gradient orb, tech badges


Slide 2 β€” Problem Statement

Traditional banking apps are passive. BankBot is intelligent.

Problem BankBot Solution
Banks show data, not insights AI-powered financial analysis
No real-time fraud intelligence Live anomaly detection scoring
No personalized coaching Financial health score + AI briefing
No scenario planning What-If Simulator with 36-month projection
No behavioral analysis Spending heatmap + pattern detection

Visual: Side-by-side comparison screenshot


Slide 3 β€” Solution Overview

Your AI Financial Twin

5 core capabilities:

  1. Real-time AI chat with full financial context
  2. Predictive balance forecasting (conservative/expected/optimistic)
  3. Automated fraud detection (4-factor scoring)
  4. Behavioral spending analysis (heatmap, patterns)
  5. Interactive what-if financial simulator

Visual: Dashboard screenshot


Slide 4 β€” System Architecture

Production-Grade Full-Stack Architecture

Next.js 14 Frontend
    ↕ HTTPS / WSS
Nginx (TLS + Rate Limiting)
    ↕
FastAPI Backend (33 routes)
    ↕              ↕              ↕
PostgreSQL 15   Redis 7      AI Engine
β†’ SQLite        β†’ memory     OpenAI β†’ Groq
  fallback        fallback   β†’ Ollama β†’ offline

Key point: Every layer has a fallback β€” the system never fully fails


Slide 5 β€” AI Intelligence Engine

4-Tier AI Fallback Chain

Priority 1: OpenAI GPT-4o-mini    (fastest, most capable)
    ↓ if unavailable
Priority 2: Groq llama-3.3-70b    (free tier, very fast)
    ↓ if unavailable
Priority 3: Local Ollama llama3   (fully offline)
    ↓ if unavailable
Priority 4: Rule-based engine     (always available)

Context injected per message:

  • Live account balances Β· Transaction history
  • Financial goals Β· Investment portfolio
  • Behavioral patterns Β· Health score

Visual: Chat page with streaming animation


Slide 6 β€” Real-Time WebSocket Architecture

Streaming AI + Live Updates

Browser ──WS connect──► FastAPI
Browser ──{ type: "chat", message: "..." }──►
         ◄──{ type: "chat_start" }──
         ◄──{ type: "chat_chunk", content: "H" }──
         ◄──{ type: "chat_chunk", content: "er" }──
         ◄──{ type: "chat_end" }──
Browser ──{ type: "ping" }──► (every 25s)
         ◄──{ type: "pong" }──

Features:

  • Character-by-character streaming
  • Heartbeat every 25s
  • Exponential backoff reconnect (1s β†’ 2s β†’ 4s β†’ 30s max)
  • HTTP fallback when WebSocket unavailable
  • Prompt injection prevention (9 regex patterns)

Slide 7 β€” Financial Intelligence

AI-Powered Analytics

  • Health Score β€” 100-point composite (6 dimensions)
  • Spending Heatmap β€” weekly activity patterns
  • Category Intelligence β€” AI insights per spending category
  • Net Worth Timeline β€” balance trajectory
  • Behavioral Analysis β€” late-night spending, weekend patterns
  • Subscription Optimization β€” detect unused subscriptions

Visual: Analytics page screenshot


Slide 8 β€” Fraud Detection Algorithm

Real-Time Anomaly Scoring

Transaction β†’ Score 4 factors:
  Amount spike    > 3.5x avg  β†’ +40 pts
  Timing anomaly  11PM–4AM    β†’ +25 pts
  Rapid-fire      < 3min gap  β†’ +20 pts
  Duplicate       same+10min  β†’ +30 pts

Score β‰₯ 30 β†’ logged to fraud_logs
Score β‰₯ 50 β†’ status: "flagged"
Score < 30 β†’ status: "verified"

Visual: Fraud alert notification screenshot


Slide 9 β€” Performance & Caching

Cache-Aside Pattern with Auto-Fallback

Endpoint Cold Cached TTL
Dashboard 65ms 10ms 2 min
AI Score ~2s 10ms 10 min
AI Briefing ~3s 10ms 1 hr
Transactions 18ms β€” β€”

Optimization: Query.with_entities() β€” column-only queries, no ORM hydration Result: 32x speedup (2.1s β†’ 65ms)

Cache: Redis β†’ in-memory fallback (automatic, zero config)


Slide 10 β€” Database Design

10-Table Normalized Schema

Core tables:

  • users β€” profile, personality, AI settings
  • accounts β€” checking/savings/investment
  • transactions β€” 300+ with categories, tags, emotion labels
  • goals β€” target amounts, AI-generated plans
  • investments β€” portfolio with AI risk analysis
  • subscriptions β€” with AI usage detection
  • notifications β€” typed alerts (fraud/insight/warning)
  • fraud_logs β€” risk scores, details, status
  • ai_insights β€” cached AI-generated content
  • analytics_snapshots β€” daily financial snapshots

Fallback: PostgreSQL β†’ SQLite (automatic, same ORM code)


Slide 11 β€” Security & Observability

Production-Grade Engineering

Security:

  • JWT (60min access + 7-day refresh rotation)
  • bcrypt hashing (rounds=12, direct library)
  • Rate limiting (120/min API, 10/min auth)
  • Security headers (CSP, X-Frame-Options, etc.)
  • Prompt injection prevention (9 patterns)
  • CORS restricted to configured origins

Observability (GET /api/metrics):

  • Request count, error rate, auth failures
  • AI provider health (calls/errors/latency)
  • Cache hit ratio
  • Per-route timing (avg + max)
  • Last 50 errors with timestamps

CI/CD: GitHub Actions (backend lint, frontend build, Docker smoke test)


Slide 12 β€” Demo + Conclusion

Live Demo

Demo flow (5 min):

  1. Login β†’ Dashboard (65ms load)
  2. AI Chat β†’ WebSocket streaming
  3. What-If Simulator β†’ live sliders
  4. Analytics β†’ heatmap + radar
  5. System Status β†’ live metrics

What makes this different:

  • Not a prototype β€” deployable to production today
  • Every feature backed by real data (301 transactions)
  • AI that knows your finances, not generic advice
  • Resilient architecture that never fully fails
  • Full observability β€” you can see it working

Numbers: 33 routes Β· 14 pages Β· 10 DB tables Β· 65ms dashboard Β· 4-tier AI fallback


Presenter Notes

Opening line:

"Most banking apps show you data. BankBot understands it."

Closing line:

"This isn't a student project that happens to use an AI API. It's a production-grade system where AI is the core β€” every response is personalized, every insight is grounded in real data, and every layer has a fallback."

If asked about deployment:

"The frontend is on Vercel, the backend on Render with managed PostgreSQL and Redis. The whole stack can also run locally with a single command β€” run.bat on Windows."

If asked about the most impressive feature:

"The AI orchestration layer. It builds a personalized system prompt from the user's live database records, streams the response through whichever AI provider is available, and falls back gracefully through 4 levels. Very few projects implement this kind of resilient AI infrastructure."