# jaikumararjunan/alchemy-cockpit architecture

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

- Interactive diagram: https://gitdiagram.com/jaikumararjunan/alchemy-cockpit
- Repository: https://github.com/jaikumararjunan/alchemy-cockpit

## Overview

Alchemy Cockpit is a trading-game dashboard for monitoring options, simulating outcomes, reviewing performance, and optionally sending guarded orders. The documented user flow is to select an instrument, inspect live data or analysis, and—only with trading enabled—confirm an order that passes the discipline guard before it reaches a broker. The README describes frontend, backend, and persistence responsibilities, but no source excerpts or unpacked tree are available; implementation paths are therefore left null, and edges reflect documented relationships only.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Cockpit interface"]
  node_cockpit["Cockpit UI"]
  node_live["Live dashboard"]
  node_timestamps["Timestamp console"]
  node_simulator["Options simulator"]
  node_breakodds["Break odds"]
  node_pnl["P&amp;L projection"]
  node_journal["Trade journal"]
  node_settings["Settings"]
end

subgraph group_market["Market data and analysis"]
  node_api["Cockpit API"]
  node_analytics["Pricing analytics"]
  node_recorder["Market recorder"]
end

subgraph group_trading["Trading and brokers"]
  node_guard["Discipline guard"]
  node_orderlog["Order log"]
  node_dhan["Dhan adapter"]
  node_delta["Delta adapter"]
end

subgraph group_state["Persistence"]
  node_sqlite[("Cockpit database")]
end

node_trader(("Trader"))
node_brokers["Broker services"]

node_trader -->|"uses"| node_cockpit
node_cockpit -->|"requests data"| node_api
node_cockpit -->|"shows"| node_live
node_cockpit -->|"shows"| node_timestamps
node_cockpit -->|"shows"| node_simulator
node_cockpit -->|"shows"| node_breakodds
node_cockpit -->|"shows"| node_pnl
node_cockpit -->|"shows"| node_journal
node_cockpit -->|"shows"| node_settings
node_api -.->|"uses"| node_analytics
node_recorder -->|"fetches snapshots"| node_dhan
node_recorder -.->|"records snapshots"| node_sqlite
node_settings -->|"configures connections"| node_api
node_api -->|"tests connections"| node_brokers
node_dhan -->|"connects to"| node_brokers
node_delta -->|"connects to"| node_brokers
node_cockpit -->|"submits confirmed orders"| node_guard
node_guard -->|"sends entries"| node_dhan
node_guard -->|"logs outcomes"| node_orderlog
node_api -.->|"persists app data"| node_sqlite

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_cockpit,node_live,node_timestamps,node_simulator,node_breakodds,node_pnl,node_journal,node_settings toneBlue
class node_api,node_analytics,node_recorder toneAmber
class node_guard,node_orderlog,node_dhan,node_delta toneMint
class node_sqlite toneRose
class node_trader,node_brokers toneIndigo
```

## Components

### Cockpit interface

- **Cockpit UI**
- **Live dashboard**
- **Timestamp console**
- **Options simulator**
- **Break odds**
- **P&L projection**
- **Trade journal**
- **Settings**

### Market data and analysis

- **Cockpit API**
- **Pricing analytics**
- **Market recorder**

### Trading and brokers

- **Discipline guard**
- **Order log**
- **Dhan adapter**
- **Delta adapter**

### Persistence

- **Cockpit database**

### Other components

- **Trader**
- **Broker services**

## Connections

- Trader → Cockpit UI: uses (evidence: `README.md`)
- Cockpit UI → Cockpit API: requests data (evidence: `README.md`)
- Cockpit UI → Live dashboard: shows (evidence: `README.md`)
- Cockpit UI → Timestamp console: shows (evidence: `README.md`)
- Cockpit UI → Options simulator: shows (evidence: `README.md`)
- Cockpit UI → Break odds: shows (evidence: `README.md`)
- Cockpit UI → P&L projection: shows (evidence: `README.md`)
- Cockpit UI → Trade journal: shows (evidence: `README.md`)
- Cockpit UI → Settings: shows (evidence: `README.md`)
- Cockpit API → Pricing analytics: uses
- Market recorder → Dhan adapter: fetches snapshots (evidence: `README.md`)
- Market recorder → Cockpit database: records snapshots
- Settings → Cockpit API: configures connections (evidence: `README.md`)
- Cockpit API → Broker services: tests connections (evidence: `README.md`)
- Dhan adapter → Broker services: connects to (evidence: `README.md`)
- Delta adapter → Broker services: connects to (evidence: `README.md`)
- Cockpit UI → Discipline guard: submits confirmed orders (evidence: `README.md`)
- Discipline guard → Dhan adapter: sends entries (evidence: `README.md`)
- Discipline guard → Order log: logs outcomes (evidence: `README.md`)
- Cockpit API → Cockpit database: persists app data
