# krish04794/market_lens architecture

> Architecture diagram of the GitHub repository krish04794/market_lens, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krish04794/market_lens
- Repository: https://github.com/krish04794/market_lens

## Overview

MarketLens is a multi-asset market analysis dashboard backed by an Express API. Users explore market data and watchlists, screen assets, and review news, IPOs, charts, and portfolio-related tools. The backend also exposes AI query and news/IPO services. The excerpts verify API route registration, one watchlist request, and several frontend component references; they do not establish most frontend-to-API wiring or the implementation of every README capability, so those links are omitted.

Main entry points: [`pro-trading-platform/src/components/modules/news/NewsModule.tsx`](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsModule.tsx) (News module), [`backend/src/server.js`](https://github.com/krish04794/market_lens/blob/main/backend/src/server.js) (Express API), [`pro-trading-platform/src/components/modules/screener/ScreenerResults.tsx`](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/ScreenerResults.tsx) (Screener results), [`pro-trading-platform/src/components/modules/WatchlistModule.tsx`](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/WatchlistModule.tsx) (Watchlist)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Dashboard experience"]
  node_dashboard["Dashboard page<br/>[page.tsx]"]
  node_app_layout["App layout<br/>[AppLayout.tsx]"]
  node_dashboard_state["Dashboard state"]
  node_alerts["Price alerts<br/>[AlertsModule.tsx]"]
  node_portfolio["Portfolio"]
  node_settings["Settings<br/>[SettingsModule.tsx]"]
end

subgraph group_market["Market exploration"]
  node_watchlist["Watchlist"]
  node_trading_chart["Trading chart<br/>[TradingChart.tsx]"]
  node_expectation_chart["Expectation chart"]
  node_symbol_mapper["Symbol mapping<br/>[symbolMapper.ts]"]
end

subgraph group_analysis["Screening and insight"]
  node_screener["Screener<br/>[ScreenerModule.tsx]"]
  node_screener_filters["Screener filters"]
  node_ai_screener["AI screener"]
  node_screener_results["Screener results"]
  node_ai_api["AI queries<br/>[ai.js]"]
end

subgraph group_coverage["Market coverage"]
  node_news_module["News module<br/>[NewsModule.tsx]"]
  node_news_feed["News feed<br/>[NewsFeed.tsx]"]
  node_news_filters["News filters<br/>[NewsFilters.tsx]"]
  node_news_header["News header<br/>[NewsHeader.tsx]"]
  node_news_detail["Article detail"]
  node_market_pulse["Market pulse"]
  node_top_news["Top market news<br/>[TopMarketNews.tsx]"]
  node_trending_sentiment["Trending sentiment"]
  node_news_state["News state<br/>[useNewsStore.ts]"]
  node_ipo_module["IPO explorer<br/>[IPOModule.tsx]"]
  node_ipo_live["Live IPOs<br/>[IPOLiveModule.tsx]"]
  node_ipo_data["IPO data<br/>[ipoData.ts]"]
  node_ipo_live_service["IPO live service<br/>[ipoLiveService.ts]"]
  node_economic_calendar["Economic calendar"]
end

subgraph group_api["Backend API"]
  node_backend_server["Express API<br/>[server.js]"]
  node_market_api["Market endpoints<br/>[market.js]"]
  node_screener_api["Screener endpoints<br/>[screener.js]"]
  node_news_api["News endpoints<br/>[news.js]"]
end

node_user(("Market user"))

node_user -.->|"opens"| node_dashboard
node_watchlist -->|"requests assets"| node_market_api
node_screener -->|"references"| node_watchlist
node_screener_results -->|"reads"| node_dashboard_state
node_screener_results -->|"uses"| node_symbol_mapper
node_news_module -->|"renders"| node_news_header
node_news_module -->|"renders"| node_news_filters
node_news_module -->|"renders"| node_top_news
node_news_module -->|"renders"| node_news_feed
node_news_module -->|"renders"| node_market_pulse
node_news_module -->|"renders"| node_trending_sentiment
node_news_module -->|"renders"| node_news_detail
node_backend_server -->|"mounts"| node_market_api
node_backend_server -->|"mounts"| node_screener_api
node_backend_server -->|"mounts"| node_news_api
node_backend_server -->|"mounts"| node_ai_api
node_backend_server -.->|"mounts IPO route"| node_ipo_module

click node_dashboard "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/app/page.tsx"
click node_app_layout "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/layout/AppLayout.tsx"
click node_dashboard_state "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/store/useDashboardStore.ts"
click node_alerts "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/alerts/AlertsModule.tsx"
click node_portfolio "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/portfolio/PortfolioModule.tsx"
click node_settings "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/settings/SettingsModule.tsx"
click node_watchlist "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/WatchlistModule.tsx"
click node_trading_chart "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/chart/TradingChart.tsx"
click node_expectation_chart "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/chart/ExpectationVsRealityChart.tsx"
click node_symbol_mapper "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/utils/symbolMapper.ts"
click node_screener "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/ScreenerModule.tsx"
click node_screener_filters "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/ScreenerFilters.tsx"
click node_ai_screener "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/AIScreenerPanel.tsx"
click node_screener_results "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/ScreenerResults.tsx"
click node_ai_api "https://github.com/krish04794/market_lens/blob/main/backend/src/routes/ai.js"
click node_news_module "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsModule.tsx"
click node_news_feed "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsFeed.tsx"
click node_news_filters "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsFilters.tsx"
click node_news_header "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsHeader.tsx"
click node_news_detail "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/ArticleDetailModal.tsx"
click node_market_pulse "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/MarketPulsePanel.tsx"
click node_top_news "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/TopMarketNews.tsx"
click node_trending_sentiment "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/TrendingSentimentPanel.tsx"
click node_news_state "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/store/useNewsStore.ts"
click node_ipo_module "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/ipo/IPOModule.tsx"
click node_ipo_live "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/ipo/IPOLiveModule.tsx"
click node_ipo_data "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/lib/ipoData.ts"
click node_ipo_live_service "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/lib/ipoLiveService.ts"
click node_economic_calendar "https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/economic-calendar/EconomicCalendarModule.tsx"
click node_backend_server "https://github.com/krish04794/market_lens/blob/main/backend/src/server.js"
click node_market_api "https://github.com/krish04794/market_lens/blob/main/backend/src/routes/market.js"
click node_screener_api "https://github.com/krish04794/market_lens/blob/main/backend/src/routes/screener.js"
click node_news_api "https://github.com/krish04794/market_lens/blob/main/backend/src/routes/news.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_app_layout,node_dashboard_state,node_alerts,node_portfolio,node_settings,node_user toneBlue
class node_watchlist,node_trading_chart,node_expectation_chart,node_symbol_mapper toneAmber
class node_screener,node_screener_filters,node_ai_screener,node_screener_results,node_ai_api toneMint
class node_news_module,node_news_feed,node_news_filters,node_news_header,node_news_detail,node_market_pulse,node_top_news,node_trending_sentiment,node_news_state,node_ipo_module,node_ipo_live,node_ipo_data,node_ipo_live_service,node_economic_calendar toneRose
class node_backend_server,node_market_api,node_screener_api,node_news_api toneIndigo
```

## Components

### Dashboard experience

- [Dashboard page](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/app/page.tsx): `pro-trading-platform/src/app/page.tsx`
- [App layout](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/layout/AppLayout.tsx): `pro-trading-platform/src/components/layout/AppLayout.tsx`
- [Dashboard state](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/store/useDashboardStore.ts): `pro-trading-platform/src/store/useDashboardStore.ts`
- [Price alerts](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/alerts/AlertsModule.tsx): `pro-trading-platform/src/components/modules/alerts/AlertsModule.tsx`
- [Portfolio](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/portfolio/PortfolioModule.tsx): `pro-trading-platform/src/components/modules/portfolio/PortfolioModule.tsx`
- [Settings](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/settings/SettingsModule.tsx): `pro-trading-platform/src/components/modules/settings/SettingsModule.tsx`

### Market exploration

- [Watchlist](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/WatchlistModule.tsx): `pro-trading-platform/src/components/modules/WatchlistModule.tsx`
- [Trading chart](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/chart/TradingChart.tsx): `pro-trading-platform/src/components/chart/TradingChart.tsx`
- [Expectation chart](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/chart/ExpectationVsRealityChart.tsx): `pro-trading-platform/src/components/chart/ExpectationVsRealityChart.tsx`
- [Symbol mapping](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/utils/symbolMapper.ts): `pro-trading-platform/src/utils/symbolMapper.ts`

### Screening and insight

- [Screener](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/ScreenerModule.tsx): `pro-trading-platform/src/components/modules/screener/ScreenerModule.tsx`
- [Screener filters](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/ScreenerFilters.tsx): `pro-trading-platform/src/components/modules/screener/ScreenerFilters.tsx`
- [AI screener](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/AIScreenerPanel.tsx): `pro-trading-platform/src/components/modules/screener/AIScreenerPanel.tsx`
- [Screener results](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/screener/ScreenerResults.tsx): `pro-trading-platform/src/components/modules/screener/ScreenerResults.tsx`
- [AI queries](https://github.com/krish04794/market_lens/blob/main/backend/src/routes/ai.js): `backend/src/routes/ai.js`

### Market coverage

- [News module](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsModule.tsx): `pro-trading-platform/src/components/modules/news/NewsModule.tsx`
- [News feed](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsFeed.tsx): `pro-trading-platform/src/components/modules/news/NewsFeed.tsx`
- [News filters](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsFilters.tsx): `pro-trading-platform/src/components/modules/news/NewsFilters.tsx`
- [News header](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/NewsHeader.tsx): `pro-trading-platform/src/components/modules/news/NewsHeader.tsx`
- [Article detail](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/ArticleDetailModal.tsx): `pro-trading-platform/src/components/modules/news/ArticleDetailModal.tsx`
- [Market pulse](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/MarketPulsePanel.tsx): `pro-trading-platform/src/components/modules/news/MarketPulsePanel.tsx`
- [Top market news](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/TopMarketNews.tsx): `pro-trading-platform/src/components/modules/news/TopMarketNews.tsx`
- [Trending sentiment](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/news/TrendingSentimentPanel.tsx): `pro-trading-platform/src/components/modules/news/TrendingSentimentPanel.tsx`
- [News state](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/store/useNewsStore.ts): `pro-trading-platform/src/store/useNewsStore.ts`
- [IPO explorer](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/ipo/IPOModule.tsx): `pro-trading-platform/src/components/modules/ipo/IPOModule.tsx`
- [Live IPOs](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/ipo/IPOLiveModule.tsx): `pro-trading-platform/src/components/modules/ipo/IPOLiveModule.tsx`
- [IPO data](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/lib/ipoData.ts): `pro-trading-platform/src/lib/ipoData.ts`
- [IPO live service](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/lib/ipoLiveService.ts): `pro-trading-platform/src/lib/ipoLiveService.ts`
- [Economic calendar](https://github.com/krish04794/market_lens/blob/main/pro-trading-platform/src/components/modules/economic-calendar/EconomicCalendarModule.tsx): `pro-trading-platform/src/components/modules/economic-calendar/EconomicCalendarModule.tsx`

### Backend API

- [Express API](https://github.com/krish04794/market_lens/blob/main/backend/src/server.js): `backend/src/server.js`
- [Market endpoints](https://github.com/krish04794/market_lens/blob/main/backend/src/routes/market.js): `backend/src/routes/market.js`
- [Screener endpoints](https://github.com/krish04794/market_lens/blob/main/backend/src/routes/screener.js): `backend/src/routes/screener.js`
- [News endpoints](https://github.com/krish04794/market_lens/blob/main/backend/src/routes/news.js): `backend/src/routes/news.js`

### Other components

- **Market user**

## Connections

- Market user → Dashboard page: opens
- Watchlist → Market endpoints: requests assets (evidence: `pro-trading-platform/src/components/modules/WatchlistModule.tsx`)
- Screener → Watchlist: references (evidence: `pro-trading-platform/src/components/modules/screener/ScreenerModule.tsx`)
- Screener results → Dashboard state: reads (evidence: `pro-trading-platform/src/components/modules/screener/ScreenerResults.tsx`)
- Screener results → Symbol mapping: uses (evidence: `pro-trading-platform/src/components/modules/screener/ScreenerResults.tsx`)
- News module → News header: renders (evidence: `pro-trading-platform/src/components/modules/news/NewsModule.tsx`)
- News module → News filters: renders (evidence: `pro-trading-platform/src/components/modules/news/NewsModule.tsx`)
- News module → Top market news: renders (evidence: `pro-trading-platform/src/components/modules/news/NewsModule.tsx`)
- News module → News feed: renders (evidence: `pro-trading-platform/src/components/modules/news/NewsModule.tsx`)
- News module → Market pulse: renders (evidence: `pro-trading-platform/src/components/modules/news/NewsModule.tsx`)
- News module → Trending sentiment: renders (evidence: `pro-trading-platform/src/components/modules/news/NewsModule.tsx`)
- News module → Article detail: renders (evidence: `pro-trading-platform/src/components/modules/news/NewsModule.tsx`)
- Express API → Market endpoints: mounts (evidence: `backend/src/server.js`)
- Express API → Screener endpoints: mounts (evidence: `backend/src/server.js`)
- Express API → News endpoints: mounts (evidence: `backend/src/server.js`)
- Express API → AI queries: mounts (evidence: `backend/src/server.js`)
- Express API → IPO explorer: mounts IPO route
