# luc7o/anita-new-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/luc7o/anita-new-2026
- Repository: https://github.com/luc7o/anita-new-2026

## Overview

Anita New Style is a fashion-commerce application: shoppers browse products, manage a cart, check out, pay, and track orders; staff manage commerce and store operations through a separate admin experience. The map highlights that customer workflow, authentication, and the major documented admin capabilities. The README and sampled files establish the frontend entry points, API client, backend routes, and payment integration; unsampled route and page internals are represented at their existing directory paths, without asserting unverified calls.

Main entry points: [`frontend/src/api/client.js`](https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/api/client.js) (API client), [`backend/app/routes/pedidos.py`](https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/pedidos.py) (Order lifecycle), [`backend/app/models`](https://github.com/luc7o/anita-new-2026/tree/main/backend/app/models) (Commerce data), [`frontend/src/App.jsx`](https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/App.jsx) (Store app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shopper["Customer storefront"]
  node_store_app["Store app<br/>[App.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_cart_state["Cart state<br/>[CarritoContext.jsx]"]
  node_api_client["API client<br/>[client.js]"]
end

subgraph group_identity["Identity and consent"]
  node_auth_state["Session state<br/>[AuthContext.jsx]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
end

subgraph group_commerce["Commerce backend"]
  node_catalog_routes["Product catalog<br/>[productos.py]"]
  node_cart_routes["Cart endpoints<br/>[carrito.py]"]
  node_order_routes["Order lifecycle<br/>[pedidos.py]"]
  node_payment["Culqi payments<br/>[culqi.py]"]
  node_stock["Stock management<br/>[stock.py]"]
  node_models[("Commerce data")]
end

subgraph group_operations["Store operations"]
  node_admin_app["Admin interface<br/>[AdminApp.jsx]"]
  node_admin_pages["Admin workflows"]
  node_admin_routes["Admin API"]
  node_reports["Reports and KPIs<br/>[admin_reportes.py]"]
end

node_customer(("Shopper"))
node_culqi_service["Culqi"]

node_customer -->|"uses"| node_store_app
node_store_app -->|"routes to"| node_checkout
node_store_app -->|"provides state"| node_cart_state
node_checkout -.->|"requests checkout"| node_api_client
node_cart_state -->|"requests cart"| node_api_client
node_api_client -.->|"submits payment"| node_order_routes
node_api_client -.->|"requests catalog"| node_catalog_routes
node_api_client -.->|"requests cart"| node_cart_routes
node_auth_state -->|"calls API"| node_api_client
node_api_client -.->|"refreshes session"| node_auth_routes
node_order_routes -->|"charges through"| node_payment
node_payment -.->|"creates charge"| node_culqi_service
node_order_routes -->|"updates stock"| node_stock
node_order_routes -->|"reads and writes"| node_models
node_auth_routes -->|"reads and writes"| node_models
node_admin_app -.->|"hosts workflows"| node_admin_pages
node_admin_pages -.->|"uses API"| node_api_client
node_admin_routes -.->|"reads and writes"| node_models
node_reports -.->|"reports on"| node_models

click node_store_app "https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/App.jsx"
click node_checkout "https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/pages/Checkout.jsx"
click node_cart_state "https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/context/CarritoContext.jsx"
click node_api_client "https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/api/client.js"
click node_auth_state "https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/context/AuthContext.jsx"
click node_auth_routes "https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/auth.py"
click node_catalog_routes "https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/productos.py"
click node_cart_routes "https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/carrito.py"
click node_order_routes "https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/pedidos.py"
click node_payment "https://github.com/luc7o/anita-new-2026/blob/main/backend/app/utils/culqi.py"
click node_stock "https://github.com/luc7o/anita-new-2026/blob/main/backend/app/utils/stock.py"
click node_models "https://github.com/luc7o/anita-new-2026/tree/main/backend/app/models"
click node_admin_app "https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/AdminApp.jsx"
click node_admin_pages "https://github.com/luc7o/anita-new-2026/tree/main/frontend/src/pages/admin"
click node_admin_routes "https://github.com/luc7o/anita-new-2026/tree/main/backend/app/routes"
click node_reports "https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/admin_reportes.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_store_app,node_checkout,node_cart_state,node_api_client toneBlue
class node_auth_state,node_auth_routes toneAmber
class node_catalog_routes,node_cart_routes,node_order_routes,node_payment,node_stock,node_models toneMint
class node_admin_app,node_admin_pages,node_admin_routes,node_reports toneRose
class node_customer,node_culqi_service toneIndigo
```

## Components

### Customer storefront

- [Store app](https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Checkout](https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/pages/Checkout.jsx): `frontend/src/pages/Checkout.jsx`
- [Cart state](https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/context/CarritoContext.jsx): `frontend/src/context/CarritoContext.jsx`
- [API client](https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Identity and consent

- [Session state](https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Authentication](https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`

### Commerce backend

- [Product catalog](https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/productos.py): `backend/app/routes/productos.py`
- [Cart endpoints](https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/carrito.py): `backend/app/routes/carrito.py`
- [Order lifecycle](https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/pedidos.py): `backend/app/routes/pedidos.py`
- [Culqi payments](https://github.com/luc7o/anita-new-2026/blob/main/backend/app/utils/culqi.py): `backend/app/utils/culqi.py`
- [Stock management](https://github.com/luc7o/anita-new-2026/blob/main/backend/app/utils/stock.py): `backend/app/utils/stock.py`
- [Commerce data](https://github.com/luc7o/anita-new-2026/tree/main/backend/app/models): `backend/app/models`

### Store operations

- [Admin interface](https://github.com/luc7o/anita-new-2026/blob/main/frontend/src/AdminApp.jsx): `frontend/src/AdminApp.jsx`
- [Admin workflows](https://github.com/luc7o/anita-new-2026/tree/main/frontend/src/pages/admin): `frontend/src/pages/admin`
- [Admin API](https://github.com/luc7o/anita-new-2026/tree/main/backend/app/routes): `backend/app/routes`
- [Reports and KPIs](https://github.com/luc7o/anita-new-2026/blob/main/backend/app/routes/admin_reportes.py): `backend/app/routes/admin_reportes.py`

### Other components

- **Shopper**
- **Culqi**

## Connections

- Shopper → Store app: uses
- Store app → Checkout: routes to (evidence: `frontend/src/App.jsx`)
- Store app → Cart state: provides state (evidence: `frontend/src/main.jsx`)
- Checkout → API client: requests checkout
- Cart state → API client: requests cart (evidence: `frontend/src/context/CarritoContext.jsx`)
- API client → Order lifecycle: submits payment (evidence: `README.md`)
- API client → Product catalog: requests catalog
- API client → Cart endpoints: requests cart
- Session state → API client: calls API (evidence: `frontend/src/context/AuthContext.jsx`)
- API client → Authentication: refreshes session (evidence: `README.md`)
- Order lifecycle → Culqi payments: charges through (evidence: `backend/app/routes/pedidos.py`)
- Culqi payments → Culqi: creates charge (evidence: `README.md`)
- Order lifecycle → Stock management: updates stock (evidence: `backend/app/routes/pedidos.py`)
- Order lifecycle → Commerce data: reads and writes (evidence: `backend/app/routes/pedidos.py`)
- Authentication → Commerce data: reads and writes (evidence: `backend/app/routes/auth.py`)
- Admin interface → Admin workflows: hosts workflows
- Admin workflows → API client: uses API
- Admin API → Commerce data: reads and writes (evidence: `backend/app/routes/auth.py`)
- Reports and KPIs → Commerce data: reports on
