# entbappy/atlas-enterprise-ai architecture

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

- Interactive diagram: https://gitdiagram.com/entbappy/atlas-enterprise-ai
- Repository: https://github.com/entbappy/atlas-enterprise-ai

## Overview

Atlas is a document-grounded knowledge assistant. Users upload organizational files, the API processes and indexes them, and chat requests pass input checks, retrieve authorized evidence, generate and validate an answer, and persist conversation turns. The dashboard also exposes document status, approvals, feedback, and operational metrics. The graph includes documented integrations and sampled call paths; some UI routes and storage details are not fully shown in the excerpts.

Main entry points: [`app/main.py`](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/main.py) (FastAPI routes), [`app/graph.py`](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/graph.py) (RAG workflow), [`worker/ingest.py`](https://github.com/entbappy/atlas-enterprise-ai/blob/main/worker/ingest.py) (Parse and chunk), [`app/vector.py`](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/vector.py) (Authorized retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_dashboard["Web dashboard<br/>[index.html]"]
  node_browser_ui["Browser interactions<br/>[app.js]"]
  node_api["FastAPI routes<br/>[main.py]"]
  node_identity["Demo principal<br/>[demo_context.py]"]
end

subgraph group_ingestion["Document ingestion"]
  node_ingest_flow["Upload completion<br/>[main.py]"]
  node_document_processing["Parse and chunk<br/>[ingest.py]"]
  node_embedding["Embedding client<br/>[aws.py]"]
  node_object_storage[("Amazon S3")]
end

subgraph group_assistant["Knowledge assistant"]
  node_vector_index[("Pinecone index<br/>[vector.py]")]
  node_workflow["RAG workflow<br/>[graph.py]"]
  node_input_checks["Input guardrails<br/>[guardrails.py]"]
  node_retrieval["Authorized retrieval<br/>[vector.py]"]
  node_generation["Grounded generation<br/>[aws.py]"]
  node_output_checks["Output guardrails<br/>[guardrails.py]"]
  node_chat_entry["Chat adapter<br/>[rag.py]"]
  node_history["Conversation memory<br/>[memory.py]"]
end

subgraph group_operations["Governance and operations"]
  node_postgres[("PostgreSQL")]
  node_governance["Approvals and feedback<br/>[main.py]"]
  node_audit["Audit events<br/>[db.py]"]
  node_observability["Rius tracing<br/>[observability.py]"]
end

node_user(("User / browser"))
node_bedrock["Amazon Bedrock"]
node_admin(("Workspace administrator"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"loads"| node_browser_ui
node_browser_ui -->|"calls"| node_api
node_api -->|"resolves principal"| node_identity
node_api -->|"presigns upload"| node_object_storage
node_user -->|"uploads file"| node_object_storage
node_api -->|"accepts completion"| node_ingest_flow
node_ingest_flow -->|"calls"| node_document_processing
node_document_processing -->|"reads file"| node_object_storage
node_document_processing -->|"embeds chunks"| node_embedding
node_embedding -->|"invokes model"| node_bedrock
node_document_processing -->|"upserts vectors"| node_vector_index
node_document_processing -->|"updates status"| node_postgres
node_api -->|"calls"| node_chat_entry
node_chat_entry -->|"delegates to"| node_workflow
node_workflow -->|"checks input"| node_input_checks
node_workflow -->|"searches"| node_retrieval
node_retrieval -->|"embeds query"| node_embedding
node_retrieval -->|"queries"| node_vector_index
node_workflow -->|"generates answer"| node_generation
node_generation -->|"converses"| node_bedrock
node_workflow -->|"checks output"| node_output_checks
node_api -->|"loads and saves turns"| node_history
node_history -->|"reads and writes"| node_postgres
node_api -->|"stores documents"| node_postgres
node_api -->|"serves review and feedback"| node_governance
node_admin -->|"reviews approvals"| node_api
node_governance -->|"reads and writes"| node_postgres
node_api -->|"records events"| node_audit
node_audit -->|"inserts events"| node_postgres
node_api -->|"initializes tracing"| node_observability
node_workflow -->|"decorated for traces"| node_observability

click node_dashboard "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/templates/index.html"
click node_browser_ui "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/static/js/app.js"
click node_api "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/main.py"
click node_identity "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/demo_context.py"
click node_ingest_flow "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/main.py"
click node_document_processing "https://github.com/entbappy/atlas-enterprise-ai/blob/main/worker/ingest.py"
click node_embedding "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/aws.py"
click node_vector_index "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/vector.py"
click node_workflow "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/graph.py"
click node_input_checks "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/guardrails.py"
click node_retrieval "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/vector.py"
click node_generation "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/aws.py"
click node_output_checks "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/guardrails.py"
click node_chat_entry "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/rag.py"
click node_history "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/memory.py"
click node_governance "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/main.py"
click node_audit "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/db.py"
click node_observability "https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/observability.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_dashboard,node_browser_ui,node_api,node_identity,node_user toneBlue
class node_ingest_flow,node_document_processing,node_embedding,node_object_storage toneAmber
class node_vector_index,node_workflow,node_input_checks,node_retrieval,node_generation,node_output_checks,node_chat_entry,node_history toneMint
class node_postgres,node_governance,node_audit,node_observability toneRose
class node_bedrock,node_admin toneIndigo
```

## Components

### Web experience

- [Web dashboard](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/templates/index.html): `app/templates/index.html`
- [Browser interactions](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/static/js/app.js): `app/static/js/app.js`
- [FastAPI routes](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/main.py): `app/main.py`
- [Demo principal](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/demo_context.py): `app/demo_context.py`

### Document ingestion

- [Upload completion](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/main.py): `app/main.py`
- [Parse and chunk](https://github.com/entbappy/atlas-enterprise-ai/blob/main/worker/ingest.py): `worker/ingest.py`
- [Embedding client](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/aws.py): `app/aws.py`
- **Amazon S3**

### Knowledge assistant

- [Pinecone index](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/vector.py): `app/vector.py`
- [RAG workflow](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/graph.py): `app/graph.py`
- [Input guardrails](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/guardrails.py): `app/guardrails.py`
- [Authorized retrieval](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/vector.py): `app/vector.py`
- [Grounded generation](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/aws.py): `app/aws.py`
- [Output guardrails](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/guardrails.py): `app/guardrails.py`
- [Chat adapter](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/rag.py): `app/rag.py`
- [Conversation memory](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/memory.py): `app/memory.py`

### Governance and operations

- **PostgreSQL**
- [Approvals and feedback](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/main.py): `app/main.py`
- [Audit events](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/db.py): `app/db.py`
- [Rius tracing](https://github.com/entbappy/atlas-enterprise-ai/blob/main/app/observability.py): `app/observability.py`

### Other components

- **User / browser**
- **Amazon Bedrock**
- **Workspace administrator**

## Connections

- User / browser → Web dashboard: uses (evidence: `README.md`)
- Web dashboard → Browser interactions: loads (evidence: `README.md`)
- Browser interactions → FastAPI routes: calls (evidence: `README.md`)
- FastAPI routes → Demo principal: resolves principal (evidence: `app/main.py`)
- FastAPI routes → Amazon S3: presigns upload (evidence: `app/main.py`)
- User / browser → Amazon S3: uploads file (evidence: `README.md`)
- FastAPI routes → Upload completion: accepts completion (evidence: `app/main.py`)
- Upload completion → Parse and chunk: calls (evidence: `app/main.py`)
- Parse and chunk → Amazon S3: reads file (evidence: `worker/ingest.py`)
- Parse and chunk → Embedding client: embeds chunks (evidence: `worker/ingest.py`)
- Embedding client → Amazon Bedrock: invokes model (evidence: `app/aws.py`)
- Parse and chunk → Pinecone index: upserts vectors (evidence: `worker/ingest.py`)
- Parse and chunk → PostgreSQL: updates status (evidence: `worker/ingest.py`)
- FastAPI routes → Chat adapter: calls (evidence: `app/main.py`)
- Chat adapter → RAG workflow: delegates to (evidence: `app/rag.py`)
- RAG workflow → Input guardrails: checks input (evidence: `app/graph.py`)
- RAG workflow → Authorized retrieval: searches (evidence: `app/graph.py`)
- Authorized retrieval → Embedding client: embeds query (evidence: `app/graph.py`)
- Authorized retrieval → Pinecone index: queries (evidence: `app/vector.py`)
- RAG workflow → Grounded generation: generates answer (evidence: `app/graph.py`)
- Grounded generation → Amazon Bedrock: converses (evidence: `app/aws.py`)
- RAG workflow → Output guardrails: checks output (evidence: `app/graph.py`)
- FastAPI routes → Conversation memory: loads and saves turns (evidence: `app/main.py`)
- Conversation memory → PostgreSQL: reads and writes (evidence: `app/memory.py`)
- FastAPI routes → PostgreSQL: stores documents (evidence: `app/main.py`)
- FastAPI routes → Approvals and feedback: serves review and feedback (evidence: `app/main.py`)
- Workspace administrator → FastAPI routes: reviews approvals (evidence: `app/main.py`)
- Approvals and feedback → PostgreSQL: reads and writes (evidence: `app/main.py`)
- FastAPI routes → Audit events: records events (evidence: `app/main.py`)
- Audit events → PostgreSQL: inserts events (evidence: `app/db.py`)
- FastAPI routes → Rius tracing: initializes tracing (evidence: `app/main.py`)
- RAG workflow → Rius tracing: decorated for traces (evidence: `app/graph.py`)
