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.
- 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
- Next.js (App Router)
- React + Redux Toolkit
- Recharts for charts
- Serverless proxy routes for secure API access
- Widget config lives in Redux (
dashboard.widgets) - Widget data lives in Redux (
dashboard.widgetData) with status and timestamps useWidgetDataPollinghandles refresh intervals, manual refresh, and stale-response protectionresponseNormalizerconverts arbitrary API responses into rows + fields for UI selectionAddWidgetModaltests endpoints, extracts fields, and validates selections
- Install dependencies:
npm install
- Create
.env.local:INDIAN_STOCK_API_KEY=your_key_here - Start the dev server:
npm run dev
Add INDIAN_STOCK_API_KEY in the Vercel project environment variables. Secrets are never exposed to the browser.
npm run devnpm run buildnpm run startnpm run lint
src/app- Next.js app router + API routessrc/components- Dashboard UI, widgets, modalssrc/utils- Normalization, formatting, API clientsrc/config- API definitions, templatessrc/redux- Store + slices
- 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)
- Proxy translates API errors into friendly messages and field hints
- 429 responses show "System is under heavy demand. Please wait..."
- A global
ErrorBoundaryprevents hard UI crashes