# zameethi/sortimento architecture

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

- Interactive diagram: https://gitdiagram.com/zameethi/sortimento
- Repository: https://github.com/zameethi/sortimento

## Overview

This is a Django application for importing assortment CSV data and presenting branch/section assortment results. The main flow is a browser request routed to the app: the home view can import CSV data, while the table view filters and displays Cruzada records. The data layer also defines assortment, size, profile, and section models. The excerpts establish the app-level routes and view dependencies; the project-level URL wiring and templates were not sampled, so those links are omitted.

Main entry points: [`dbconvert/views.py`](https://github.com/zameethi/sortimento/blob/master/dbconvert/views.py) (Page views), [`dbconvert/process_csv_sort.py`](https://github.com/zameethi/sortimento/blob/master/dbconvert/process_csv_sort.py) (CSV loader), [`dbconvert/models.py`](https://github.com/zameethi/sortimento/blob/master/dbconvert/models.py) (Domain models), [`dbconvert/urls.py`](https://github.com/zameethi/sortimento/blob/master/dbconvert/urls.py) (App routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_routes["App routes<br/>[urls.py]"]
  node_views["Page views<br/>[views.py]"]
  node_filters["Query filters<br/>[filters.py]"]
  node_table["Result table<br/>[tables.py]"]
end

subgraph group_ingest["CSV ingestion"]
  node_csv_loader["CSV loader"]
  node_csv_files["CSV files"]
end

subgraph group_data["Assortment data"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("Configured database<br/>[settings.py]")]
end

node_browser(("Browser"))

node_browser -->|"requests"| node_routes
node_routes -->|"routes to"| node_views
node_views -->|"calls import"| node_csv_loader
node_csv_loader -->|"reads"| node_csv_files
node_csv_loader -->|"creates records"| node_models
node_csv_loader -->|"writes CSV rows"| node_database
node_views -->|"configures filter"| node_filters
node_views -->|"configures table"| node_table
node_views -->|"selects model"| node_models
node_filters -->|"filters model"| node_models
node_table -->|"renders model fields"| node_models

click node_routes "https://github.com/zameethi/sortimento/blob/master/dbconvert/urls.py"
click node_views "https://github.com/zameethi/sortimento/blob/master/dbconvert/views.py"
click node_filters "https://github.com/zameethi/sortimento/blob/master/dbconvert/filters.py"
click node_table "https://github.com/zameethi/sortimento/blob/master/dbconvert/tables.py"
click node_csv_loader "https://github.com/zameethi/sortimento/blob/master/dbconvert/process_csv_sort.py"
click node_models "https://github.com/zameethi/sortimento/blob/master/dbconvert/models.py"
click node_database "https://github.com/zameethi/sortimento/blob/master/sortimento/settings.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_routes,node_views,node_filters,node_table,node_browser toneBlue
class node_csv_loader,node_csv_files toneAmber
class node_models,node_database toneMint
```

## Components

### Web interface

- [App routes](https://github.com/zameethi/sortimento/blob/master/dbconvert/urls.py): `dbconvert/urls.py`
- [Page views](https://github.com/zameethi/sortimento/blob/master/dbconvert/views.py): `dbconvert/views.py`
- [Query filters](https://github.com/zameethi/sortimento/blob/master/dbconvert/filters.py): `dbconvert/filters.py`
- [Result table](https://github.com/zameethi/sortimento/blob/master/dbconvert/tables.py): `dbconvert/tables.py`

### CSV ingestion

- [CSV loader](https://github.com/zameethi/sortimento/blob/master/dbconvert/process_csv_sort.py): `dbconvert/process_csv_sort.py`
- **CSV files**

### Assortment data

- [Domain models](https://github.com/zameethi/sortimento/blob/master/dbconvert/models.py): `dbconvert/models.py`
- [Configured database](https://github.com/zameethi/sortimento/blob/master/sortimento/settings.py): `sortimento/settings.py`

### Other components

- **Browser**

## Connections

- Browser → App routes: requests (evidence: `dbconvert/urls.py`)
- App routes → Page views: routes to (evidence: `dbconvert/urls.py`)
- Page views → CSV loader: calls import (evidence: `dbconvert/views.py`)
- CSV loader → CSV files: reads (evidence: `dbconvert/process_csv_sort.py`)
- CSV loader → Domain models: creates records (evidence: `dbconvert/process_csv_sort.py`)
- CSV loader → Configured database: writes CSV rows (evidence: `dbconvert/process_csv_sort.py`)
- Page views → Query filters: configures filter (evidence: `dbconvert/views.py`)
- Page views → Result table: configures table (evidence: `dbconvert/views.py`)
- Page views → Domain models: selects model (evidence: `dbconvert/views.py`)
- Query filters → Domain models: filters model (evidence: `dbconvert/filters.py`)
- Result table → Domain models: renders model fields (evidence: `dbconvert/tables.py`)
