# atharvatyagi-gif/samnidhy-sandbox architecture

> Architecture diagram of the GitHub repository atharvatyagi-gif/samnidhy-sandbox, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atharvatyagi-gif/samnidhy-sandbox
- Repository: https://github.com/atharvatyagi-gif/samnidhy-sandbox

## Overview

The README presents Samnidhy Sandbox as an educational stock-market site: session-picked NSE gainers and losers feed interactive lessons and historical-session pages. The supplied tree and excerpts also expose a much broader market-research terminal, including ALADIN forecasting, B-Lab analysis, live ticks, and globe views. The graph preserves those substantial visible subsystems, but the README’s update/build scripts and lesson-specific implementation are not present in the tree, so their internal data pipeline is not mapped. Edges rely on the README or shown source-index references and excerpts; unsampled wiring is omitted.

Main entry points: [`terminal.js`](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/terminal.js) (Market Terminal), [`scripts/blab/sentiment.py`](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/sentiment.py) (Sentiment Research), [`desk-nexus.js`](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/desk-nexus.js) (NEXUS Explorer), [`desk-signals.js`](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/desk-signals.js) (Signal Desk)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Terminal UI"]
  node_terminal["Market Terminal<br/>[terminal.js]"]
  node_nexus["NEXUS Explorer<br/>[desk-nexus.js]"]
  node_signals_ui["Signal Desk<br/>[desk-signals.js]"]
  node_chart["Chart Engine<br/>[chart-engine.js]"]
  node_indicators["Chart Indicators"]
end

subgraph group_aladin["ALADIN Research"]
  node_aladin_model["Forecast Models<br/>[aladin_model.py]"]
  node_a2_evaluate["Strategy Evaluation<br/>[evaluate.py]"]
  node_a2_registry["Strategy Registry<br/>[registry.py]"]
  node_a2_base["Strategy Contract<br/>[base.py]"]
  node_paper["Paper Trading<br/>[paper.py]"]
  node_a2_data[("Market Data Lake<br/>[data_lake.py]")]
end

subgraph group_blab["B-Lab Research"]
  node_blab_core["Research Framework<br/>[core.py]"]
  node_blab_fund["Fundamental Scouts<br/>[fundamental.py]"]
  node_blab_tech["Technical Research<br/>[technical.py]"]
  node_blab_sentiment["Sentiment Research<br/>[sentiment.py]"]
end

subgraph group_live["Market Data"]
  node_tick_daemon["Live Tick Daemon"]
  node_relay["Live Relay<br/>[relay.py]"]
end

subgraph group_context["Market Context"]
  node_globe["Globe Data<br/>[globe_data.py]"]
  node_crypto["Crypto Research<br/>[crypto_live.py]"]
end

node_browser(("User"))
node_nse["NSE Feeds"]

node_browser -->|"opens"| node_terminal
node_terminal -->|"opens explorer"| node_nexus
node_terminal -->|"loads desk"| node_signals_ui
node_terminal -->|"uses chart"| node_chart
node_chart -->|"uses indicators"| node_indicators
node_nexus -->|"references signals"| node_signals_ui
node_nexus -->|"references dependencies"| node_signals_ui
node_a2_evaluate -->|"loads strategies"| node_a2_registry
node_a2_evaluate -->|"uses contract"| node_a2_base
node_a2_registry -->|"builds strategies"| node_a2_base
node_paper -->|"reads data"| node_a2_data
node_blab_fund -->|"uses framework"| node_blab_core
node_blab_tech -->|"uses framework"| node_blab_core
node_blab_sentiment -->|"uses framework"| node_blab_core
node_blab_sentiment -->|"uses analysis"| node_blab_fund
node_blab_sentiment -->|"uses analysis"| node_blab_tech
node_tick_daemon -->|"polls feed"| node_nse
node_terminal -->|"loads globe data"| node_globe
node_terminal -->|"loads research desk"| node_crypto
node_terminal -->|"requests live ticks"| node_tick_daemon

