# srbenx4/evs4-backend architecture

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

- Interactive diagram: https://gitdiagram.com/srbenx4/evs4-backend
- Repository: https://github.com/srbenx4/evs4-backend

## Overview

Party Catalog is a Django application for browsing party products, preparing a temporary quotation, and maintaining the catalog. The main visitor flow is catalog browsing and product inspection, followed by session-based quantity changes, totals, and confirmation; no purchase or stock reservation occurs. Separate branches cover account registration, staff catalog maintenance, and JWT-protected product API access. The excerpts show catalog and quotation view logic and account registration; API wiring, models, signals, and several routes are represented only where the README or source index supports them.

Main entry points: [`catalog/models.py`](https://github.com/srbenx4/evs4-backend/blob/main/catalog/models.py) (Articles and categories), [`catalog/views.py`](https://github.com/srbenx4/evs4-backend/blob/main/catalog/views.py) (Home, search, detail), [`quotations/views.py`](https://github.com/srbenx4/evs4-backend/blob/main/quotations/views.py) (Quote operations), [`catalog/api_views.py`](https://github.com/srbenx4/evs4-backend/blob/main/catalog/api_views.py) (Article API endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog browsing"]
  node_catalog_views["Home, search, detail<br/>[views.py]"]
  node_catalog_forms["Article form<br/>[forms.py]"]
  node_catalog_models["Articles and categories<br/>[models.py]"]
  node_catalog_admin["Django admin<br/>[admin.py]"]
  node_catalog_templates["Catalog pages"]
end

subgraph group_quotation["Quotation"]
  node_quotation_views["Quote operations<br/>[views.py]"]
  node_quote_session[("Browser session")]
  node_quote_templates["Quotation pages"]
end

subgraph group_accounts["Accounts and access"]
  node_account_views["Registration and login<br/>[views.py]"]
  node_account_forms["Registration form<br/>[forms.py]"]
  node_account_models["User profiles<br/>[models.py]"]
  node_account_signals["Profile signals<br/>[signals.py]"]
end

subgraph group_api["Product API"]
  node_api_views["Article API endpoints<br/>[api_views.py]"]
  node_api_serializers["Article serializers<br/>[serializers.py]"]
  node_jwt["JWT authentication"]
end

subgraph group_runtime["Django runtime"]
  node_database[("SQLite database")]
end

node_visitor(("Visitor"))
node_staff(("Staff user"))
node_api_client(("API client"))

node_visitor -->|"browses"| node_catalog_views
node_catalog_views -->|"queries"| node_catalog_models
node_catalog_views -->|"renders"| node_catalog_templates
node_staff -->|"maintains catalog"| node_catalog_views
node_catalog_views -->|"uses"| node_catalog_forms
node_catalog_forms -->|"validates"| node_catalog_models
node_staff -->|"administers"| node_catalog_admin
node_catalog_admin -->|"manages"| node_catalog_models
node_visitor -->|"prepares quote"| node_quotation_views
node_quotation_views -->|"loads articles"| node_catalog_models
node_quotation_views -->|"reads and writes"| node_quote_session
node_quotation_views -->|"renders"| node_quote_templates
node_visitor -->|"registers"| node_account_views
node_account_views -->|"validates"| node_account_forms
node_account_forms -.->|"updates profile"| node_account_models
node_api_client -->|"gets token"| node_jwt
node_api_client -->|"requests articles"| node_api_views
node_api_views -->|"requires"| node_jwt
node_api_views -.->|"serializes"| node_api_serializers
node_api_serializers -->|"represents"| node_catalog_models
node_catalog_models -->|"persists through ORM"| node_database
node_account_models -->|"persists through ORM"| node_database

click node_catalog_views "https://github.com/srbenx4/evs4-backend/blob/main/catalog/views.py"
click node_catalog_forms "https://github.com/srbenx4/evs4-backend/blob/main/catalog/forms.py"
click node_catalog_models "https://github.com/srbenx4/evs4-backend/blob/main/catalog/models.py"
click node_catalog_admin "https://github.com/srbenx4/evs4-backend/blob/main/catalog/admin.py"
click node_catalog_templates "https://github.com/srbenx4/evs4-backend/tree/main/templates/catalog"
click node_quotation_views "https://github.com/srbenx4/evs4-backend/blob/main/quotations/views.py"
click node_quote_templates "https://github.com/srbenx4/evs4-backend/tree/main/templates/quotations"
click node_account_views "https://github.com/srbenx4/evs4-backend/blob/main/accounts/views.py"
click node_account_forms "https://github.com/srbenx4/evs4-backend/blob/main/accounts/forms.py"
click node_account_models "https://github.com/srbenx4/evs4-backend/blob/main/accounts/models.py"
click node_account_signals "https://github.com/srbenx4/evs4-backend/blob/main/accounts/signals.py"
click node_api_views "https://github.com/srbenx4/evs4-backend/blob/main/catalog/api_views.py"
click node_api_serializers "https://github.com/srbenx4/evs4-backend/blob/main/catalog/serializers.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_catalog_views,node_catalog_forms,node_catalog_models,node_catalog_admin,node_catalog_templates,node_staff,node_api_client toneBlue
class node_quotation_views,node_quote_session,node_quote_templates toneAmber
class node_account_views,node_account_forms,node_account_models,node_account_signals toneMint
class node_api_views,node_api_serializers,node_jwt toneRose
class node_database,node_visitor toneIndigo
```

## Components

### Catalog browsing

- [Home, search, detail](https://github.com/srbenx4/evs4-backend/blob/main/catalog/views.py): `catalog/views.py`
- [Article form](https://github.com/srbenx4/evs4-backend/blob/main/catalog/forms.py): `catalog/forms.py`
- [Articles and categories](https://github.com/srbenx4/evs4-backend/blob/main/catalog/models.py): `catalog/models.py`
- [Django admin](https://github.com/srbenx4/evs4-backend/blob/main/catalog/admin.py): `catalog/admin.py`
- [Catalog pages](https://github.com/srbenx4/evs4-backend/tree/main/templates/catalog): `templates/catalog`

### Quotation

- [Quote operations](https://github.com/srbenx4/evs4-backend/blob/main/quotations/views.py): `quotations/views.py`
- **Browser session**
- [Quotation pages](https://github.com/srbenx4/evs4-backend/tree/main/templates/quotations): `templates/quotations`

### Accounts and access

- [Registration and login](https://github.com/srbenx4/evs4-backend/blob/main/accounts/views.py): `accounts/views.py`
- [Registration form](https://github.com/srbenx4/evs4-backend/blob/main/accounts/forms.py): `accounts/forms.py`
- [User profiles](https://github.com/srbenx4/evs4-backend/blob/main/accounts/models.py): `accounts/models.py`
- [Profile signals](https://github.com/srbenx4/evs4-backend/blob/main/accounts/signals.py): `accounts/signals.py`

### Product API

- [Article API endpoints](https://github.com/srbenx4/evs4-backend/blob/main/catalog/api_views.py): `catalog/api_views.py`
- [Article serializers](https://github.com/srbenx4/evs4-backend/blob/main/catalog/serializers.py): `catalog/serializers.py`
- **JWT authentication**

### Django runtime

- **SQLite database**

### Other components

- **Visitor**
- **Staff user**
- **API client**

## Connections

- Visitor → Home, search, detail: browses (evidence: `README.md`)
- Home, search, detail → Articles and categories: queries (evidence: `catalog/views.py`)
- Home, search, detail → Catalog pages: renders (evidence: `catalog/views.py`)
- Staff user → Home, search, detail: maintains catalog (evidence: `README.md`)
- Home, search, detail → Article form: uses (evidence: `catalog/views.py`)
- Article form → Articles and categories: validates (evidence: `catalog/forms.py`)
- Staff user → Django admin: administers (evidence: `README.md`)
- Django admin → Articles and categories: manages (evidence: `catalog/admin.py`)
- Visitor → Quote operations: prepares quote (evidence: `README.md`)
- Quote operations → Articles and categories: loads articles (evidence: `quotations/views.py`)
- Quote operations → Browser session: reads and writes (evidence: `quotations/views.py`)
- Quote operations → Quotation pages: renders (evidence: `quotations/views.py`)
- Visitor → Registration and login: registers (evidence: `README.md`)
- Registration and login → Registration form: validates (evidence: `accounts/views.py`)
- Registration form → User profiles: updates profile
- API client → JWT authentication: gets token (evidence: `README.md`)
- API client → Article API endpoints: requests articles (evidence: `README.md`)
- Article API endpoints → JWT authentication: requires (evidence: `README.md`)
- Article API endpoints → Article serializers: serializes
- Article serializers → Articles and categories: represents (evidence: `catalog/serializers.py`)
- Articles and categories → SQLite database: persists through ORM (evidence: `README.md`)
- User profiles → SQLite database: persists through ORM (evidence: `README.md`)
