# itskiran-alt/atlas-dwn architecture

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

- Interactive diagram: https://gitdiagram.com/itskiran-alt/atlas-dwn
- Repository: https://github.com/itskiran-alt/atlas-dwn

## Overview

Atlas DWN is a prototype monitoring and recommendation-drafting workbench for relationship managers, not an execution system. An RM-facing UI event reaches server-side services, which can run the monitoring orchestrator: market context is checked, deterministic analysis and safety gates produce an evidence-backed proposal, and records are persisted for human review. Separate branches support Admin/RM/Client workspaces, reporting, and scheduled runs. The README documents these capabilities; some implementation links below rely on its architecture description and the source index, so unsampled details are not inferred.

Main entry points: [`dwn/agents/orchestrator.py`](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/orchestrator.py) (Run orchestrator), [`dwn/ui/controller.py`](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/ui/controller.py) (Event controller), [`dwn/services.py`](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/services.py) (RBAC and approvals), [`dwn/repo.py`](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/repo.py) (Data access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workbench["Workspaces"]
  node_app["Streamlit entry<br/>[app.py]"]
  node_ui_controller["Event controller<br/>[controller.py]"]
  node_ui_render["Workspace rendering<br/>[render.py]"]
end

subgraph group_application["Application services"]
  node_services["RBAC and approvals<br/>[services.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_reports["Reports<br/>[reports.py]"]
end

subgraph group_monitoring["Monitoring workflow"]
  node_orchestrator["Run orchestrator<br/>[orchestrator.py]"]
  node_engines["Deterministic engines"]
  node_gates["Consent and data gates<br/>[gates.py]"]
  node_quarantine["Untrusted-text scan<br/>[quarantine.py]"]
  node_skills["Drafting skills<br/>[skills.py]"]
  node_llm["LLM adapters<br/>[llm.py]"]
  node_proposal["Proposal and evidence<br/>[proposal.py]"]
end

subgraph group_data["Data services"]
  node_market["Market data<br/>[market.py]"]
  node_news["News feeds<br/>[news.py]"]
  node_http["Hardened HTTP<br/>[http.py]"]
end

subgraph group_operations["Persistence and scheduling"]
  node_repo["Data access<br/>[repo.py]"]
  node_database[("Persistent database<br/>[session.py]")]
  node_worker["Scheduled worker<br/>[run_scheduled.py]"]
  node_jobs["Schedule jobs<br/>[jobs.py]"]
end

node_rm(("Relationship manager"))
node_client(("Client"))
node_external_data(("Market and news sources"))

node_rm -->|"uses workspace"| node_app
node_client -->|"uses portal"| node_app
node_app -->|"routes events"| node_ui_controller
node_ui_controller -->|"calls services"| node_services
node_ui_controller -->|"authenticates"| node_auth
node_ui_controller -->|"renders view"| node_ui_render
node_services -->|"starts runs"| node_orchestrator
node_services -->|"builds reports"| node_reports
node_services -->|"reads and writes"| node_repo
node_orchestrator -->|"gets market context"| node_market
node_orchestrator -->|"computes analysis"| node_engines
node_orchestrator -->|"checks output"| node_gates
node_gates -->|"scans text"| node_quarantine
node_orchestrator -->|"requests drafts"| node_skills
node_skills -->|"requests interpretation"| node_llm
node_llm -.->|"calls optional provider"| node_external_data
node_orchestrator -->|"creates proposal"| node_proposal
node_orchestrator -->|"persists run and evidence"| node_repo
node_market -->|"fetches prices"| node_http
node_news -->|"fetches headlines"| node_http
node_market -->|"reads prices"| node_external_data
node_news -->|"reads headlines"| node_external_data
node_repo -->|"stores records"| node_database
node_worker -->|"runs schedules"| node_jobs
node_jobs -->|"runs monitoring"| node_orchestrator
node_jobs -->|"records job history"| node_repo

click node_app "https://github.com/itskiran-alt/atlas-dwn/blob/main/app.py"
click node_ui_controller "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/ui/controller.py"
click node_ui_render "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/ui/render.py"
click node_services "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/services.py"
click node_auth "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/auth.py"
click node_reports "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/reports.py"
click node_orchestrator "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/orchestrator.py"
click node_engines "https://github.com/itskiran-alt/atlas-dwn/tree/main/dwn/engines"
click node_gates "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/controls/gates.py"
click node_quarantine "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/controls/quarantine.py"
click node_skills "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/skills.py"
click node_llm "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/llm.py"
click node_proposal "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/proposal.py"
click node_market "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/data/market.py"
click node_news "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/data/news.py"
click node_http "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/data/http.py"
click node_repo "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/repo.py"
click node_database "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/db/session.py"
click node_worker "https://github.com/itskiran-alt/atlas-dwn/blob/main/worker/run_scheduled.py"
click node_jobs "https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/scheduler/jobs.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_app,node_ui_controller,node_ui_render,node_client toneBlue
class node_services,node_auth,node_reports toneAmber
class node_orchestrator,node_engines,node_gates,node_quarantine,node_skills,node_llm,node_proposal toneMint
class node_market,node_news,node_http toneRose
class node_repo,node_database,node_worker,node_jobs,node_rm,node_external_data toneIndigo
```

## Components

### Workspaces

- [Streamlit entry](https://github.com/itskiran-alt/atlas-dwn/blob/main/app.py): `app.py`
- [Event controller](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/ui/controller.py): `dwn/ui/controller.py`
- [Workspace rendering](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/ui/render.py): `dwn/ui/render.py`

### Application services

- [RBAC and approvals](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/services.py): `dwn/services.py`
- [Authentication](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/auth.py): `dwn/auth.py`
- [Reports](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/reports.py): `dwn/reports.py`

### Monitoring workflow

- [Run orchestrator](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/orchestrator.py): `dwn/agents/orchestrator.py`
- [Deterministic engines](https://github.com/itskiran-alt/atlas-dwn/tree/main/dwn/engines): `dwn/engines`
- [Consent and data gates](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/controls/gates.py): `dwn/controls/gates.py`
- [Untrusted-text scan](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/controls/quarantine.py): `dwn/controls/quarantine.py`
- [Drafting skills](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/skills.py): `dwn/agents/skills.py`
- [LLM adapters](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/llm.py): `dwn/agents/llm.py`
- [Proposal and evidence](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/agents/proposal.py): `dwn/agents/proposal.py`

### Data services

- [Market data](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/data/market.py): `dwn/data/market.py`
- [News feeds](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/data/news.py): `dwn/data/news.py`
- [Hardened HTTP](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/data/http.py): `dwn/data/http.py`

### Persistence and scheduling

- [Data access](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/repo.py): `dwn/repo.py`
- [Persistent database](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/db/session.py): `dwn/db/session.py`
- [Scheduled worker](https://github.com/itskiran-alt/atlas-dwn/blob/main/worker/run_scheduled.py): `worker/run_scheduled.py`
- [Schedule jobs](https://github.com/itskiran-alt/atlas-dwn/blob/main/dwn/scheduler/jobs.py): `dwn/scheduler/jobs.py`

### Other components

- **Relationship manager**
- **Client**
- **Market and news sources**

## Connections

- Relationship manager → Streamlit entry: uses workspace (evidence: `README.md`)
- Client → Streamlit entry: uses portal (evidence: `README.md`)
- Streamlit entry → Event controller: routes events (evidence: `app.py`)
- Event controller → RBAC and approvals: calls services (evidence: `dwn/ui/controller.py`)
- Event controller → Authentication: authenticates (evidence: `dwn/ui/controller.py`)
- Event controller → Workspace rendering: renders view (evidence: `README.md`)
- RBAC and approvals → Run orchestrator: starts runs (evidence: `dwn/services.py`)
- RBAC and approvals → Reports: builds reports (evidence: `dwn/services.py`)
- RBAC and approvals → Data access: reads and writes (evidence: `dwn/services.py`)
- Run orchestrator → Market data: gets market context (evidence: `dwn/agents/orchestrator.py`)
- Run orchestrator → Deterministic engines: computes analysis (evidence: `dwn/agents/orchestrator.py`)
- Run orchestrator → Consent and data gates: checks output (evidence: `dwn/agents/orchestrator.py`)
- Consent and data gates → Untrusted-text scan: scans text (evidence: `dwn/controls/gates.py`)
- Run orchestrator → Drafting skills: requests drafts (evidence: `dwn/agents/orchestrator.py`)
- Drafting skills → LLM adapters: requests interpretation (evidence: `dwn/agents/skills.py`)
- LLM adapters → Market and news sources: calls optional provider (evidence: `README.md`)
- Run orchestrator → Proposal and evidence: creates proposal (evidence: `dwn/agents/orchestrator.py`)
- Run orchestrator → Data access: persists run and evidence (evidence: `dwn/agents/orchestrator.py`)
- Market data → Hardened HTTP: fetches prices (evidence: `dwn/data/market.py`)
- News feeds → Hardened HTTP: fetches headlines (evidence: `dwn/data/news.py`)
- Market data → Market and news sources: reads prices (evidence: `README.md`)
- News feeds → Market and news sources: reads headlines (evidence: `README.md`)
- Data access → Persistent database: stores records (evidence: `README.md`)
- Scheduled worker → Schedule jobs: runs schedules (evidence: `worker/run_scheduled.py`)
- Schedule jobs → Run orchestrator: runs monitoring (evidence: `dwn/scheduler/jobs.py`)
- Schedule jobs → Data access: records job history (evidence: `dwn/scheduler/jobs.py`)