click node_terminal "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/terminal.js"
click node_nexus "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/desk-nexus.js"
click node_signals_ui "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/desk-signals.js"
click node_chart "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/chart-engine.js"
click node_indicators "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/chart-indicators.js"
click node_aladin_model "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin_model.py"
click node_a2_evaluate "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/evaluate.py"
click node_a2_registry "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/strategies/registry.py"
click node_a2_base "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/strategies/base.py"
click node_paper "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/paper.py"
click node_a2_data "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/data_lake.py"
click node_blab_core "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/core.py"
click node_blab_fund "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/fundamental.py"
click node_blab_tech "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/technical.py"
click node_blab_sentiment "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/sentiment.py"
click node_tick_daemon "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin_ticker_daemon.py"
click node_relay "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/relay/relay.py"
click node_globe "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/globe_data.py"
click node_crypto "https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/crypto_live.py"

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_terminal,node_nexus,node_signals_ui,node_chart,node_indicators,node_browser toneBlue
class node_aladin_model,node_a2_evaluate,node_a2_registry,node_a2_base,node_paper,node_a2_data toneAmber
class node_blab_core,node_blab_fund,node_blab_tech,node_blab_sentiment toneMint
class node_tick_daemon,node_relay toneRose
class node_globe,node_crypto,node_nse toneIndigo
```

## Components

### Terminal UI

- [Market Terminal](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/terminal.js): `terminal.js`
- [NEXUS Explorer](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/desk-nexus.js): `desk-nexus.js`
- [Signal Desk](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/desk-signals.js): `desk-signals.js`
- [Chart Engine](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/chart-engine.js): `chart-engine.js`
- [Chart Indicators](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/chart-indicators.js): `chart-indicators.js`

### ALADIN Research

- [Forecast Models](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin_model.py): `scripts/aladin_model.py`
- [Strategy Evaluation](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/evaluate.py): `scripts/aladin2/evaluate.py`
- [Strategy Registry](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/strategies/registry.py): `scripts/aladin2/strategies/registry.py`
- [Strategy Contract](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/strategies/base.py): `scripts/aladin2/strategies/base.py`
- [Paper Trading](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/paper.py): `scripts/aladin2/paper.py`
- [Market Data Lake](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin2/data_lake.py): `scripts/aladin2/data_lake.py`

### B-Lab Research

- [Research Framework](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/core.py): `scripts/blab/core.py`
- [Fundamental Scouts](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/fundamental.py): `scripts/blab/fundamental.py`
- [Technical Research](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/technical.py): `scripts/blab/technical.py`
- [Sentiment Research](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/blab/sentiment.py): `scripts/blab/sentiment.py`

### Market Data

- [Live Tick Daemon](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/aladin_ticker_daemon.py): `scripts/aladin_ticker_daemon.py`
- [Live Relay](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/relay/relay.py): `relay/relay.py`

### Market Context

- [Globe Data](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/globe_data.py): `scripts/globe_data.py`
- [Crypto Research](https://github.com/atharvatyagi-gif/samnidhy-sandbox/blob/main/scripts/crypto_live.py): `scripts/crypto_live.py`

### Other components

- **User**
- **NSE Feeds**

## Connections

- User → Market Terminal: opens
- Market Terminal → NEXUS Explorer: opens explorer (evidence: `terminal.js`)
- Market Terminal → Signal Desk: loads desk (evidence: `terminal.js`)
- Market Terminal → Chart Engine: uses chart (evidence: `terminal.js`)
- Chart Engine → Chart Indicators: uses indicators (evidence: `chart-engine.js`)
- NEXUS Explorer → Signal Desk: references signals (evidence: `desk-nexus.js`)
- NEXUS Explorer → Signal Desk: references dependencies (evidence: `desk-nexus.js`)
- Strategy Evaluation → Strategy Registry: loads strategies (evidence: `scripts/aladin2/evaluate.py`)
- Strategy Evaluation → Strategy Contract: uses contract (evidence: `scripts/aladin2/evaluate.py`)
- Strategy Registry → Strategy Contract: builds strategies (evidence: `scripts/aladin2/strategies/registry.py`)
- Paper Trading → Market Data Lake: reads data (evidence: `scripts/aladin2/paper.py`)
- Fundamental Scouts → Research Framework: uses framework (evidence: `scripts/blab/fundamental.py`)
- Technical Research → Research Framework: uses framework (evidence: `scripts/blab/technical.py`)
- Sentiment Research → Research Framework: uses framework (evidence: `scripts/blab/sentiment.py`)
- Sentiment Research → Fundamental Scouts: uses analysis (evidence: `scripts/blab/sentiment.py`)
- Sentiment Research → Technical Research: uses analysis (evidence: `scripts/blab/sentiment.py`)
- Live Tick Daemon → NSE Feeds: polls feed (evidence: `scripts/aladin_ticker_daemon.py`)
- Market Terminal → Globe Data: loads globe data (evidence: `terminal.js`)
- Market Terminal → Crypto Research: loads research desk (evidence: `terminal.js`)
- Market Terminal → Live Tick Daemon: requests live ticks (evidence: `terminal.js`)
