# dronarte/vetorfast architecture

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

- Interactive diagram: https://gitdiagram.com/dronarte/vetorfast
- Repository: https://github.com/dronarte/vetorfast

## Overview

Vetorfast is a small web application for converting uploaded images into downloadable SVGs. The workflow is served UI, image upload, grayscale/threshold preprocessing, contour extraction, SVG generation, and download. The processing stages are implemented inside one Flask route in app.py, rather than separate services. The UI file is present in the tree but was not excerpted, so its upload relationship to the route is unverified.

Main entry points: [`app.py`](https://github.com/dronarte/vetorfast/blob/main/app.py) (Upload route), [`index.html`](https://github.com/dronarte/vetorfast/blob/main/index.html) (Web UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_ui["Web UI<br/>[index.html]"]
  node_endpoint["Upload route<br/>[app.py]"]
  node_download["SVG download<br/>[app.py]"]
end

subgraph group_vector["Vectorization"]
  node_preprocess["Image preprocessing<br/>[app.py]"]
  node_contours["Contour extraction<br/>[app.py]"]
  node_svg["SVG generation<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_ui
node_endpoint -->|"serves"| node_ui
node_ui -.->|"uploads image"| node_endpoint
node_endpoint -->|"preprocesses"| node_preprocess
node_endpoint -->|"extracts contours"| node_contours
node_endpoint -->|"generates SVG"| node_svg
node_endpoint -->|"returns file"| node_download

click node_ui "https://github.com/dronarte/vetorfast/blob/main/index.html"
click node_endpoint "https://github.com/dronarte/vetorfast/blob/main/app.py"
click node_preprocess "https://github.com/dronarte/vetorfast/blob/main/app.py"
click node_contours "https://github.com/dronarte/vetorfast/blob/main/app.py"
click node_svg "https://github.com/dronarte/vetorfast/blob/main/app.py"
click node_download "https://github.com/dronarte/vetorfast/blob/main/app.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_endpoint,node_download,node_user toneBlue
class node_preprocess,node_contours,node_svg toneAmber
```

## Components

### Web interface

- [Web UI](https://github.com/dronarte/vetorfast/blob/main/index.html): `index.html`
- [Upload route](https://github.com/dronarte/vetorfast/blob/main/app.py): `app.py`
- [SVG download](https://github.com/dronarte/vetorfast/blob/main/app.py): `app.py`

### Vectorization

- [Image preprocessing](https://github.com/dronarte/vetorfast/blob/main/app.py): `app.py`
- [Contour extraction](https://github.com/dronarte/vetorfast/blob/main/app.py): `app.py`
- [SVG generation](https://github.com/dronarte/vetorfast/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Web UI: uses (evidence: `README.md`)
- Upload route → Web UI: serves (evidence: `app.py`)
- Web UI → Upload route: uploads image
- Upload route → Image preprocessing: preprocesses (evidence: `app.py`)
- Upload route → Contour extraction: extracts contours (evidence: `app.py`)
- Upload route → SVG generation: generates SVG (evidence: `app.py`)
- Upload route → SVG download: returns file (evidence: `app.py`)
