# nelexey/antiqq architecture

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

- Interactive diagram: https://gitdiagram.com/nelexey/antiqq
- Repository: https://github.com/nelexey/antiqq

## Overview

#### Purpose and Entry Points
This is a full-stack antique marketplace: catalog browsing, account management, carts/orders, reviews, provenance, address handling, and seller consignment requests. The backend is a Django application entered through `backend/manage.py`, deployed through `backend/core/wsgi.py` or `backend/core/asgi.py`; its API route composition is in `backend/core/urls.py`. The frontend is a Vue single-page application bootstrapped by `frontend/src/main.ts` and rooted at `frontend/src/App.vue`.

#### Backend API and Domain Boundary
Django apps own domain models, serializers, views, and URL endpoints, creating a conventional REST-style boundary between browser clients and persistent business data. Core application registration/runtime configuration is centralized in `backend/core/settings.py`; each domain exposes routes through app-level `urls.py`, including `backend/catalog/urls.py`, `backend/orders/urls.py`, and `backend/users/urls.py`. Django admin is also a material operational interface, with custom admin templates under `backend/templates/admin`.

#### Catalog, Discovery, and Product Context
The catalog domain is the central product source of truth: antiques, categories, images, publication/seller fields, favorites, and site settings are represented through `backend/catalog/models.py`. It exposes query/filter behavior in `backend/catalog/filters.py`, API representations in `backend/catalog/serializers.py`, and endpoint behavior in `backend/catalog/views.py`. Product detail is augmented by separate provenance and review domains, rather than embedding those concerns in catalog: `backend/provenance/models.py` and `backend/reviews/models.py`.

#### Identity, Addresses, and Customer State
A custom user domain manages authentication/account identity and related email-verification lifecycle through `backend/users/models.py`, `backend/users/views.py`, and asynchronous work in `backend/users/tasks.py`. Addresses are a separate reusable domain with geocoding support (`backend/addresses/geocoder.py`) and API endpoints (`backend/addresses/views.py`). On the client, authenticated session state is maintained in `frontend/src/stores/auth.ts`; route-level account flows include `frontend/src/views/Login.vue`, `frontend/src/views/Profile.vue`, and `frontend/src/views/VerifyEmail.vue`.

#### Commerce and Fulfillment Flow
The primary purchase flow is catalog/product detail → client cart → checkout → persisted order and order items. Client cart state resides in `frontend/src/stores/cart.ts`, while purchase screens are `frontend/src/views/Cart.vue` and `frontend/src/views/Checkout.vue`. Backend order persistence, authorization rules, API transformations, and workflows are separated into `backend/orders/models.py`, `backend/orders/permissions.py`, `backend/orders/serializers.py`, `backend/orders/views.py`, and `backend/orders/tasks.py`. Order administration includes summary-oriented admin presentation in `backend/orders/templates/admin/order_summary_change_list.html`.

#### Consignment and Operational Notifications
Seller intake is modeled independently from customer ordering. Consignment requests, associated images, serializers, and endpoints live in `backend/consignments/models.py`, `backend/consignments/serializers.py`, and `backend/consignments/views.py`; asynchronous handling is in `backend/consignments/tasks.py`. The selling UI is `frontend/src/views/ConsignmentSell.vue`. Email templates for registration and both user/admin consignment communications are maintained under `backend/templates/emails`, indicating server-side notification rendering.

#### Frontend, Deployment, and Runtime Infrastructure
The frontend uses Vue, TypeScript, Vite, and a router (`frontend/src/router/index.ts`), with a shared HTTP integration boundary at `frontend/src/api/client.ts`. Catalog browsing and product presentation are implemented by `frontend/src/views/Catalog.vue`, `frontend/src/views/ProductDetail.vue`, and reusable components such as `frontend/src/components/CatalogFilters.vue` and `frontend/src/components/ProvenanceTimeline.vue`. Containerized execution is defined by `docker-compose.yml`, `backend/Dockerfile`, and `frontend/Dockerfile`; the frontend includes Nginx configuration at `frontend/nginx.conf`. Celery is configured from `backend/core/celery.py`, supporting the domain task modules, though the queue broker/service is not identifiable from the supplied tree.

