Skip to content

Latest commit

ย 

History

History
118 lines (91 loc) ยท 6.08 KB

File metadata and controls

118 lines (91 loc) ยท 6.08 KB

๐Ÿ“ฑ SentiVest Frontend

Single-page application โ€” Phone mockup (left) + tabbed dashboard (right).

All UI lives in combined.html โ€” one self-contained file with HTML, CSS, and JavaScript.


๐Ÿ“ฑ Phone Mockup (Left Panel)

12 pages accessible via bottom navigation and the "More" menu:

Page Description
๐Ÿ  Home Bank card carousel (swipe between accounts), quick actions (Talk, Pay, Tasks, Budget), recent transactions
๐Ÿ“’ Ledger Full transaction history with filters (All / Income / Expenses), running balance
๐Ÿ’ฌ Chat Free-form AI chat with knowledge graph context
๐Ÿ“Š Budgets Budget cards with progress bars, over-limit badges
๐Ÿšจ Alerts Fraud alerts and anomaly warnings with severity levels
๐Ÿ“„ Documents PDF downloads โ€” bank statements, tax certificates, proof of payment
๐Ÿ“ท Scanner Receipt scanning (mock) with merchant/category extraction
โœ… Tasks AI-generated to-do list with priority pills and check-off
๐Ÿ“ˆ Report Weekly spending breakdown by category with AI insights
๐Ÿงช Test Live transaction classifier โ€” enter merchant/amount/time, get verdict
๐Ÿ‘ค Profile User name editing, AI memory management (facts, preferences), conversation stats
๐Ÿ” Detail Single transaction deep-dive with classification reasoning

๐Ÿงฉ Phone Components

  • ๐Ÿ’ณ Card Carousel โ€” iPhone-style horizontal swipe through bank accounts with dot indicators
  • ๐ŸŽ™๏ธ Floating Mic FAB โ€” Always-visible microphone button for voice commands
  • ๐Ÿ—ฃ๏ธ Voice Overlay โ€” Full-screen overlay with recording waveform, text input, chat history, quick action chips
  • ๐Ÿ”” Toast Notifications โ€” Animated alerts for transactions, fraud, and system events
  • ๐Ÿ’ธ Payment Flow Cards โ€” Inline beneficiary list, disambiguation, amount entry, confirmation, success animation
  • ๐Ÿงญ Bottom Navigation โ€” Home, Ledger, Chat, More (with badge count)
  • ๐Ÿ“‹ Slide-up More Menu โ€” Access to all secondary pages

๐ŸŽ›๏ธ Dashboard (Right Panel โ€” 4 Tabs)

๐Ÿ“‹ Tab 1: Audit Log

Real-time event feed showing every action, transaction, and system event. Color-coded by severity (๐Ÿ”ด critical, ๐ŸŸก warning, ๐Ÿ”ต action, ๐ŸŸข safe, โšช info). Auto-scrolling with timestamps.

๐ŸŽ›๏ธ Tab 2: Command Center

  • ๐Ÿ’š Health Score Ring โ€” Animated SVG gauge (0-100), letter grade (A-F), component breakdown bars (DTI, buffer, budgets, insurance, investments, habits)
  • ๐Ÿฆ Loan Eligibility Panel โ€” Amount/type/term inputs with live assessment. Verdict badge (โœ… Approved / โš ๏ธ Conditional / โŒ Declined), DTI impact, max affordable, factor list
  • ๐Ÿ’ก AI Insights Feed โ€” Proactive insights from knowledge graph analysis. Budget warnings, spending habits, savings rate, concentration alerts
  • ๐Ÿ”„ Smart Transfer Panel โ€” Account selector (from/to), amount and reference fields, live transfer execution with balance update
  • ๐Ÿ“Š Spending Breakdown โ€” Category bar chart with amounts

๐Ÿ•ธ๏ธ Tab 3: Graph & Simulator

  • ๐ŸŒ Knowledge Graph โ€” D3.js force-directed graph visualization. Nodes colored by type (merchant, category, loan, income, investment, insurance, tax, budget, goal, alert, pattern, beneficiary). Hover tooltips. Search capability
  • ๐ŸŽฌ Demo Step Buttons โ€” Repeatable steps (salary, debit orders, daily spending, food delivery) and one-shot life events (fraud, bonus, emergency, tax refund, salary increase, travel, accident)
  • โฉ Simulator Controls โ€” Start/stop button, speed selector (0.5x-5x), progress bar, month/phase indicator
  • ๐Ÿ“ก Event Feed โ€” Real-time transaction and alert events during simulation

๐Ÿงช Tab 4: Testing

  • ๐Ÿ›ก๏ธ Transaction Classifier โ€” Enter merchant name, amount (ZAR), time. Get real-time classification with verdict, confidence, reasoning, fraud indicators, and risk tags
  • ๐ŸŽ™๏ธ Voice Command Triggers โ€” Quick-test buttons for common voice commands
  • ๐Ÿ’ณ Payment Flow Triggers โ€” Test beneficiary payments, disambiguation, and listing

๐Ÿ—ฃ๏ธ Voice System

๐ŸŽค Speech Recognition

  • ๐ŸŒ Web Speech API for browser-based recognition
  • โ˜๏ธ Google Speech-to-Text for audio file transcription (16kHz mono WAV)
  • ๐Ÿ‘† Push-to-talk via mic button or text input fallback

๐Ÿ”Š Text-to-Speech

  • ๐ŸŽต Premium voice selection with priority list (Google UK English, Microsoft voices)
  • โšก Tuned rate (1.15x) and pitch (1.02) for natural delivery
  • โœจ Text cleanup: R currency expansion, abbreviation handling, markdown stripping

๐ŸŽจ Dynamic UI Rendering

Voice responses can include interactive UI elements:

  • ๐Ÿ‘ฅ Beneficiary List โ€” Selectable cards with avatars, names, bank details
  • โœ… Payment Confirmation โ€” Amount, recipient, reference fields with confirm/cancel
  • ๐ŸŽ‰ Success Animation โ€” Checkmark with transaction summary

๐ŸŽจ Key CSS Design System

Colors:
  ๐Ÿ”ต --navy: #003B5C     (primary brand, headers, buttons)
  ๐ŸŸข --teal: #007A6E     (accent, interactive elements, links)
  ๐Ÿ’š --teal-light: #E8F5F2  (hover states, light backgrounds)
  ๐Ÿ”ด --red: #B91C1C      (critical alerts, fraud, over-budget)
  ๐ŸŸ  --orange: #C2571A   (warnings, flagged items)
  ๐ŸŸก --yellow: #C68A0E   (caution, medium priority)
  ๐ŸŸฉ --green: #2E7D6F    (safe, completed, positive)

Typography:
  โœ๏ธ Libre Franklin โ€” UI text (300-800 weights)
  ๐Ÿ”ข DM Mono โ€” Numbers, amounts, timestamps

Phone Dimensions:
  ๐Ÿ“ฑ 320px x 660px, border-radius 32px

๐Ÿ“ก WebSocket Events

The UI connects to ws://localhost:8000/ws and handles:

Event Source Description
๐Ÿ†• new_transaction Classification New transaction classified
๐Ÿ•ธ๏ธ graph_update KG Knowledge graph changed
๐ŸŽฎ sim_transaction Simulator Simulated transaction
๐Ÿšจ sim_alert Simulator Fraud/anomaly during simulation
๐Ÿ”„ sim_phase Simulator Simulator phase change
๐Ÿ’ก sim_insights Simulator Proactive insights generated
๐Ÿ’š health_score Simulator Health score recalculated