# julietaruppertc/acordesmayorista architecture

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

- Interactive diagram: https://gitdiagram.com/julietaruppertc/acordesmayorista
- Repository: https://github.com/julietaruppertc/acordesmayorista

## Overview

Acordes Mayorista is a wholesale and retail musical-instrument store. A shopper browses the catalog, keeps a browser-side cart, and submits an order; the backend reserves stock, then an administrator confirms or rejects it through simulated payment, or the reservation expires. Auth and wholesale approval, operator stock adjustments, customer administration, and simulated notifications are distinct supporting capabilities. The README documents the service boundaries and purchase lifecycle; the sampled source confirms selected routing and calls, but many frontend views and backend modules were not inspected.

Main entry points: [`apps/web/src/App.jsx`](https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/App.jsx) (React storefront), [`services/core-service/src/app.js`](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/app.js) (Core API routing), [`services/api-gateway/src/app.js`](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/api-gateway/src/app.js) (API gateway), [`services/core-service/src/config/database.js`](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/config/database.js) (Business database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Storefront"]
  node_spa["React storefront<br/>[App.jsx]"]
  node_catalog_ui["Catalog browsing<br/>[Catalog.jsx]"]
  node_cart_checkout["Cart and checkout<br/>[Checkout.jsx]"]
  node_order_ui["Order management"]
  node_stock_ui["Stock operations<br/>[OperatorStock.jsx]"]
  node_wholesale_ui["Wholesale and users"]
  node_auth_ui["Sign-in and registration<br/>[useAuth.js]"]
end

subgraph group_edge["Gateway and identity"]
  node_gateway["API gateway<br/>[app.js]"]
  node_auth_service["Authentication service<br/>[authController.js]"]
  node_user_store[("User records<br/>[User.js]")]
end

subgraph group_core["Commerce core"]
  node_core_app["Core API routing<br/>[app.js]"]
  node_catalog["Product catalog"]
  node_inventory["Stock and reservations"]
  node_orders["Order lifecycle"]
  node_payments["Simulated payments"]
  node_business_db[("Business database<br/>[database.js]")]
end

subgraph group_async["Background processing"]
  node_expiry["Reservation expiry"]
  node_outbox["Outbox worker<br/>[outboxWorker.js]"]
  node_console_notice(("Console notification"))
end

node_shopper(("Shopper or staff"))

node_shopper -->|"uses"| node_spa
node_spa -->|"renders"| node_catalog_ui
node_spa -->|"routes to"| node_cart_checkout
node_spa -->|"routes to"| node_order_ui
node_spa -->|"routes to"| node_stock_ui
node_spa -->|"routes to"| node_wholesale_ui
node_spa -->|"uses"| node_auth_ui
node_spa -->|"sends requests"| node_gateway
node_gateway -->|"proxies auth"| node_auth_service
node_gateway -->|"proxies commerce"| node_core_app
node_auth_service -->|"reads and writes"| node_user_store
node_core_app -->|"routes products"| node_catalog
node_core_app -->|"routes stock"| node_inventory
node_core_app -->|"routes orders"| node_orders
node_core_app -->|"routes payments"| node_payments
node_orders -->|"resolves via"| node_payments
node_shopper -->|"account data"| node_user_store
node_expiry -->|"expires reservations"| node_business_db
node_outbox -->|"processes events"| node_business_db
node_outbox -->|"logs notification"| node_console_notice
node_core_app -->|"checks readiness"| node_business_db

click node_spa "https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/App.jsx"
click node_catalog_ui "https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/Catalog.jsx"
click node_cart_checkout "https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/Checkout.jsx"
click node_order_ui "https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/OrderManagement.jsx"
click node_stock_ui "https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/OperatorStock.jsx"
click node_wholesale_ui "https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/WholesaleManagement.jsx"
click node_auth_ui "https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/hooks/useAuth.js"
click node_gateway "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/api-gateway/src/app.js"
click node_auth_service "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/auth-service/src/controllers/authController.js"
click node_user_store "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/auth-service/src/models/User.js"
click node_core_app "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/app.js"
click node_catalog "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/modules/catalog/catalog.controller.js"
click node_inventory "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/modules/inventory/inventory.controller.js"
click node_orders "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/modules/orders/orders.controller.js"
click node_payments "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/modules/payments/payments.service.js"
click node_business_db "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/config/database.js"
click node_expiry "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/jobs/expireReservations.js"
click node_outbox "https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/workers/outboxWorker.js"

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_catalog_ui,node_cart_checkout,node_order_ui,node_stock_ui,node_wholesale_ui,node_auth_ui toneBlue
class node_gateway,node_auth_service,node_user_store toneAmber
class node_core_app,node_catalog,node_inventory,node_orders,node_payments,node_business_db toneMint
class node_expiry,node_outbox,node_console_notice toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [React storefront](https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/App.jsx): `apps/web/src/App.jsx`
- [Catalog browsing](https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/Catalog.jsx): `apps/web/src/views/Catalog.jsx`
- [Cart and checkout](https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/Checkout.jsx): `apps/web/src/views/Checkout.jsx`
- [Order management](https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/OrderManagement.jsx): `apps/web/src/views/OrderManagement.jsx`
- [Stock operations](https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/OperatorStock.jsx): `apps/web/src/views/OperatorStock.jsx`
- [Wholesale and users](https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/views/WholesaleManagement.jsx): `apps/web/src/views/WholesaleManagement.jsx`
- [Sign-in and registration](https://github.com/julietaruppertc/acordesmayorista/blob/main/apps/web/src/hooks/useAuth.js): `apps/web/src/hooks/useAuth.js`

### Gateway and identity

- [API gateway](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/api-gateway/src/app.js): `services/api-gateway/src/app.js`
- [Authentication service](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/auth-service/src/controllers/authController.js): `services/auth-service/src/controllers/authController.js`
- [User records](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/auth-service/src/models/User.js): `services/auth-service/src/models/User.js`

### Commerce core

- [Core API routing](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/app.js): `services/core-service/src/app.js`
- [Product catalog](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/modules/catalog/catalog.controller.js): `services/core-service/src/modules/catalog/catalog.controller.js`
- [Stock and reservations](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/modules/inventory/inventory.controller.js): `services/core-service/src/modules/inventory/inventory.controller.js`
- [Order lifecycle](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/modules/orders/orders.controller.js): `services/core-service/src/modules/orders/orders.controller.js`
- [Simulated payments](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/modules/payments/payments.service.js): `services/core-service/src/modules/payments/payments.service.js`
- [Business database](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/config/database.js): `services/core-service/src/config/database.js`

### Background processing

- [Reservation expiry](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/jobs/expireReservations.js): `services/core-service/src/jobs/expireReservations.js`
- [Outbox worker](https://github.com/julietaruppertc/acordesmayorista/blob/main/services/core-service/src/workers/outboxWorker.js): `services/core-service/src/workers/outboxWorker.js`
- **Console notification**

### Other components

- **Shopper or staff**

## Connections

- Shopper or staff → React storefront: uses (evidence: `README.md`)
- React storefront → Catalog browsing: renders (evidence: `apps/web/src/App.jsx`)
- React storefront → Cart and checkout: routes to (evidence: `apps/web/src/App.jsx`)
- React storefront → Order management: routes to (evidence: `apps/web/src/App.jsx`)
- React storefront → Stock operations: routes to (evidence: `apps/web/src/App.jsx`)
- React storefront → Wholesale and users: routes to (evidence: `apps/web/src/App.jsx`)
- React storefront → Sign-in and registration: uses (evidence: `apps/web/src/App.jsx`)
- React storefront → API gateway: sends requests (evidence: `README.md`)
- API gateway → Authentication service: proxies auth (evidence: `services/api-gateway/src/app.js`)
- API gateway → Core API routing: proxies commerce (evidence: `services/api-gateway/src/app.js`)
- Authentication service → User records: reads and writes (evidence: `services/auth-service/src/controllers/authController.js`)
- Core API routing → Product catalog: routes products (evidence: `services/core-service/src/app.js`)
- Core API routing → Stock and reservations: routes stock (evidence: `services/core-service/src/app.js`)
- Core API routing → Order lifecycle: routes orders (evidence: `services/core-service/src/app.js`)
- Core API routing → Simulated payments: routes payments (evidence: `services/core-service/src/app.js`)
- Order lifecycle → Simulated payments: resolves via (evidence: `services/core-service/src/modules/orders/orders.controller.js`)
- Shopper or staff → User records: account data (evidence: `README.md`)
- Reservation expiry → Business database: expires reservations (evidence: `README.md`)
- Outbox worker → Business database: processes events (evidence: `README.md`)
- Outbox worker → Console notification: logs notification (evidence: `README.md`)
- Core API routing → Business database: checks readiness (evidence: `services/core-service/src/app.js`)
