Skip to content

mahmoodalisha/groww-shark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Groww Shark ๐Ÿฆˆ

A Modern Finance Dashboard builder

Groww Shark is a full-featured finance dashboard builder built with Next.js (App Router), Redux Toolkit, and modern charting libraries.
It supports real-time market data, watchlists, widgets, advanced search, and interactive charts (line & candlestick) using real APIs no hard-coded data.


Screen.Recording.2025-12-25.210523.mp4
Screen.Recording.2025-12-27.233641.mp4
Screenshot 2025-12-25 231346 Screenshot 2025-12-25 231429 Screenshot 2025-12-26 162711 Screenshot 2025-12-26 171227 Screenshot 2025-12-28 180048 Screenshot 2025-12-28 185540 Screenshot 2025-12-27 233746 Screenshot 2025-12-27 233819 Screenshot 2026-01-09 030415 Screenshot 2025-12-27 021710 Screenshot 2025-12-27 233731 Screenshot 2025-12-27 190752

๐Ÿš€ Features Overview

๐Ÿ”น Market Coverage

  • Indices โ†’ Alpha Vantage API
  • Crypto โ†’ CoinRanking API (RapidAPI)
  • Stocks โ†’ Alpha Vantage API
  • Futures โ†’ Alpha Vantage API
  • Forex โ†’ Alpha Vantage API
  • F&O โ†’ Alpha Vantage API

๐Ÿ”น Live Market Data

  • Stocks / Indices / Forex โ†’ Alpha Vantage API
  • Crypto โ†’ CoinRanking API (RapidAPI)
  • No hard-coded prices โ€” all data is fetched live

๐Ÿ”น UI & UX

  • Color-coded price changes (Green โ†‘ / Red โ†“)
  • Expandable market categories with smooth animations
  • Loading states while fetching data
  • Responsive layout with dark theme

๐Ÿ“ Project Structure

groww-shark/
โ”‚
โ”œโ”€โ”€ public/
โ”‚
โ”œโ”€โ”€ src/
โ”‚
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ layout.js                    # App shell + BottomNav
โ”‚   โ”‚   โ”œโ”€โ”€ providers.js                 # Redux provider
โ”‚   โ”‚   โ”œโ”€โ”€ globals.css                  # Soft dark theme only
โ”‚   โ”‚   โ”œโ”€โ”€ page.js                      # Default โ†’ widgets
โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ watchlist/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ page.js                  # Market watch table
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ViewWatchlistModal.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ CreateWatchlistModal.js
โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ chart/                       #  FULL SCREEN CHART
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ page.js                  # Chart page (symbol-based)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ChartHeader.js           # Name, price, interval selector
โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ widgets/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ page.js                  # Widget grid (default page)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ AddWidgetModal.js
โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ explore/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ page.js
โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ community/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ page.js
โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ menu/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ page.js
โ”‚   โ”‚
โ”‚   โ”‚   โ””โ”€โ”€ api/
โ”‚   โ”‚       โ””โ”€โ”€ proxy/
โ”‚   โ”‚           โ”œโ”€โ”€ route.js              # Snapshot + router
โ”‚   โ”‚           โ””โ”€โ”€ history/
โ”‚   โ”‚               โ”œโ”€โ”€ alpha
โ”‚   โ”‚                   โ””โ”€โ”€ route.js
โ”‚
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ BottomNav.js
โ”‚   โ”‚   โ”œโ”€โ”€ WidgetCard.js                 # card / table / chart
โ”‚   โ”‚   โ”œโ”€โ”€ JsonExplorer.js 
โ”‚   โ”‚   โ”œโ”€โ”€ DashboardBackup.js 
โ”‚
โ”‚   โ”œโ”€โ”€ charts/                           #  CHART ENGINE
โ”‚   โ”‚   โ”œโ”€โ”€ ChartRenderer.js              # Chart.js wrapper
โ”‚   โ”‚   โ”œโ”€โ”€ CandleChart.js
โ”‚   โ”‚
โ”‚
โ”‚   โ”œโ”€โ”€ store/
โ”‚   โ”‚   โ”œโ”€โ”€ index.js                      # configureStore
โ”‚   โ”‚   โ”œโ”€โ”€ watchlistSlice.js
โ”‚   โ”‚   โ”œโ”€โ”€ marketDataSlice.js            # snapshot only
โ”‚   โ”‚   โ””โ”€โ”€ widgetsSlice.js
โ”‚
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ fetchers/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ snapshotFetcher.js        # watchlist/widgets prices
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ historyFetcher.js         # charts history only
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ widgetFetcher.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ cache.js                  # shared cache helper
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ normalizers/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ stockHistory.js           # Alpha โ†’ chart data
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ cryptoHistory.js          # CoinRanking โ†’ chart data
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ cryptoNormalizer.js       # CoinRanking โ†’ snapshot
โ”‚   โ”‚   โ”‚
โ”‚
โ”œโ”€โ”€ .env.local
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md


๐Ÿ“Š Market Data Architecture

Snapshot Data (Prices, % Change)

  • Fetched via /api/proxy
  • Uses Alpha Vantage GLOBAL_QUOTE
  • Cached for 5 minutes at the server level
  • Stored in Redux (marketDataSlice) for UI rendering

