# aaditya8459/atex architecture

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

- Interactive diagram: https://gitdiagram.com/aaditya8459/atex
- Repository: https://github.com/aaditya8459/atex

## Overview

ATEX is a foundation-stage trading operations and intelligence platform. The visible user workflow is a responsive dashboard where a user searches or selects workspace modules and sees the selected view; the current frontend is a shell, not a live trading-data client. A separate implemented workflow accepts authorized prop-firm source text, extracts review-needed rule candidates, and stores the source and candidates in PostgreSQL. AI, MCP, market integrations, and several platform capabilities are documented as scaffolded or planned; their runtime wiring is not shown in the sampled source.

Main entry points: [`apps/api/app/main.py`](https://github.com/aaditya8459/atex/blob/main/apps/api/app/main.py) (FastAPI application), [`apps/api/app/prop_firm/routes.py`](https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/routes.py) (Prop firm routes), [`apps/api/app/prop_firm/repository.py`](https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/repository.py) (Ingestion coordinator), [`apps/web/app/page.tsx`](https://github.com/aaditya8459/atex/blob/main/apps/web/app/page.tsx) (Dashboard shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Workspace"]
  node_dashboard["Dashboard shell<br/>[page.tsx]"]
  node_web_layout["Web layout<br/>[layout.tsx]"]
end

subgraph group_api["API foundation"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_settings["Runtime settings<br/>[config.py]"]
  node_status["Health and status<br/>[main.py]"]
  node_event_contracts["Event contracts<br/>[events.json]"]
  node_redis[("Redis cache")]
  node_rabbitmq["RabbitMQ events"]
end

subgraph group_prop["Prop firm intelligence"]
  node_prop_routes["Prop firm routes<br/>[routes.py]"]
  node_prop_schemas["Request and response schemas<br/>[schemas.py]"]
  node_provider_registry["Provider registry<br/>[providers.py]"]
  node_ingestion["Ingestion coordinator<br/>[repository.py]"]
  node_rule_extraction["Text and rule extraction<br/>[extraction.py]"]
end

subgraph group_ai["Agent foundation"]
  node_agent_runtime["Agent supervisor<br/>[supervisor.py]"]
  node_agent_contracts["Agent contracts<br/>[contracts.py]"]
  node_mcp["MCP tool boundary"]
end

node_user(("Workspace user"))
node_api_client(("API caller"))
node_postgres[("PostgreSQL")]

node_user -->|"uses"| node_dashboard
node_dashboard -->|"filters and selects"| node_dashboard
node_api_client -.->|"requests"| node_api_app
node_api_app -->|"serves"| node_status
node_api_app -->|"registers"| node_prop_routes
node_api_app -->|"configures"| node_settings
node_prop_routes -->|"reads settings"| node_settings
node_prop_routes -->|"validates and returns"| node_prop_schemas
node_prop_routes -->|"lists providers"| node_provider_registry
node_prop_routes -->|"invokes ingest"| node_ingestion
node_ingestion -->|"looks up provider"| node_provider_registry
node_ingestion -->|"extracts candidates"| node_rule_extraction
node_ingestion -->|"writes records"| node_postgres
node_agent_runtime -->|"validates and returns"| node_agent_contracts
node_agent_runtime -.->|"tool access planned"| node_mcp
node_ingestion -.->|"publishes events planned"| node_event_contracts
node_api_app -.->|"cache planned"| node_redis
node_api_app -.->|"async events planned"| node_rabbitmq

click node_dashboard "https://github.com/aaditya8459/atex/blob/main/apps/web/app/page.tsx"
click node_web_layout "https://github.com/aaditya8459/atex/blob/main/apps/web/app/layout.tsx"
click node_api_app "https://github.com/aaditya8459/atex/blob/main/apps/api/app/main.py"
click node_settings "https://github.com/aaditya8459/atex/blob/main/apps/api/app/config.py"
click node_status "https://github.com/aaditya8459/atex/blob/main/apps/api/app/main.py"
click node_prop_routes "https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/routes.py"
click node_prop_schemas "https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/schemas.py"
click node_provider_registry "https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/providers.py"
click node_ingestion "https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/repository.py"
click node_rule_extraction "https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/extraction.py"
click node_postgres "https://github.com/aaditya8459/atex/blob/main/infra/postgres/migrations/002_prop_firm_intelligence.sql"
click node_agent_runtime "https://github.com/aaditya8459/atex/blob/main/ai/supervisor.py"
click node_agent_contracts "https://github.com/aaditya8459/atex/blob/main/ai/contracts.py"
click node_mcp "https://github.com/aaditya8459/atex/tree/main/ai/mcp"
click node_event_contracts "https://github.com/aaditya8459/atex/blob/main/packages/contracts/events.json"

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_dashboard,node_web_layout,node_user toneBlue
class node_api_app,node_settings,node_status,node_event_contracts,node_redis,node_rabbitmq,node_postgres toneAmber
class node_prop_routes,node_prop_schemas,node_provider_registry,node_ingestion,node_rule_extraction,node_api_client toneMint
class node_agent_runtime,node_agent_contracts,node_mcp toneRose
```

## Components

### Workspace

- [Dashboard shell](https://github.com/aaditya8459/atex/blob/main/apps/web/app/page.tsx): `apps/web/app/page.tsx`
- [Web layout](https://github.com/aaditya8459/atex/blob/main/apps/web/app/layout.tsx): `apps/web/app/layout.tsx`

### API foundation

- [FastAPI application](https://github.com/aaditya8459/atex/blob/main/apps/api/app/main.py): `apps/api/app/main.py`
- [Runtime settings](https://github.com/aaditya8459/atex/blob/main/apps/api/app/config.py): `apps/api/app/config.py`
- [Health and status](https://github.com/aaditya8459/atex/blob/main/apps/api/app/main.py): `apps/api/app/main.py`
- [Event contracts](https://github.com/aaditya8459/atex/blob/main/packages/contracts/events.json): `packages/contracts/events.json`
- **Redis cache**
- **RabbitMQ events**

### Prop firm intelligence

- [Prop firm routes](https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/routes.py): `apps/api/app/prop_firm/routes.py`
- [Request and response schemas](https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/schemas.py): `apps/api/app/prop_firm/schemas.py`
- [Provider registry](https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/providers.py): `apps/api/app/prop_firm/providers.py`
- [Ingestion coordinator](https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/repository.py): `apps/api/app/prop_firm/repository.py`
- [Text and rule extraction](https://github.com/aaditya8459/atex/blob/main/apps/api/app/prop_firm/extraction.py): `apps/api/app/prop_firm/extraction.py`

### Agent foundation

- [Agent supervisor](https://github.com/aaditya8459/atex/blob/main/ai/supervisor.py): `ai/supervisor.py`
- [Agent contracts](https://github.com/aaditya8459/atex/blob/main/ai/contracts.py): `ai/contracts.py`
- [MCP tool boundary](https://github.com/aaditya8459/atex/tree/main/ai/mcp): `ai/mcp`

### Other components

- **Workspace user**
- **API caller**
- [PostgreSQL](https://github.com/aaditya8459/atex/blob/main/infra/postgres/migrations/002_prop_firm_intelligence.sql): `infra/postgres/migrations/002_prop_firm_intelligence.sql`

## Connections

- Workspace user → Dashboard shell: uses (evidence: `apps/web/app/page.tsx`)
- Dashboard shell → Dashboard shell: filters and selects (evidence: `apps/web/app/page.tsx`)
- API caller → FastAPI application: requests (evidence: `README.md`)
- FastAPI application → Health and status: serves (evidence: `apps/api/app/main.py`)
- FastAPI application → Prop firm routes: registers (evidence: `apps/api/app/main.py`)
- FastAPI application → Runtime settings: configures (evidence: `apps/api/app/main.py`)
- Prop firm routes → Runtime settings: reads settings (evidence: `apps/api/app/prop_firm/routes.py`)
- Prop firm routes → Request and response schemas: validates and returns (evidence: `apps/api/app/prop_firm/routes.py`)
- Prop firm routes → Provider registry: lists providers (evidence: `apps/api/app/prop_firm/routes.py`)
- Prop firm routes → Ingestion coordinator: invokes ingest (evidence: `apps/api/app/prop_firm/routes.py`)
- Ingestion coordinator → Provider registry: looks up provider (evidence: `apps/api/app/prop_firm/repository.py`)
- Ingestion coordinator → Text and rule extraction: extracts candidates (evidence: `apps/api/app/prop_firm/repository.py`)
- Ingestion coordinator → PostgreSQL: writes records (evidence: `apps/api/app/prop_firm/repository.py`)
- Agent supervisor → Agent contracts: validates and returns (evidence: `ai/supervisor.py`)
- Agent supervisor → MCP tool boundary: tool access planned (evidence: `README.md`)
- Ingestion coordinator → Event contracts: publishes events planned (evidence: `README.md`)
- FastAPI application → Redis cache: cache planned (evidence: `README.md`)
- FastAPI application → RabbitMQ events: async events planned (evidence: `README.md`)