Main entry points: [`backend/core/urls.py`](https://github.com/nelexey/antiqq/blob/main/backend/core/urls.py) (Django runtime), [`backend/orders/models.py`](https://github.com/nelexey/antiqq/blob/main/backend/orders/models.py) (Orders and fulfillment), [`frontend/src/router/index.ts`](https://github.com/nelexey/antiqq/blob/main/frontend/src/router/index.ts) (Router and screens), [`backend/users/models.py`](https://github.com/nelexey/antiqq/blob/main/backend/users/models.py) (Users and identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Vue SPA"]
  node_spa["Vue application<br/>SPA bootstrap<br/>[main.ts]"]
  node_router["Router and screens<br/>Vue routes<br/>[index.ts]"]
  node_client["HTTP client<br/>API integration<br/>[client.ts]"]
  node_auth_store["Auth session state<br/>Vue store<br/>[auth.ts]"]
  node_cart_store["Client cart state<br/>Vue store<br/>[cart.ts]"]
  node_catalog_ui["Catalog product UI<br/>Vue views<br/>[Catalog.vue]"]
end

subgraph group_backend["Django API"]
  node_django_runtime["Django runtime<br/>Django core<br/>[urls.py]"]
  node_catalog[("Catalog domain<br/>Django app<br/>[models.py]")]
  node_product_context["Provenance and reviews<br/>Django domains<br/>[models.py]"]
  node_users[("Users and identity<br/>Django app<br/>[models.py]")]
  node_addresses["Addresses and geocoding<br/>Django app<br/>[views.py]"]
  node_orders[("Orders and fulfillment<br/>Django app<br/>[models.py]")]
  node_consignments[("Seller consignments<br/>Django app<br/>[models.py]")]
end

subgraph group_async["Async work"]
  node_celery["Celery worker runtime<br/>Task runtime<br/>[celery.py]"]
  node_domain_tasks["Domain task modules<br/>Celery tasks<br/>[tasks.py]"]
  node_email_templates["Email templates<br/>Server-rendered notifications"]
end

subgraph group_ops["Deployment &amp; operations"]
  node_admin["Django admin<br/>Operations UI"]
  node_containers{{"Container deployment<br/>Docker Compose<br/>[docker-compose.yml]"}}
end

node_spa -->|"mounts"| node_router
node_router -->|"renders"| node_catalog_ui
node_router -->|"account flows"| node_auth_store
node_router -->|"cart and checkout"| node_cart_store
node_catalog_ui -->|"API requests"| node_client
node_auth_store -->|"authenticated requests"| node_client
node_cart_store -->|"checkout request"| node_client
node_client -->|"REST API"| node_django_runtime
node_django_runtime -->|"catalog routes"| node_catalog
node_django_runtime -->|"user routes"| node_users
node_django_runtime -->|"address routes"| node_addresses
node_django_runtime -->|"order routes"| node_orders
node_django_runtime -->|"consignment routes"| node_consignments
node_catalog -->|"product detail context"| node_product_context
node_users -->|"customer addresses"| node_addresses
node_orders -->|"purchased items"| node_catalog
node_orders -->|"customer authorization"| node_users
node_admin -->|"manages inventory"| node_catalog
node_admin -->|"order summaries"| node_orders
node_users -.->|"verification jobs"| node_celery
node_orders -.->|"workflow jobs"| node_celery
node_consignments -.->|"handling jobs"| node_celery
node_celery -->|"executes"| node_domain_tasks
node_domain_tasks -->|"renders notifications"| node_email_templates
node_containers -->|"serves frontend"| node_spa
node_containers -->|"runs backend"| node_django_runtime

click node_spa "https://github.com/nelexey/antiqq/blob/main/frontend/src/main.ts"
click node_router "https://github.com/nelexey/antiqq/blob/main/frontend/src/router/index.ts"
click node_client "https://github.com/nelexey/antiqq/blob/main/frontend/src/api/client.ts"
click node_auth_store "https://github.com/nelexey/antiqq/blob/main/frontend/src/stores/auth.ts"
click node_cart_store "https://github.com/nelexey/antiqq/blob/main/frontend/src/stores/cart.ts"
click node_catalog_ui "https://github.com/nelexey/antiqq/blob/main/frontend/src/views/Catalog.vue"
click node_django_runtime "https://github.com/nelexey/antiqq/blob/main/backend/core/urls.py"
click node_catalog "https://github.com/nelexey/antiqq/blob/main/backend/catalog/models.py"
click node_product_context "https://github.com/nelexey/antiqq/blob/main/backend/provenance/models.py"
click node_users "https://github.com/nelexey/antiqq/blob/main/backend/users/models.py"
click node_addresses "https://github.com/nelexey/antiqq/blob/main/backend/addresses/views.py"
click node_orders "https://github.com/nelexey/antiqq/blob/main/backend/orders/models.py"
click node_consignments "https://github.com/nelexey/antiqq/blob/main/backend/consignments/models.py"
click node_admin "https://github.com/nelexey/antiqq/tree/main/backend/templates/admin"
click node_celery "https://github.com/nelexey/antiqq/blob/main/backend/core/celery.py"
click node_domain_tasks "https://github.com/nelexey/antiqq/blob/main/backend/orders/tasks.py"
click node_email_templates "https://github.com/nelexey/antiqq/tree/main/backend/templates/emails"
click node_containers "https://github.com/nelexey/antiqq/blob/main/docker-compose.yml"

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_spa,node_router,node_client,node_auth_store,node_cart_store,node_catalog_ui toneBlue
class node_django_runtime,node_catalog,node_product_context,node_users,node_addresses,node_orders,node_consignments toneAmber
class node_celery,node_domain_tasks,node_email_templates toneMint
class node_admin,node_containers toneRose
```

## Components

### Vue SPA

- [Vue application](https://github.com/nelexey/antiqq/blob/main/frontend/src/main.ts): SPA bootstrap · `frontend/src/main.ts`
- [Router and screens](https://github.com/nelexey/antiqq/blob/main/frontend/src/router/index.ts): Vue routes · Catalog, product, account, cart, checkout, and selling flows. · `frontend/src/router/index.ts`
- [HTTP client](https://github.com/nelexey/antiqq/blob/main/frontend/src/api/client.ts): API integration · `frontend/src/api/client.ts`
- [Auth session state](https://github.com/nelexey/antiqq/blob/main/frontend/src/stores/auth.ts): Vue store · `frontend/src/stores/auth.ts`
- [Client cart state](https://github.com/nelexey/antiqq/blob/main/frontend/src/stores/cart.ts): Vue store · `frontend/src/stores/cart.ts`
- [Catalog product UI](https://github.com/nelexey/antiqq/blob/main/frontend/src/views/Catalog.vue): Vue views · Browsing, filters, product detail, and provenance timeline. · `frontend/src/views/Catalog.vue`

### Django API

- [Django runtime](https://github.com/nelexey/antiqq/blob/main/backend/core/urls.py): Django core · Settings, WSGI/ASGI deployment entry points, and API route composition. · `backend/core/urls.py`
- [Catalog domain](https://github.com/nelexey/antiqq/blob/main/backend/catalog/models.py): Django app · Antiques, categories, images, publication, sellers, favorites, filtering, and REST endpoints. · `backend/catalog/models.py`
- [Provenance and reviews](https://github.com/nelexey/antiqq/blob/main/backend/provenance/models.py): Django domains · Independent product-detail context domains. · `backend/provenance/models.py`
- [Users and identity](https://github.com/nelexey/antiqq/blob/main/backend/users/models.py): Django app · Custom accounts, authentication, and email verification APIs. · `backend/users/models.py`
- [Addresses and geocoding](https://github.com/nelexey/antiqq/blob/main/backend/addresses/views.py): Django app · Reusable address API with geocoding support. · `backend/addresses/views.py`
- [Orders and fulfillment](https://github.com/nelexey/antiqq/blob/main/backend/orders/models.py): Django app · Order persistence, item workflows, serializers, and authorization. · `backend/orders/models.py`
- [Seller consignments](https://github.com/nelexey/antiqq/blob/main/backend/consignments/models.py): Django app · Seller intake requests, images, and API endpoints. · `backend/consignments/models.py`

### Async work

- [Celery worker runtime](https://github.com/nelexey/antiqq/blob/main/backend/core/celery.py): Task runtime · Dispatches domain background tasks. · `backend/core/celery.py`
- [Domain task modules](https://github.com/nelexey/antiqq/blob/main/backend/orders/tasks.py): Celery tasks · User verification, order workflows, and consignment handling. · `backend/orders/tasks.py`
- [Email templates](https://github.com/nelexey/antiqq/tree/main/backend/templates/emails): Server-rendered notifications · Registration and consignment messages for users and administrators. · `backend/templates/emails`

### Deployment & operations

- [Django admin](https://github.com/nelexey/antiqq/tree/main/backend/templates/admin): Operations UI · Custom admin templates include order summaries. · `backend/templates/admin`
- [Container deployment](https://github.com/nelexey/antiqq/blob/main/docker-compose.yml): Docker Compose · Runs backend and frontend containers; frontend is served through Nginx. · `docker-compose.yml`

## Connections

- Vue application → Router and screens: mounts
- Router and screens → Catalog product UI: renders
- Router and screens → Auth session state: account flows
- Router and screens → Client cart state: cart and checkout
- Catalog product UI → HTTP client: API requests
- Auth session state → HTTP client: authenticated requests
- Client cart state → HTTP client: checkout request
- HTTP client → Django runtime: REST API
- Django runtime → Catalog domain: catalog routes
- Django runtime → Users and identity: user routes
- Django runtime → Addresses and geocoding: address routes
- Django runtime → Orders and fulfillment: order routes
- Django runtime → Seller consignments: consignment routes
- Catalog domain → Provenance and reviews: product detail context
- Users and identity → Addresses and geocoding: customer addresses
- Orders and fulfillment → Catalog domain: purchased items
- Orders and fulfillment → Users and identity: customer authorization
- Django admin → Catalog domain: manages inventory
- Django admin → Orders and fulfillment: order summaries
- Users and identity → Celery worker runtime: verification jobs
- Orders and fulfillment → Celery worker runtime: workflow jobs
- Seller consignments → Celery worker runtime: handling jobs
- Celery worker runtime → Domain task modules: executes
- Domain task modules → Email templates: renders notifications
- Container deployment → Vue application: serves frontend
- Container deployment → Django runtime: runs backend
