# sanvinaik/quotecraft architecture

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

- Interactive diagram: https://gitdiagram.com/sanvinaik/quotecraft
- Repository: https://github.com/sanvinaik/quotecraft

## Overview

QuoteCraft takes a client brief, generates structured estimate content, lets the freelancer revise scope and prices, and offers a PDF download. The sampled code shows the app calling Groq through ai_engine.py; this differs from the README’s description of local Ollama inference. The app also invokes PDF export. The graph reflects these observed calls; the downloadable PDF is represented as an outcome, not a separate repository module.

Main entry points: [`app.py`](https://github.com/sanvinaik/quotecraft/blob/main/app.py) (Brief and editor UI), [`ai_engine.py`](https://github.com/sanvinaik/quotecraft/blob/main/ai_engine.py) (Proposal generator), [`pdf_export.py`](https://github.com/sanvinaik/quotecraft/blob/main/pdf_export.py) (PDF exporter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Proposal workflow"]
  node_app["Brief and editor UI<br/>[app.py]"]
end

subgraph group_generation["AI generation"]
  node_generator["Proposal generator<br/>[ai_engine.py]"]
  node_groq{{"Groq inference API"}}
end

subgraph group_export["PDF export"]
  node_pdf["PDF exporter<br/>[pdf_export.py]"]
end

node_freelancer(("Freelancer"))

node_freelancer -->|"enters brief"| node_app
node_app -->|"requests proposal"| node_generator
node_generator -->|"requests inference"| node_groq
node_app -->|"exports edited proposal"| node_pdf
node_app -->|"offers PDF download"| node_freelancer

click node_app "https://github.com/sanvinaik/quotecraft/blob/main/app.py"
click node_generator "https://github.com/sanvinaik/quotecraft/blob/main/ai_engine.py"
click node_pdf "https://github.com/sanvinaik/quotecraft/blob/main/pdf_export.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 toneBlue
class node_generator,node_groq toneAmber
class node_pdf toneMint
class node_freelancer toneIndigo
```

## Components

### Proposal workflow

- [Brief and editor UI](https://github.com/sanvinaik/quotecraft/blob/main/app.py): `app.py`

### AI generation

- [Proposal generator](https://github.com/sanvinaik/quotecraft/blob/main/ai_engine.py): `ai_engine.py`
- **Groq inference API**

### PDF export

- [PDF exporter](https://github.com/sanvinaik/quotecraft/blob/main/pdf_export.py): `pdf_export.py`

### Other components

- **Freelancer**

## Connections

- Freelancer → Brief and editor UI: enters brief (evidence: `README.md`)
- Brief and editor UI → Proposal generator: requests proposal (evidence: `app.py`)
- Proposal generator → Groq inference API: requests inference (evidence: `ai_engine.py`)
- Brief and editor UI → PDF exporter: exports edited proposal (evidence: `app.py`)
- Brief and editor UI → Freelancer: offers PDF download (evidence: `app.py`)
