Skip to content

An end to end stock tracking dashboard with modular cards, charts, and tables that fetch and update real time market data through scheduled API polling.

Notifications You must be signed in to change notification settings

Chiragadve/FinBoard

Repository files navigation

FinBoard

Build a custom finance dashboard by connecting to approved market-data APIs. Create widgets (table, card, chart), select fields, and keep everything updated on a cadence you control.

Highlights

  • Dynamic widget builder with API detection and parameter guidance
  • Robust API proxy keeps secrets server-side and normalizes errors
  • Response normalization handles arrays, nested objects, and key-value maps
  • Persistent state in localStorage (widgets + data cache)
  • Friendly validation and error handling throughout the flow

Tech Stack

  • Next.js (App Router)
  • React + Redux Toolkit
  • Recharts for charts
  • Serverless proxy routes for secure API access

Architecture Overview

  • Widget config lives in Redux (dashboard.widgets)
  • Widget data lives in Redux (dashboard.widgetData) with status and timestamps
  • useWidgetDataPolling handles refresh intervals, manual refresh, and stale-response protection
  • responseNormalizer converts arbitrary API responses into rows + fields for UI selection
  • AddWidgetModal tests endpoints, extracts fields, and validates selections

Setup

  1. Install dependencies:
    npm install
  2. Create .env.local:
    INDIAN_STOCK_API_KEY=your_key_here
    
  3. Start the dev server:
    npm run dev

Deployment (Vercel)

Add INDIAN_STOCK_API_KEY in the Vercel project environment variables. Secrets are never exposed to the browser.

Scripts

  • npm run dev
  • npm run build
  • npm run start
  • npm run lint

Directory Map

  • src/app - Next.js app router + API routes
  • src/components - Dashboard UI, widgets, modals
  • src/utils - Normalization, formatting, API client
  • src/config - API definitions, templates
  • src/redux - Store + slices

Data Handling Notes

  • Arrays of objects are flattened into dot-path fields (e.g. priceTarget.Mean)
  • Key-value maps become rows (key, value)
  • Arrays of primitives become rows (index, value)

Error Handling

  • Proxy translates API errors into friendly messages and field hints
  • 429 responses show "System is under heavy demand. Please wait..."
  • A global ErrorBoundary prevents hard UI crashes

About

An end to end stock tracking dashboard with modular cards, charts, and tables that fetch and update real time market data through scheduled API polling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published