Historical Data (Candlestick Charts)

  • Fetched via /api/proxy/history/alpha
  • Uses Alpha Vantage TIME_SERIES_DAILY
  • Loaded only when switching to candlestick view

๐Ÿ“ˆ Chart System

Line Chart

  • Uses cached snapshot data
  • No additional API calls
  • Rendered via ChartRenderer.js (Chart.js wrapper)

Candlestick Chart

  • Uses Lightweight Charts v5
  • Fetches OHLC data only when needed
  • Fully interactive (zoom, pan, crosshair)

โญ Watchlist Dashboard

Supported Features

  • Multiple watchlists
  • Active watchlist switching
  • Add / remove instruments
  • Delete watchlists
  • UI flags for modals

Watchlist Creating Modal

  • Opens when isCreatingWatchlist === true
  • Contains: Input (watchlist name)
  • Create / Cancel buttons
  • Watchlist buttons
  • Rendered from state.watchlist.watchlists
  • Clicking โ†’ setActiveWatchlist(id)

User actions

  • User clicks + Create Watchlist, a modal opens

  • User types watchlist name, clicks Create, closes the modal

  • In that Modal user also has the option to set Active that watchlist

  • New watchlist appears as a tab button

  • That watchlist becomes active

  • Now in the dashboard user can click on any watchlist and set Active that watchlist so any instruments he stars goes to that active watchlist

  • User has another option to view the watchlist, he clicks on the eye icon and ViewWatchlistModal opens and in that modal the list appears and from this modal he can remove any instrument and can also delete the whole watchlist

  • All powered by Redux Toolkit (watchlistSlice).


๐Ÿงฉ Widgets Dashboard

widgets/page.js

  • Main widgets dashboard
  • Displays added widgets
  • Shows "+ Add Widget" placeholder
  • Controls AddWidgetModal visibility

AddWidgetModal.js

  • Create custom widgets
  • Configure:
    • Widget name
    • API source
    • Refresh interval
    • View type (card / table / chart)

๐Ÿ” Search System (No Extra APIs)

How Search Works

  • Source of truth: marketDataSlice.categories
  • Filters instruments by name or symbol
  • Uses Fuse.js for fuzzy search

Examples

  • Handles Spelling errors done by the User while search "Telsa" โ†’ Tesla Inc (TSLA) "Aplei" โ†’ Apple Inc (AAPL)

On Selection

  • Sets active instrument
  • Loads chart using cached snapshot or history

๐Ÿง  Caching Strategy

Cache #1 โ€” Server Cache (API Proxy)

  • Lives inside /api/proxy
  • Prevents repeated Alpha Vantage calls
  • TTL = 5 minutes

Cache #2 โ€” Client Cache (Redux)

  • Stores snapshot prices
  • Used for UI rendering
  • Does NOT prevent API calls

๐Ÿ”„ Data Flow (Clear Mental Model)

Search / Watchlist
โ†“
GLOBAL_QUOTE (Alpha Vantage)
โ†“
API Proxy Cache
โ†“
Redux Snapshot
โ†“
Line Chart (No API)
  • For Line Chart /api/proxy?function=GLOBAL_QUOTE&symbol=NVDA
Candlestick Chart
โ†“
TIME_SERIES_DAILY
โ†“
/api/proxy/history/alpha
โ†“
Lightweight Charts
  • For Candle Stick Graph /api/proxy/history/alpha?symbol=AAPL&interval=1D

โœ… hits Alpha Vantage
โŒ But subsequent calls may be served from server cache

Browser always calls /api/proxy
Proxy only calls Alpha Vantage when cache expires


๐Ÿง  Why This Architecture Works

  • Prevents API rate-limit issues
  • Zero redundant network calls
  • Scales well for large watchlists
  • Clear separation of concerns
  • Production-grade data flow

๐Ÿ Conclusion

Groww Shark is a production-ready finance dashboard demonstrating:

  • Real API integration
  • Advanced state management
  • Clean architecture
  • Scalable frontend design
  • Professional charting solutions

๐Ÿ”ฎ Future Scope & Enhancements

The current implementation lays a strong foundation, and the platform can be extended further with the following enhancements:

  • ๐Ÿงฒ Drag & Drop Widgets

    • Allow users to freely rearrange widgets on the dashboard using drag-and-drop.
    • Save widget layout preferences per user.
    • Improves personalization and dashboard flexibility.
  • ๐Ÿท๏ธ Company Logos & Branding

    • Display official company logos alongside stock names and symbols.
    • Fetch logos dynamically using symbol-based logo APIs.
    • Enhances visual clarity and brand recognition.
  • โฑ๏ธ Real-Time Streaming Updates

    • Integrate WebSockets or Server-Sent Events (SSE) for live price updates.
    • Reduce polling-based API calls.
    • Enables near real-time market movement tracking.
  • ๐Ÿ“ Resizable Widgets

    • Allow users to resize widgets (small / medium / large).
    • Better support for different data views like tables vs charts.
  • ๐Ÿ“ฑ Mobile-First Enhancements

    • Optimize chart interactions for touch gestures.
    • Improve widget layout responsiveness on smaller screens.

๐Ÿ™Œ Author

Built with โค๏ธ by Alisha Mahmood