# aditya160803/cloud-project architecture

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

- Interactive diagram: https://gitdiagram.com/aditya160803/cloud-project
- Repository: https://github.com/aditya160803/cloud-project

## Overview

Cloud-Chat is a human-approved AWS infrastructure provisioning assistant: a request is parsed into validated intent, checked for security and cost, synthesized as Terraform, and held for checksum-bound approval before any guarded apply. The API and orchestrator coordinate planning, persistence, deployment, verification, and recovery; Streamlit provides the operator interface. README and excerpts support the main workflow and safety capabilities. Some orchestration internals and frontend/API wiring were not excerpted, so those links are limited to documented or indexed references.

Main entry points: [`app/orchestrator.py`](https://github.com/aditya160803/cloud-project/blob/master/app/orchestrator.py) (Plan orchestrator), [`app/main.py`](https://github.com/aditya160803/cloud-project/blob/master/app/main.py) (FastAPI endpoints), [`app/modules/llm_parser.py`](https://github.com/aditya160803/cloud-project/blob/master/app/modules/llm_parser.py) (Intent parser), [`app/modules/terraform_runner.py`](https://github.com/aditya160803/cloud-project/blob/master/app/modules/terraform_runner.py) (Terraform runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Operator interface"]
  node_ui["Streamlit UI<br/>[app.py]"]
  node_client["REST client<br/>[api_client.py]"]
end

subgraph group_service["API and orchestration"]
  node_api["FastAPI endpoints<br/>[main.py]"]
  node_orchestrator["Plan orchestrator<br/>[orchestrator.py]"]
  node_config["Runtime settings<br/>[config.py]"]
end

subgraph group_intent["Intent and analysis"]
  node_intent_schema["Intent validation<br/>[intent.py]"]
  node_parser["Intent parser<br/>[llm_parser.py]"]
  node_planner["Plan shaping<br/>[planner.py]"]
  node_security["Security audit<br/>[security.py]"]
  node_cost["Cost estimate<br/>[cost_estimator.py]"]
  node_plan_schema["Plan models<br/>[plan.py]"]
end

subgraph group_terraform["Terraform lifecycle"]
  node_hcl["Terraform generation"]
  node_runner["Terraform runner"]
  node_deployment_schema["Deployment models<br/>[deployment.py]"]
end

subgraph group_operations["Audit and verification"]
  node_storage[("SQLite audit store<br/>[storage.py]")]
  node_redaction["Secret redaction<br/>[redaction.py]"]
  node_aws_verifier["AWS verification<br/>[aws_verifier.py]"]
end

node_operator(("Operator"))
node_llm_services{{"Gemini / Groq"}}
node_aws{{"AWS APIs"}}

node_operator -->|"requests provisioning"| node_ui
node_ui -->|"uses REST client"| node_client
node_client -->|"sends JSON"| node_api
node_api -->|"delegates planning"| node_orchestrator
node_orchestrator -->|"parses intent"| node_parser
node_parser -.->|"requests extraction"| node_llm_services
node_parser -->|"validates intent"| node_intent_schema
node_orchestrator -->|"shapes plan"| node_planner
node_orchestrator -->|"audits security"| node_security
node_orchestrator -->|"estimates cost"| node_cost
node_orchestrator -->|"generates Terraform"| node_hcl
node_orchestrator -->|"validates plan"| node_runner
node_runner -->|"records plan data"| node_plan_schema
node_orchestrator -->|"persists plans"| node_storage
node_runner -->|"stores lifecycle data"| node_storage
node_api -->|"accepts deployment data"| node_deployment_schema
node_orchestrator -->|"requests verification"| node_aws_verifier
node_aws_verifier -->|"checks resources"| node_aws
node_api -->|"sanitizes responses"| node_redaction
node_orchestrator -->|"sanitizes diagnostics"| node_redaction
node_orchestrator -->|"reads settings"| node_config

click node_ui "https://github.com/aditya160803/cloud-project/blob/master/frontend/app.py"
click node_client "https://github.com/aditya160803/cloud-project/blob/master/frontend/api_client.py"
click node_api "https://github.com/aditya160803/cloud-project/blob/master/app/main.py"
click node_orchestrator "https://github.com/aditya160803/cloud-project/blob/master/app/orchestrator.py"
click node_config "https://github.com/aditya160803/cloud-project/blob/master/app/config.py"
click node_intent_schema "https://github.com/aditya160803/cloud-project/blob/master/app/schemas/intent.py"
click node_parser "https://github.com/aditya160803/cloud-project/blob/master/app/modules/llm_parser.py"
click node_planner "https://github.com/aditya160803/cloud-project/blob/master/app/modules/planner.py"
click node_security "https://github.com/aditya160803/cloud-project/blob/master/app/modules/security.py"
click node_cost "https://github.com/aditya160803/cloud-project/blob/master/app/modules/cost_estimator.py"
click node_plan_schema "https://github.com/aditya160803/cloud-project/blob/master/app/schemas/plan.py"
click node_hcl "https://github.com/aditya160803/cloud-project/blob/master/app/modules/terraform_generator.py"
click node_runner "https://github.com/aditya160803/cloud-project/blob/master/app/modules/terraform_runner.py"
click node_deployment_schema "https://github.com/aditya160803/cloud-project/blob/master/app/schemas/deployment.py"
click node_storage "https://github.com/aditya160803/cloud-project/blob/master/app/modules/storage.py"
click node_redaction "https://github.com/aditya160803/cloud-project/blob/master/app/modules/redaction.py"
click node_aws_verifier "https://github.com/aditya160803/cloud-project/blob/master/app/modules/aws_verifier.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_ui,node_client toneBlue
class node_api,node_orchestrator,node_config toneAmber
class node_intent_schema,node_parser,node_planner,node_security,node_cost,node_plan_schema,node_aws toneMint
class node_hcl,node_runner,node_deployment_schema toneRose
class node_storage,node_redaction,node_aws_verifier,node_operator,node_llm_services toneIndigo
```

## Components

### Operator interface

- [Streamlit UI](https://github.com/aditya160803/cloud-project/blob/master/frontend/app.py): `frontend/app.py`
- [REST client](https://github.com/aditya160803/cloud-project/blob/master/frontend/api_client.py): `frontend/api_client.py`

### API and orchestration

- [FastAPI endpoints](https://github.com/aditya160803/cloud-project/blob/master/app/main.py): `app/main.py`
- [Plan orchestrator](https://github.com/aditya160803/cloud-project/blob/master/app/orchestrator.py): `app/orchestrator.py`
- [Runtime settings](https://github.com/aditya160803/cloud-project/blob/master/app/config.py): `app/config.py`

### Intent and analysis

- [Intent validation](https://github.com/aditya160803/cloud-project/blob/master/app/schemas/intent.py): `app/schemas/intent.py`
- [Intent parser](https://github.com/aditya160803/cloud-project/blob/master/app/modules/llm_parser.py): `app/modules/llm_parser.py`
- [Plan shaping](https://github.com/aditya160803/cloud-project/blob/master/app/modules/planner.py): `app/modules/planner.py`
- [Security audit](https://github.com/aditya160803/cloud-project/blob/master/app/modules/security.py): `app/modules/security.py`
- [Cost estimate](https://github.com/aditya160803/cloud-project/blob/master/app/modules/cost_estimator.py): `app/modules/cost_estimator.py`
- [Plan models](https://github.com/aditya160803/cloud-project/blob/master/app/schemas/plan.py): `app/schemas/plan.py`

### Terraform lifecycle

- [Terraform generation](https://github.com/aditya160803/cloud-project/blob/master/app/modules/terraform_generator.py): `app/modules/terraform_generator.py`
- [Terraform runner](https://github.com/aditya160803/cloud-project/blob/master/app/modules/terraform_runner.py): `app/modules/terraform_runner.py`
- [Deployment models](https://github.com/aditya160803/cloud-project/blob/master/app/schemas/deployment.py): `app/schemas/deployment.py`

### Audit and verification

- [SQLite audit store](https://github.com/aditya160803/cloud-project/blob/master/app/modules/storage.py): `app/modules/storage.py`
- [Secret redaction](https://github.com/aditya160803/cloud-project/blob/master/app/modules/redaction.py): `app/modules/redaction.py`
- [AWS verification](https://github.com/aditya160803/cloud-project/blob/master/app/modules/aws_verifier.py): `app/modules/aws_verifier.py`

### Other components

- **Operator**
- **Gemini / Groq**
- **AWS APIs**

## Connections

- Operator → Streamlit UI: requests provisioning (evidence: `README.md`)
- Streamlit UI → REST client: uses REST client (evidence: `README.md`)
- REST client → FastAPI endpoints: sends JSON (evidence: `README.md`)
- FastAPI endpoints → Plan orchestrator: delegates planning (evidence: `app/main.py`)
- Plan orchestrator → Intent parser: parses intent (evidence: `app/orchestrator.py`)
- Intent parser → Gemini / Groq: requests extraction (evidence: `README.md`)
- Intent parser → Intent validation: validates intent (evidence: `app/modules/llm_parser.py`)
- Plan orchestrator → Plan shaping: shapes plan (evidence: `app/orchestrator.py`)
- Plan orchestrator → Security audit: audits security (evidence: `app/orchestrator.py`)
- Plan orchestrator → Cost estimate: estimates cost (evidence: `app/orchestrator.py`)
- Plan orchestrator → Terraform generation: generates Terraform (evidence: `app/orchestrator.py`)
- Plan orchestrator → Terraform runner: validates plan (evidence: `app/orchestrator.py`)
- Terraform runner → Plan models: records plan data (evidence: `app/modules/terraform_runner.py`)
- Plan orchestrator → SQLite audit store: persists plans (evidence: `app/orchestrator.py`)
- Terraform runner → SQLite audit store: stores lifecycle data (evidence: `app/modules/terraform_runner.py`)
- FastAPI endpoints → Deployment models: accepts deployment data (evidence: `app/main.py`)
- Plan orchestrator → AWS verification: requests verification (evidence: `app/orchestrator.py`)
- AWS verification → AWS APIs: checks resources (evidence: `README.md`)
- FastAPI endpoints → Secret redaction: sanitizes responses (evidence: `app/main.py`)
- Plan orchestrator → Secret redaction: sanitizes diagnostics (evidence: `app/orchestrator.py`)
- Plan orchestrator → Runtime settings: reads settings (evidence: `app/orchestrator.py`)
