# rxb096240/market-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/rxb096240/market-pulse
- Repository: https://github.com/rxb096240/market-pulse

## Overview

Market Pulse is a browser-based financial dashboard, also wrapped for Android. Users browse market data, news, and learning tools; signed-in users can track watchlists and portfolios or make simulated trades. The browser calls an Express API for market and news data, while Supabase provides authentication and persistence. The graph includes documented capabilities whose individual implementations were not sampled; their paths point to the existing public directory. Some backend routes and integrations are described only in the README, so those links cite it rather than implying unsampled code details.

Main entry points: [`server.js`](https://github.com/rxb096240/market-pulse/blob/main/server.js) (Express API), [`public/main.js`](https://github.com/rxb096240/market-pulse/blob/main/public/main.js) (App bootstrap), [`public/nav.js`](https://github.com/rxb096240/market-pulse/blob/main/public/nav.js) (Navigation and views), [`public/markets.js`](https://github.com/rxb096240/market-pulse/blob/main/public/markets.js) (Markets overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard experience"]
  node_bootstrap["App bootstrap<br/>[main.js]"]
  node_navigation["Navigation and views<br/>[nav.js]"]
  node_calculators["Financial calculators<br/>[calculator.js]"]
  node_budgeting["Budgeting tools<br/>[budgeting.js]"]
end

subgraph group_markets["Market features"]
  node_marketviews["Markets overview<br/>[markets.js]"]
  node_home["Home dashboard<br/>[home.js]"]
  node_watchlist["Watchlists<br/>[watchlist.js]"]
  node_forex["Forex rates<br/>[forex.js]"]
  node_earnings["Earnings calendar<br/>[earnings.js]"]
  node_trending["Trending coins<br/>[trending.js]"]
  node_topmovers["Top movers<br/>[topmovers.js]"]
  node_news["News feeds<br/>[news.js]"]
  node_learning["Learning content"]
end

subgraph group_accounts["Accounts and trading"]
  node_auth["Authentication<br/>[auth.js]"]
  node_portfolio["Portfolio tracking<br/>[portfolio.js]"]
  node_practice["Practice trading<br/>[practice.js]"]
  node_admin["Admin reports<br/>[admin.js]"]
end

subgraph group_backend["API and data access"]
  node_api["Express API<br/>[server.js]"]
  node_cache["Endpoint cache<br/>[server.js]"]
end

subgraph group_services["External services"]
  node_supabase[("Supabase")]
  node_marketproviders["Market data APIs"]
  node_newsproviders["News sources"]
end

node_user(("Dashboard user"))

node_user -->|"browses"| node_navigation
node_navigation -->|"selects view"| node_bootstrap
node_bootstrap -->|"refreshes grids"| node_marketviews
node_bootstrap -->|"refreshes feeds"| node_news
node_user -->|"uses tools"| node_calculators
node_user -->|"uses tools"| node_budgeting
node_user -->|"views snapshot"| node_home
node_marketviews -->|"fetches market data"| node_api
node_watchlist -->|"searches assets"| node_api
node_home -.->|"loads market data"| node_api
node_forex -.->|"loads rates"| node_api
node_earnings -.->|"loads calendar"| node_api
node_trending -.->|"loads trends"| node_api
node_topmovers -.->|"loads movers"| node_api
node_news -->|"requests feeds"| node_api
node_user -->|"signs in"| node_auth
node_auth -->|"authenticates"| node_supabase
node_bootstrap -->|"loads holdings"| node_portfolio
node_bootstrap -->|"loads account"| node_practice
node_portfolio -->|"reads and writes"| node_supabase
node_practice -->|"reads and writes"| node_supabase
node_admin -->|"requests reports"| node_api
node_user -.->|"requests API"| node_api
node_api -->|"uses cached fetch"| node_cache
node_api -->|"fetches quotes"| node_marketproviders
node_api -->|"aggregates news"| node_newsproviders
node_api -->|"persists data"| node_supabase

click node_bootstrap "https://github.com/rxb096240/market-pulse/blob/main/public/main.js"
click node_navigation "https://github.com/rxb096240/market-pulse/blob/main/public/nav.js"
click node_calculators "https://github.com/rxb096240/market-pulse/blob/main/public/calculator.js"
click node_budgeting "https://github.com/rxb096240/market-pulse/blob/main/public/budgeting.js"
click node_marketviews "https://github.com/rxb096240/market-pulse/blob/main/public/markets.js"
click node_home "https://github.com/rxb096240/market-pulse/blob/main/public/home.js"
click node_watchlist "https://github.com/rxb096240/market-pulse/blob/main/public/watchlist.js"
click node_forex "https://github.com/rxb096240/market-pulse/blob/main/public/forex.js"
click node_earnings "https://github.com/rxb096240/market-pulse/blob/main/public/earnings.js"
click node_trending "https://github.com/rxb096240/market-pulse/blob/main/public/trending.js"
click node_topmovers "https://github.com/rxb096240/market-pulse/blob/main/public/topmovers.js"
click node_news "https://github.com/rxb096240/market-pulse/blob/main/public/news.js"
click node_learning "https://github.com/rxb096240/market-pulse/tree/main/public"
click node_auth "https://github.com/rxb096240/market-pulse/blob/main/public/auth.js"
click node_portfolio "https://github.com/rxb096240/market-pulse/blob/main/public/portfolio.js"
click node_practice "https://github.com/rxb096240/market-pulse/blob/main/public/practice.js"
click node_admin "https://github.com/rxb096240/market-pulse/blob/main/public/admin.js"
click node_api "https://github.com/rxb096240/market-pulse/blob/main/server.js"
click node_cache "https://github.com/rxb096240/market-pulse/blob/main/server.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_bootstrap,node_navigation,node_calculators,node_budgeting,node_user toneBlue
class node_marketviews,node_home,node_watchlist,node_forex,node_earnings,node_trending,node_topmovers,node_news,node_learning toneAmber
class node_auth,node_portfolio,node_practice,node_admin toneMint
class node_api,node_cache toneRose
class node_supabase,node_marketproviders,node_newsproviders toneIndigo
```

## Components

### Dashboard experience

- [App bootstrap](https://github.com/rxb096240/market-pulse/blob/main/public/main.js): `public/main.js`
- [Navigation and views](https://github.com/rxb096240/market-pulse/blob/main/public/nav.js): `public/nav.js`
- [Financial calculators](https://github.com/rxb096240/market-pulse/blob/main/public/calculator.js): `public/calculator.js`
- [Budgeting tools](https://github.com/rxb096240/market-pulse/blob/main/public/budgeting.js): `public/budgeting.js`

### Market features

- [Markets overview](https://github.com/rxb096240/market-pulse/blob/main/public/markets.js): `public/markets.js`
- [Home dashboard](https://github.com/rxb096240/market-pulse/blob/main/public/home.js): `public/home.js`
- [Watchlists](https://github.com/rxb096240/market-pulse/blob/main/public/watchlist.js): `public/watchlist.js`
- [Forex rates](https://github.com/rxb096240/market-pulse/blob/main/public/forex.js): `public/forex.js`
- [Earnings calendar](https://github.com/rxb096240/market-pulse/blob/main/public/earnings.js): `public/earnings.js`
- [Trending coins](https://github.com/rxb096240/market-pulse/blob/main/public/trending.js): `public/trending.js`
- [Top movers](https://github.com/rxb096240/market-pulse/blob/main/public/topmovers.js): `public/topmovers.js`
- [News feeds](https://github.com/rxb096240/market-pulse/blob/main/public/news.js): `public/news.js`
- [Learning content](https://github.com/rxb096240/market-pulse/tree/main/public): `public`

### Accounts and trading

- [Authentication](https://github.com/rxb096240/market-pulse/blob/main/public/auth.js): `public/auth.js`
- [Portfolio tracking](https://github.com/rxb096240/market-pulse/blob/main/public/portfolio.js): `public/portfolio.js`
- [Practice trading](https://github.com/rxb096240/market-pulse/blob/main/public/practice.js): `public/practice.js`
- [Admin reports](https://github.com/rxb096240/market-pulse/blob/main/public/admin.js): `public/admin.js`

### API and data access

- [Express API](https://github.com/rxb096240/market-pulse/blob/main/server.js): `server.js`
- [Endpoint cache](https://github.com/rxb096240/market-pulse/blob/main/server.js): `server.js`

### External services

- **Supabase**
- **Market data APIs**
- **News sources**

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Navigation and views: browses (evidence: `README.md`)
- Navigation and views → App bootstrap: selects view (evidence: `public/main.js`)
- App bootstrap → Markets overview: refreshes grids (evidence: `public/main.js`)
- App bootstrap → News feeds: refreshes feeds (evidence: `public/main.js`)
- Dashboard user → Financial calculators: uses tools (evidence: `README.md`)
- Dashboard user → Budgeting tools: uses tools (evidence: `README.md`)
- Dashboard user → Home dashboard: views snapshot (evidence: `README.md`)
- Markets overview → Express API: fetches market data (evidence: `public/markets.js`)
- Watchlists → Express API: searches assets (evidence: `public/watchlist.js`)
- Home dashboard → Express API: loads market data
- Forex rates → Express API: loads rates
- Earnings calendar → Express API: loads calendar
- Trending coins → Express API: loads trends
- Top movers → Express API: loads movers
- News feeds → Express API: requests feeds (evidence: `public/news.js`)
- Dashboard user → Authentication: signs in (evidence: `README.md`)
- Authentication → Supabase: authenticates (evidence: `README.md`)
- App bootstrap → Portfolio tracking: loads holdings (evidence: `public/main.js`)
- App bootstrap → Practice trading: loads account (evidence: `public/main.js`)
- Portfolio tracking → Supabase: reads and writes (evidence: `public/portfolio.js`)
- Practice trading → Supabase: reads and writes (evidence: `public/practice.js`)
- Admin reports → Express API: requests reports (evidence: `public/admin.js`)
- Dashboard user → Express API: requests API
- Express API → Endpoint cache: uses cached fetch (evidence: `server.js`)
- Express API → Market data APIs: fetches quotes (evidence: `README.md`)
- Express API → News sources: aggregates news (evidence: `README.md`)
- Express API → Supabase: persists data (evidence: `README.md`)
