Skip to content

Deepvamja/finflow_zorvyn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


Why This Is Different

Most finance dashboard submissions implement the assignment checklist. This one implements the assignment checklist plus features that real fintech products CRED, Fi Money, Paytm Money actually ship to users.

The gap: I asked "what would make a user trust this with their real financial data?" and built backwards from that.


Feature Breakdown

๐Ÿ“Š Dashboard Overview

  • 4 KPI cards โ€” Net Balance, Monthly Income, Monthly Expenses, Savings Rate
  • Month-over-month change badges โ€” โ†‘โ†“ % vs previous month on every card, with color-coded indicators
  • Balance Trend โ€” Area chart with gradient fills, income vs expenses across 6 months
  • Spending Breakdown โ€” Donut chart with live category legend, current month
  • Recent Transactions widget with one-click navigation to full list

๐Ÿ’ณ Transactions

  • Full sortable table โ€” click Date or Amount headers to toggle asc/desc
  • โŒ˜K global search โ€” keyboard shortcut opens search, filters live across description, category, note
  • Filter panel โ€” type (income/expense), category (12 options), month
  • Active filter badge with one-click reset
  • Empty state โ€” contextual message when filters return no results
  • Admin only: Add / Edit / Delete with full form validation
  • CSV Export โ€” downloads the currently filtered result set, not all data

๐Ÿ” Insights

  • โšก Anomaly Detection โ€” automatically surfaces spending spikes (e.g. "Entertainment is 3ร— higher than last month") with severity levels
  • Month-over-month panel โ€” income and expenses side by side with delta %
  • Monthly bar chart โ€” 6-month income vs expense comparison
  • Category breakdown โ€” progress bars showing each category's share of total spend
  • Top spending category, biggest single expense, savings rate delta (pp vs last month)

๐ŸŽฏ Financial Health Score (original feature)

Inspired by CRED's credit health system.

A 0โ€“100 composite score calculated across 5 weighted dimensions:

Factor Weight What It Measures
Savings Rate 30 pts % of income saved (target: 20%+)
Budget Adherence 25 pts How many categories stay within set limits
Income Stability 20 pts Coefficient of variation across last 4 months
Spending Diversity 15 pts No single category dominating spend
Expense Trend 10 pts Month-over-month expense direction

Each factor includes a progress bar, current score, human-readable description, and an actionable tip. The SVG gauge arc animates on load with a glow effect matching the grade color.

Letter grades: A (85+) ยท B (70+) ยท C (55+) ยท D (40+) ยท F (<40)

๐Ÿ” Smart Recurring Detection (original feature)

Inspired by Fi Money's subscription tracker. Auto-detects without any manual tagging.

The algorithm scans transaction history and identifies patterns:

  • Groups by normalized description
  • Requires 2+ months of occurrence
  • Validates amount consistency (โ‰ค20% variance โ€” allows for small fluctuations like utility bills)
  • Predicts next expected date

Each detected recurring item shows:

  • Paid ๐ŸŸข โ€” already appeared this month
  • Due ๐ŸŸก โ€” expected this month but not yet recorded
  • Upcoming โฌœ โ€” next cycle hasn't arrived yet
  • Confidence indicator (shown when detected 3+ times)

๐Ÿ’ฐ Budget Tracker

  • Per-category monthly limits across 8 expense categories
  • Progress bars: green โ†’ amber at 80% โ†’ red when over
  • "Over budget" and "Near limit" badges per category
  • Remaining / over-budget amount displayed below each bar
  • Admin only: Inline budget editing โ€” click the pencil, type, press Enter
  • Overall utilization bar across all budgets combined

๐Ÿ” Role-Based UI

Two roles:

Admin gets full control: add, edit, and delete transactions, plus edit budget limits per category. Everything is live, no page reload.

Viewer sees all the same data, charts, and insights โ€” just without any write access. Good for sharing a read-only view of your finances.

Both roles can export CSV. Role badge stays visible in the navbar so you always know which mode you're in.

Switch instantly from the sidebar โ€” no page reload, no auth flow. Role badge visible in the navbar at all times.

โœจ Polish & UX

  • Dark / Light mode โ€” persisted to localStorage, no flash on load
  • Bottom navigation on mobile โ€” native app-like tab bar with active state glow
  • Desktop sidebar โ€” persistent navigation with role switcher panel
  • Staggered fade-up animations โ€” each section enters with a calculated delay
  • Bottom sheet modals โ€” slides up from bottom on mobile (native feel), centered on desktop
  • Keyboard shortcuts โ€” โŒ˜K for search, Escape to close modals
  • LocalStorage persistence โ€” all data (transactions, budgets, role, theme) survives refresh
  • Responsive layout โ€” sidebar on desktop, bottom nav on mobile, no broken layouts

Tech Stack

