# natelieneo/lab-p12-team2 architecture

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

- Interactive diagram: https://gitdiagram.com/natelieneo/lab-p12-team2
- Repository: https://github.com/natelieneo/lab-p12-team2

## Overview

Calora has two visible entry points: a dependency-free web form that delegates plan generation to logic_manager, and a CLI flow that collects a profile, requests Gemini recommendations, validates the response, and prints it. The web plan-generation internals are not shown, so their downstream behavior is not expanded. The README is empty; the graph reflects only the supplied source excerpts and index references.

Main entry points: [`main.py`](https://github.com/natelieneo/lab-p12-team2/blob/main/main.py) (CLI entry), [`ai_manager.py`](https://github.com/natelieneo/lab-p12-team2/blob/main/ai_manager.py) (AI request), [`app.py`](https://github.com/natelieneo/lab-p12-team2/blob/main/app.py) (Web app), [`ai_handler_manager.py`](https://github.com/natelieneo/lab-p12-team2/blob/main/ai_handler_manager.py) (Response validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web planner"]
  node_web_app["Web app<br/>[app.py]"]
  node_plan_logic["Plan logic<br/>[logic_manager.py]"]
end

subgraph group_cli["CLI workflow"]
  node_cli_entry["CLI entry<br/>[main.py]"]
  node_input_collection["Input collection<br/>[io_manager.py]"]
end

subgraph group_ai["AI recommendations"]
  node_ai_request["AI request<br/>[ai_manager.py]"]
  node_ai_validation["Response validation"]
  node_ai_config["AI settings<br/>[config.py]"]
end

node_user(("User"))
node_gemini{{"Gemini API"}}

node_user -->|"submits form"| node_web_app
node_web_app -->|"requests plan"| node_plan_logic
node_user -.->|"starts workflow"| node_cli_entry
node_cli_entry -->|"collects profile"| node_input_collection
node_cli_entry -->|"requests recommendations"| node_ai_request
node_ai_request -->|"reads settings"| node_ai_config
node_ai_request -->|"sends prompt"| node_gemini
node_ai_request -->|"parses response"| node_ai_validation
node_cli_entry -->|"validates output"| node_ai_validation

click node_web_app "https://github.com/natelieneo/lab-p12-team2/blob/main/app.py"
click node_plan_logic "https://github.com/natelieneo/lab-p12-team2/blob/main/logic_manager.py"
click node_cli_entry "https://github.com/natelieneo/lab-p12-team2/blob/main/main.py"
click node_input_collection "https://github.com/natelieneo/lab-p12-team2/blob/main/io_manager.py"
click node_ai_request "https://github.com/natelieneo/lab-p12-team2/blob/main/ai_manager.py"
click node_ai_validation "https://github.com/natelieneo/lab-p12-team2/blob/main/ai_handler_manager.py"
click node_ai_config "https://github.com/natelieneo/lab-p12-team2/blob/main/config.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_web_app,node_plan_logic,node_user toneBlue
class node_cli_entry,node_input_collection toneAmber
class node_ai_request,node_ai_validation,node_ai_config,node_gemini toneMint
```

## Components

### Web planner

- [Web app](https://github.com/natelieneo/lab-p12-team2/blob/main/app.py): `app.py`
- [Plan logic](https://github.com/natelieneo/lab-p12-team2/blob/main/logic_manager.py): `logic_manager.py`

### CLI workflow

- [CLI entry](https://github.com/natelieneo/lab-p12-team2/blob/main/main.py): `main.py`
- [Input collection](https://github.com/natelieneo/lab-p12-team2/blob/main/io_manager.py): `io_manager.py`

### AI recommendations

- [AI request](https://github.com/natelieneo/lab-p12-team2/blob/main/ai_manager.py): `ai_manager.py`
- [Response validation](https://github.com/natelieneo/lab-p12-team2/blob/main/ai_handler_manager.py): `ai_handler_manager.py`
- [AI settings](https://github.com/natelieneo/lab-p12-team2/blob/main/config.py): `config.py`

### Other components

- **User**
- **Gemini API**

## Connections

- User → Web app: submits form (evidence: `app.py`)
- Web app → Plan logic: requests plan (evidence: `app.py`)
- User → CLI entry: starts workflow
- CLI entry → Input collection: collects profile (evidence: `main.py`)
- CLI entry → AI request: requests recommendations (evidence: `main.py`)
- AI request → AI settings: reads settings (evidence: `ai_manager.py`)
- AI request → Gemini API: sends prompt (evidence: `ai_manager.py`)
- AI request → Response validation: parses response (evidence: `ai_manager.py`)
- CLI entry → Response validation: validates output (evidence: `main.py`)
