# abhii-navv/stock-market-trading-web-application architecture

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

- Interactive diagram: https://gitdiagram.com/abhii-navv/stock-market-trading-web-application
- Repository: https://github.com/abhii-navv/stock-market-trading-web-application

## Overview

Nova Capital is a PHP/MySQL stock-portfolio simulator: users register or sign in, trade six featured stocks with virtual funds, then review balances, holdings, and transaction history. The repository contains v1 and a redesigned v2; the graph emphasizes v2 while retaining v1’s substantial dashboard, history, and registration modules. README descriptions establish the major product capabilities; sampled source gives limited implementation detail, so some subsystem links are documented at a broad level rather than traced through every request.

Main entry points: [`nova_capital_new/dash1.php`](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/dash1.php) (Live dashboard), [`nova_capital_new`](https://github.com/abhii-navv/stock-market-trading-web-application/tree/main/nova_capital_new) (Stock trading pages), [`nova_capital_new/apple_transaction.php`](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/apple_transaction.php) (Trade handlers), [`nova_capital/registration.php`](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/registration.php) (Registration handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts"]
  node_v2_auth["Sign-in and signup<br/>[signin.php]"]
  node_v2_registration["Registration handler<br/>[registration.php]"]
end

subgraph group_trading["Trading"]
  node_v2_trade_pages["Stock trading pages"]
  node_v2_trade_handlers["Trade handlers"]
end

subgraph group_portfolio["Portfolio"]
  node_v2_holdings["Owned-stock queries"]
  node_v2_balance["Balance endpoint<br/>[get_balance.php]"]
  node_v2_dashboard["Live dashboard<br/>[dash1.php]"]
  node_v2_history["Transaction history<br/>[stock-history.php]"]
  node_v2_market_history["Market history view<br/>[his.php]"]
  node_v2_store[("MySQL data store")]
end

subgraph group_versions["Version One"]
  node_v1_dashboard["Dashboard<br/>[dash1.php]"]
  node_v1_history["Transaction history<br/>[stock-history.php]"]
  node_v1_market_history["Market history view<br/>[his.php]"]
  node_v1_registration["Registration handler<br/>[registration.php]"]
  node_v1_signin["Sign-in page<br/>[signin.php]"]
  node_v1_trades["Trade handlers"]
  node_v1_store[("MySQL data store")]
end

node_user(("Investor"))

node_user -->|"signs in"| node_v2_auth
node_user -->|"registers"| node_v2_registration
node_user -->|"places trades"| node_v2_trade_pages
node_v2_trade_pages -.->|"submits trades"| node_v2_trade_handlers
node_v2_trade_handlers -.->|"records trades"| node_v2_store
node_v2_dashboard -.->|"refreshes balance"| node_v2_balance
node_v2_dashboard -.->|"shows holdings"| node_v2_holdings
node_v2_dashboard -.->|"queries stats"| node_v2_store
node_v2_history -->|"reads transactions"| node_v2_store
node_v2_market_history -.->|"reads market data"| node_v2_store
node_user -->|"signs in"| node_v1_signin
node_user -->|"registers"| node_v1_registration
node_v1_registration -.->|"creates account"| node_v1_store
node_v1_trades -.->|"records trades"| node_v1_store
node_v1_dashboard -.->|"loads portfolio"| node_v1_store
node_v1_history -.->|"reads transactions"| node_v1_store
node_v1_market_history -.->|"reads market data"| node_v1_store

click node_v2_auth "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/signin.php"
click node_v2_registration "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/registration.php"
click node_v2_trade_pages "https://github.com/abhii-navv/stock-market-trading-web-application/tree/main/nova_capital_new"
click node_v2_trade_handlers "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/apple_transaction.php"
click node_v2_holdings "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/get_owned_stocks_apple.php"
click node_v2_balance "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/get_balance.php"
click node_v2_dashboard "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/dash1.php"
click node_v2_history "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/stock-history.php"
click node_v2_market_history "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/his.php"
click node_v1_dashboard "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/dash1.php"
click node_v1_history "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/stock-history.php"
click node_v1_market_history "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/his.php"
click node_v1_registration "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/registration.php"
click node_v1_signin "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/signin.php"
click node_v1_trades "https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/apple_transaction.php"

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_v2_auth,node_v2_registration toneBlue
class node_v2_trade_pages,node_v2_trade_handlers toneAmber
class node_v2_holdings,node_v2_balance,node_v2_dashboard,node_v2_history,node_v2_market_history,node_v2_store toneMint
class node_v1_dashboard,node_v1_history,node_v1_market_history,node_v1_registration,node_v1_signin,node_v1_trades,node_v1_store toneRose
class node_user toneIndigo
```

## Components

### Accounts

- [Sign-in and signup](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/signin.php): `nova_capital_new/signin.php`
- [Registration handler](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/registration.php): `nova_capital_new/registration.php`

### Trading

- [Stock trading pages](https://github.com/abhii-navv/stock-market-trading-web-application/tree/main/nova_capital_new): `nova_capital_new`
- [Trade handlers](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/apple_transaction.php): `nova_capital_new/apple_transaction.php`

### Portfolio

- [Owned-stock queries](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/get_owned_stocks_apple.php): `nova_capital_new/get_owned_stocks_apple.php`
- [Balance endpoint](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/get_balance.php): `nova_capital_new/get_balance.php`
- [Live dashboard](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/dash1.php): `nova_capital_new/dash1.php`
- [Transaction history](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/stock-history.php): `nova_capital_new/stock-history.php`
- [Market history view](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital_new/his.php): `nova_capital_new/his.php`
- **MySQL data store**

### Version One

- [Dashboard](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/dash1.php): `nova_capital/dash1.php`
- [Transaction history](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/stock-history.php): `nova_capital/stock-history.php`
- [Market history view](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/his.php): `nova_capital/his.php`
- [Registration handler](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/registration.php): `nova_capital/registration.php`
- [Sign-in page](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/signin.php): `nova_capital/signin.php`
- [Trade handlers](https://github.com/abhii-navv/stock-market-trading-web-application/blob/main/nova_capital/apple_transaction.php): `nova_capital/apple_transaction.php`
- **MySQL data store**

### Other components

- **Investor**

## Connections

- Investor → Sign-in and signup: signs in (evidence: `README.md`)
- Investor → Registration handler: registers (evidence: `README.md`)
- Investor → Stock trading pages: places trades (evidence: `README.md`)
- Stock trading pages → Trade handlers: submits trades (evidence: `README.md`)
- Trade handlers → MySQL data store: records trades (evidence: `README.md`)
- Live dashboard → Balance endpoint: refreshes balance (evidence: `README.md`)
- Live dashboard → Owned-stock queries: shows holdings (evidence: `README.md`)
- Live dashboard → MySQL data store: queries stats (evidence: `README.md`)
- Transaction history → MySQL data store: reads transactions (evidence: `nova_capital_new/stock-history.php`)
- Market history view → MySQL data store: reads market data
- Investor → Sign-in page: signs in (evidence: `README.md`)
- Investor → Registration handler: registers (evidence: `README.md`)
- Registration handler → MySQL data store: creates account (evidence: `README.md`)
- Trade handlers → MySQL data store: records trades (evidence: `README.md`)
- Dashboard → MySQL data store: loads portfolio (evidence: `README.md`)
- Transaction history → MySQL data store: reads transactions (evidence: `README.md`)
- Market history view → MySQL data store: reads market data
