# yaswanthkorada8/stockmarket architecture

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

- Interactive diagram: https://gitdiagram.com/yaswanthkorada8/stockmarket
- Repository: https://github.com/yaswanthkorada8/stockmarket

## Overview

Invest India is a browser-based stock-market and investing demo. Users can search demo stock quotes, manage a watchlist, browse IPOs, search mutual funds and ETFs, and maintain a locally stored portfolio; account registration and login are also frontend-only. The graph separates UI orchestration, market features, and local account/portfolio state. Technical-analysis calculations are present, but the excerpts do not show them wired into the UI. README and excerpts provide limited evidence for page-to-script wiring, so unsupported connections are omitted.

Main entry points: [`js/app.js`](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/app.js) (Page Orchestration), [`js/auth.js`](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/auth.js) (Account Forms), [`index.html`](https://github.com/yaswanthkorada8/stockmarket/blob/main/index.html) (Market Page), [`login.html`](https://github.com/yaswanthkorada8/stockmarket/blob/main/login.html) (Login Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser UI"]
  node_home["Market Page<br/>[index.html]"]
  node_loginpage["Login Page<br/>[login.html]"]
  node_registerpage["Register Page<br/>[register.html]"]
  node_profilepage["Profile Page<br/>[profile.html]"]
  node_portfoliopage["Portfolio Page<br/>[portfolio.html]"]
  node_app["Page Orchestration<br/>[app.js]"]
end

subgraph group_market["Market Features"]
  node_quotes["Demo Stock Quotes<br/>[stock-api.js]"]
  node_analysis["Technical Analysis<br/>[stock-analysis.js]"]
  node_ipo["IPO Listings<br/>[ipo-api.js]"]
  node_funds["Mutual Fund Search<br/>[mutualfund-api.js]"]
  node_etfs["ETF Search<br/>[etf-api.js]"]
end

subgraph group_accounts["Accounts"]
  node_auth["Account Forms<br/>[auth.js]"]
  node_localstate[("Browser Storage")]
end

subgraph group_portfolio["Portfolio"]
  node_portfolio["Portfolio Management<br/>[portfolio.js]"]
end

node_user(("Investor"))

node_user -->|"opens"| node_home
node_user -->|"uses"| node_loginpage
node_user -->|"uses"| node_registerpage
node_user -->|"uses"| node_profilepage
node_user -->|"uses"| node_portfoliopage
node_home -.->|"runs"| node_app
node_loginpage -.->|"runs"| node_auth
node_registerpage -.->|"runs"| node_auth
node_portfoliopage -.->|"runs"| node_portfolio
node_app -->|"fetches"| node_quotes
node_app -->|"filters"| node_ipo
node_app -->|"searches"| node_funds
node_app -->|"searches"| node_etfs
node_app -->|"reads/writes"| node_localstate
node_auth -->|"reads/writes"| node_localstate
node_portfolio -->|"reads/writes"| node_localstate

click node_home "https://github.com/yaswanthkorada8/stockmarket/blob/main/index.html"
click node_loginpage "https://github.com/yaswanthkorada8/stockmarket/blob/main/login.html"
click node_registerpage "https://github.com/yaswanthkorada8/stockmarket/blob/main/register.html"
click node_profilepage "https://github.com/yaswanthkorada8/stockmarket/blob/main/profile.html"
click node_portfoliopage "https://github.com/yaswanthkorada8/stockmarket/blob/main/portfolio.html"
click node_app "https://github.com/yaswanthkorada8/stockmarket/blob/main/js/app.js"
click node_auth "https://github.com/yaswanthkorada8/stockmarket/blob/main/js/auth.js"
click node_quotes "https://github.com/yaswanthkorada8/stockmarket/blob/main/js/stock-api.js"
click node_analysis "https://github.com/yaswanthkorada8/stockmarket/blob/main/js/stock-analysis.js"
click node_ipo "https://github.com/yaswanthkorada8/stockmarket/blob/main/js/ipo-api.js"
click node_funds "https://github.com/yaswanthkorada8/stockmarket/blob/main/js/mutualfund-api.js"
click node_etfs "https://github.com/yaswanthkorada8/stockmarket/blob/main/js/etf-api.js"
click node_portfolio "https://github.com/yaswanthkorada8/stockmarket/blob/main/js/portfolio.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_home,node_loginpage,node_registerpage,node_profilepage,node_portfoliopage,node_app toneBlue
class node_quotes,node_analysis,node_ipo,node_funds,node_etfs toneAmber
class node_auth,node_localstate toneMint
class node_portfolio toneRose
class node_user toneIndigo
```

## Components

### Browser UI

- [Market Page](https://github.com/yaswanthkorada8/stockmarket/blob/main/index.html): `index.html`
- [Login Page](https://github.com/yaswanthkorada8/stockmarket/blob/main/login.html): `login.html`
- [Register Page](https://github.com/yaswanthkorada8/stockmarket/blob/main/register.html): `register.html`
- [Profile Page](https://github.com/yaswanthkorada8/stockmarket/blob/main/profile.html): `profile.html`
- [Portfolio Page](https://github.com/yaswanthkorada8/stockmarket/blob/main/portfolio.html): `portfolio.html`
- [Page Orchestration](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/app.js): `js/app.js`

### Market Features

- [Demo Stock Quotes](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/stock-api.js): `js/stock-api.js`
- [Technical Analysis](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/stock-analysis.js): `js/stock-analysis.js`
- [IPO Listings](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/ipo-api.js): `js/ipo-api.js`
- [Mutual Fund Search](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/mutualfund-api.js): `js/mutualfund-api.js`
- [ETF Search](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/etf-api.js): `js/etf-api.js`

### Accounts

- [Account Forms](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/auth.js): `js/auth.js`
- **Browser Storage**

### Portfolio

- [Portfolio Management](https://github.com/yaswanthkorada8/stockmarket/blob/main/js/portfolio.js): `js/portfolio.js`

### Other components

- **Investor**

## Connections

- Investor → Market Page: opens
- Investor → Login Page: uses
- Investor → Register Page: uses
- Investor → Profile Page: uses
- Investor → Portfolio Page: uses
- Market Page → Page Orchestration: runs
- Login Page → Account Forms: runs
- Register Page → Account Forms: runs
- Portfolio Page → Portfolio Management: runs
- Page Orchestration → Demo Stock Quotes: fetches (evidence: `js/app.js`)
- Page Orchestration → IPO Listings: filters (evidence: `js/app.js`)
- Page Orchestration → Mutual Fund Search: searches (evidence: `js/app.js`)
- Page Orchestration → ETF Search: searches (evidence: `js/app.js`)
- Page Orchestration → Browser Storage: reads/writes (evidence: `js/app.js`)
- Account Forms → Browser Storage: reads/writes (evidence: `js/auth.js`)
- Portfolio Management → Browser Storage: reads/writes (evidence: `js/portfolio.js`)