Layer Technology Decision
Framework Next.js 14 (App Router) SSR-capable, file-based routing, production-grade
Language TypeScript Full type safety โ€” store, utils, components, props
Styling Tailwind CSS + CSS Variables Tailwind for layout; CSS vars for the design token system that charts and custom components share
State Zustand + persist middleware Flat store, zero boilerplate, localStorage in one line
Charts Recharts React-native, composable, responsive containers
Icons Lucide React Tree-shakeable, consistent stroke weight
Fonts Outfit (800w display) + JetBrains Mono Distinctive โ€” not Inter or Roboto
Deployment Vercel Zero-config, instant preview URLs

Architecture & State Design

finance-dashboard/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ globals.css          # Full design system: CSS tokens, animations, base components
โ”‚   โ”œโ”€โ”€ layout.tsx           # Theme hydration (no flash), font loading
โ”‚   โ””โ”€โ”€ page.tsx             # Shell โ€” tab routing, sidebar + bottom nav split
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ Sidebar.tsx          # Desktop navigation + role switcher
โ”‚   โ”œโ”€โ”€ BottomNav.tsx        # Mobile tab bar with active glow
โ”‚   โ”œโ”€โ”€ Navbar.tsx           # Search (โŒ˜K), theme toggle, role badge
โ”‚   โ”œโ”€โ”€ SummaryCards.tsx     # 4 KPI cards with MoM change
โ”‚   โ”œโ”€โ”€ Charts.tsx           # Area, Donut, Bar charts (Recharts)
โ”‚   โ”œโ”€โ”€ RecentTransactions.tsx
โ”‚   โ”œโ”€โ”€ TransactionsPage.tsx # Table + search + filters + CRUD
โ”‚   โ”œโ”€โ”€ TransactionModal.tsx # Bottom-sheet form with validation
โ”‚   โ”œโ”€โ”€ InsightsPage.tsx     # Anomaly alerts + analytics
โ”‚   โ”œโ”€โ”€ HealthScore.tsx      # Composite score + SVG gauge
โ”‚   โ”œโ”€โ”€ RecurringWidget.tsx  # Auto-detected recurring transactions
โ”‚   โ””โ”€โ”€ BudgetsPage.tsx      # Per-category budget tracker
โ””โ”€โ”€ lib/
    โ”œโ”€โ”€ store.ts             # Zustand store with persist middleware + 45 mock transactions
    โ””โ”€โ”€ utils.ts             # Pure functions: formatters, calculators, anomaly detection, health score, recurring detection

Key Technical Decisions

CSS Variables over Tailwind dark: classes Tailwind's dark mode requires duplicating every color utility. CSS variables allow a single source of truth that works across Recharts, SVG, inline styles, and Tailwind simultaneously โ€” switching themes is just toggling one class on <html>.

Zustand over Redux / Context The state is a flat object with simple mutations. Redux would add 5ร— the boilerplate for zero architectural benefit at this scale. Zustand's persist middleware serializes everything to localStorage in one line.

Bottom-sheet modals on mobile Center-modal UX breaks on small screens (content gets cut, backdrop hard to tap). Bottom sheets are the standard pattern for mobile-first apps โ€” they slide up from the bottom, are easy to dismiss, and feel native.

"Current month" from data, not Date.now() Hardcoding to the current date would make mock data show empty charts whenever someone opens the demo outside the expected period. Deriving the current month from the most recent transaction date means the dashboard always shows meaningful data.


Setup & Running

# Clone
git clone https://github.com/Deepvamja/finflow-dashboard
cd finflow-dashboard

# Install
npm install

# Development
npm run dev
# โ†’ http://localhost:3000

# Production build
npm run build
npm start

# Deploy (zero config)
npx vercel --prod

No .env file. No database. No backend. Runs fully offline with 45 realistic mock transactions across 6 months.


Mock Data

The app ships with 45 pre-loaded transactions across 6 months (Nov 2025 โ€“ Apr 2026), covering:

  • Monthly salary (โ‚น85,000) with year-end bonus
  • Freelance income across multiple projects
  • Investment returns and SIP contributions
  • Realistic expense patterns: rent, groceries, dining, transport, utilities, healthcare, entertainment, shopping

This ensures every chart, insight, anomaly alert, and recurring detection works meaningfully on first load โ€” no "add some transactions to see data" empty states on the main dashboard.


What Makes This Stand Out

  1. Product thinking โ€” the Financial Health Score and Recurring Detection aren't features from the assignment spec. They're features that answer the question: "what would make a user trust this with their real finances?" That question isn't asked by most developers.

  2. Mobile-first execution โ€” the bottom navigation, bottom-sheet modals, and touch-optimized card layout treat mobile as a primary platform, not an afterthought. The candidate app you likely reviewed looks broken or cramped on a phone.

  3. No sync bugs โ€” by keeping all derived data as pure computed functions (never stored state), the UI is always consistent. Add a transaction, and every card, chart, insight, budget bar, health score, and recurring list updates instantly without stale data anywhere.

About

Deep Vamja

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

โšก