# draganovik/matterway architecture

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

- Interactive diagram: https://gitdiagram.com/draganovik/matterway
- Repository: https://github.com/draganovik/matterway

## Overview

Matterway is a commerce platform spanning a customer storefront, an administration dashboard, and four service-owned APIs. The main customer journey is browsing catalog items, managing a customer cart/account, and placing orders; administrators manage catalog content, customers, and sales. The APIs persist to separate PostgreSQL databases, while Catalog also stores images in S3-compatible RustFS. README documentation establishes the cross-service and browser workflows; sampled source confirms API setup and image-storage behavior, but most feature handlers and Nuxt server routes were not sampled.

Main entry points: [`src/Matterway.Customers.Api/Program.cs`](https://github.com/draganovik/matterway/blob/main/src/Matterway.Customers.Api/Program.cs) (Customers API), [`src/Matterway.AppHost/Program.cs`](https://github.com/draganovik/matterway/blob/main/src/Matterway.AppHost/Program.cs) (Aspire AppHost), [`src/Matterway.Sales.Api/Program.cs`](https://github.com/draganovik/matterway/blob/main/src/Matterway.Sales.Api/Program.cs) (Sales API), [`src/Matterway.Catalog.Api/Program.cs`](https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Program.cs) (Catalog API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web applications"]
  node_storefront["Storefront<br/>[app]"]
  node_checkout["Checkout routes<br/>[checkout]"]
  node_dashboard["Admin dashboard<br/>[app]"]
  node_catalog_ui["Catalog admin UI<br/>[catalog]"]
end

subgraph group_catalog["Catalog domain"]
  node_catalog_api["Catalog API<br/>[Program.cs]"]
  node_archive["Catalog archives"]
  node_image_service["Image storage"]
end

subgraph group_services["Commerce services"]
  node_customers_api["Customers API<br/>[Program.cs]"]
  node_identity_api["Identity API<br/>[Program.cs]"]
  node_token_service["JWT tokens<br/>[JwtTokenService.cs]"]
  node_sales_api["Sales API<br/>[Program.cs]"]
end

subgraph group_state["Persistence and storage"]
  node_catalog_db[("Catalog database")]
  node_customers_db[("Customers database<br/>[Persistence]")]
  node_identity_db[("Identity database<br/>[Persistence]")]
  node_sales_db[("Sales database<br/>[Persistence]")]
  node_rustfs[("RustFS")]
end

subgraph group_runtime["Runtime integration"]
  node_apphost["Aspire AppHost<br/>[Program.cs]"]
  node_service_defaults["API service defaults"]
end

node_browser(("Browser"))
node_stripe["Stripe"]

node_browser -->|"uses"| node_storefront
node_browser -->|"uses"| node_dashboard
node_storefront -->|"requests"| node_catalog_api
node_storefront -->|"requests"| node_customers_api
node_storefront -->|"requests"| node_identity_api
node_storefront -->|"requests"| node_sales_api
node_dashboard -->|"requests"| node_catalog_api
node_dashboard -->|"requests"| node_customers_api
node_dashboard -->|"requests"| node_identity_api
node_dashboard -->|"requests"| node_sales_api
node_catalog_ui -.->|"administers"| node_catalog_api
node_checkout -.->|"coordinates"| node_sales_api
node_checkout -.->|"charges"| node_stripe
node_customers_api -->|"calls"| node_catalog_api
node_customers_api -->|"calls"| node_identity_api
node_sales_api -->|"calls"| node_customers_api
node_catalog_api -->|"persists"| node_catalog_db
node_customers_api -->|"persists"| node_customers_db
node_identity_api -->|"persists"| node_identity_db
node_sales_api -->|"persists"| node_sales_db
node_catalog_api -->|"uses"| node_image_service
node_image_service -->|"stores images"| node_rustfs
node_archive -.->|"imports exports"| node_catalog_db
node_identity_api -.->|"issues tokens"| node_token_service
node_apphost -->|"configures"| node_catalog_api
node_apphost -->|"configures"| node_customers_api
node_apphost -->|"configures"| node_identity_api
node_apphost -->|"configures"| node_sales_api
node_apphost -->|"starts"| node_rustfs
node_apphost -->|"configures"| node_storefront
node_apphost -->|"configures"| node_dashboard
node_customers_api -->|"configures"| node_service_defaults
node_sales_api -->|"configures"| node_service_defaults

click node_storefront "https://github.com/draganovik/matterway/tree/main/src/Matterway.Storefront.Web/app"
click node_checkout "https://github.com/draganovik/matterway/tree/main/src/Matterway.Storefront.Web/server/modules/checkout"
click node_dashboard "https://github.com/draganovik/matterway/tree/main/src/Matterway.Dashboard.Web/app"
click node_catalog_ui "https://github.com/draganovik/matterway/tree/main/src/Matterway.Dashboard.Web/app/components/features/catalog"
click node_catalog_api "https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Program.cs"
click node_archive "https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Infrastructure/ImportExport/CatalogArchiveService.cs"
click node_image_service "https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Infrastructure/Storage/S3/S3ImageStorageService.cs"
click node_customers_api "https://github.com/draganovik/matterway/blob/main/src/Matterway.Customers.Api/Program.cs"
click node_identity_api "https://github.com/draganovik/matterway/blob/main/src/Matterway.Identity.Api/Program.cs"
click node_token_service "https://github.com/draganovik/matterway/blob/main/src/Matterway.Identity.Api/Infrastructure/Services/AuthToken/JwtTokenService.cs"
click node_sales_api "https://github.com/draganovik/matterway/blob/main/src/Matterway.Sales.Api/Program.cs"
click node_catalog_db "https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Infrastructure/Persistence/CatalogDbComposer.cs"
click node_customers_db "https://github.com/draganovik/matterway/tree/main/src/Matterway.Customers.Api/Infrastructure/Persistence"
click node_identity_db "https://github.com/draganovik/matterway/tree/main/src/Matterway.Identity.Api/Infrastructure/Persistence"
click node_sales_db "https://github.com/draganovik/matterway/tree/main/src/Matterway.Sales.Api/Infrastructure/Persistence"
click node_apphost "https://github.com/draganovik/matterway/blob/main/src/Matterway.AppHost/Program.cs"
click node_service_defaults "https://github.com/draganovik/matterway/blob/main/src/Matterway.ServiceDefaults/AspireServiceDefaults.cs"

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_storefront,node_checkout,node_dashboard,node_catalog_ui,node_browser toneBlue
class node_catalog_api,node_archive,node_image_service toneAmber
class node_customers_api,node_identity_api,node_token_service,node_sales_api toneMint
class node_catalog_db,node_customers_db,node_identity_db,node_sales_db,node_rustfs toneRose
class node_apphost,node_service_defaults,node_stripe toneIndigo
```

## Components

### Web applications

- [Storefront](https://github.com/draganovik/matterway/tree/main/src/Matterway.Storefront.Web/app): `src/Matterway.Storefront.Web/app`
- [Checkout routes](https://github.com/draganovik/matterway/tree/main/src/Matterway.Storefront.Web/server/modules/checkout): `src/Matterway.Storefront.Web/server/modules/checkout`
- [Admin dashboard](https://github.com/draganovik/matterway/tree/main/src/Matterway.Dashboard.Web/app): `src/Matterway.Dashboard.Web/app`
- [Catalog admin UI](https://github.com/draganovik/matterway/tree/main/src/Matterway.Dashboard.Web/app/components/features/catalog): `src/Matterway.Dashboard.Web/app/components/features/catalog`

### Catalog domain

- [Catalog API](https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Program.cs): `src/Matterway.Catalog.Api/Program.cs`
- [Catalog archives](https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Infrastructure/ImportExport/CatalogArchiveService.cs): `src/Matterway.Catalog.Api/Infrastructure/ImportExport/CatalogArchiveService.cs`
- [Image storage](https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Infrastructure/Storage/S3/S3ImageStorageService.cs): `src/Matterway.Catalog.Api/Infrastructure/Storage/S3/S3ImageStorageService.cs`

### Commerce services

- [Customers API](https://github.com/draganovik/matterway/blob/main/src/Matterway.Customers.Api/Program.cs): `src/Matterway.Customers.Api/Program.cs`
- [Identity API](https://github.com/draganovik/matterway/blob/main/src/Matterway.Identity.Api/Program.cs): `src/Matterway.Identity.Api/Program.cs`
- [JWT tokens](https://github.com/draganovik/matterway/blob/main/src/Matterway.Identity.Api/Infrastructure/Services/AuthToken/JwtTokenService.cs): `src/Matterway.Identity.Api/Infrastructure/Services/AuthToken/JwtTokenService.cs`
- [Sales API](https://github.com/draganovik/matterway/blob/main/src/Matterway.Sales.Api/Program.cs): `src/Matterway.Sales.Api/Program.cs`

### Persistence and storage

- [Catalog database](https://github.com/draganovik/matterway/blob/main/src/Matterway.Catalog.Api/Infrastructure/Persistence/CatalogDbComposer.cs): `src/Matterway.Catalog.Api/Infrastructure/Persistence/CatalogDbComposer.cs`
- [Customers database](https://github.com/draganovik/matterway/tree/main/src/Matterway.Customers.Api/Infrastructure/Persistence): `src/Matterway.Customers.Api/Infrastructure/Persistence`
- [Identity database](https://github.com/draganovik/matterway/tree/main/src/Matterway.Identity.Api/Infrastructure/Persistence): `src/Matterway.Identity.Api/Infrastructure/Persistence`
- [Sales database](https://github.com/draganovik/matterway/tree/main/src/Matterway.Sales.Api/Infrastructure/Persistence): `src/Matterway.Sales.Api/Infrastructure/Persistence`
- **RustFS**

### Runtime integration

- [Aspire AppHost](https://github.com/draganovik/matterway/blob/main/src/Matterway.AppHost/Program.cs): `src/Matterway.AppHost/Program.cs`
- [API service defaults](https://github.com/draganovik/matterway/blob/main/src/Matterway.ServiceDefaults/AspireServiceDefaults.cs): `src/Matterway.ServiceDefaults/AspireServiceDefaults.cs`

### Other components

- **Browser**
- **Stripe**

## Connections

- Browser → Storefront: uses (evidence: `README.md`)
- Browser → Admin dashboard: uses (evidence: `README.md`)
- Storefront → Catalog API: requests (evidence: `README.md`)
- Storefront → Customers API: requests (evidence: `README.md`)
- Storefront → Identity API: requests (evidence: `README.md`)
- Storefront → Sales API: requests (evidence: `README.md`)
- Admin dashboard → Catalog API: requests (evidence: `README.md`)
- Admin dashboard → Customers API: requests (evidence: `README.md`)
- Admin dashboard → Identity API: requests (evidence: `README.md`)
- Admin dashboard → Sales API: requests (evidence: `README.md`)
- Catalog admin UI → Catalog API: administers
- Checkout routes → Sales API: coordinates
- Checkout routes → Stripe: charges
- Customers API → Catalog API: calls (evidence: `README.md`)
- Customers API → Identity API: calls (evidence: `README.md`)
- Sales API → Customers API: calls (evidence: `README.md`)
- Catalog API → Catalog database: persists (evidence: `README.md`)
- Customers API → Customers database: persists (evidence: `README.md`)
- Identity API → Identity database: persists (evidence: `README.md`)
- Sales API → Sales database: persists (evidence: `README.md`)
- Catalog API → Image storage: uses
- Image storage → RustFS: stores images (evidence: `README.md`)
- Catalog archives → Catalog database: imports exports
- Identity API → JWT tokens: issues tokens (evidence: `src/Matterway.Identity.Api/Program.cs`)
- Aspire AppHost → Catalog API: configures (evidence: `src/Matterway.AppHost/Program.cs`)
- Aspire AppHost → Customers API: configures (evidence: `src/Matterway.AppHost/Program.cs`)
- Aspire AppHost → Identity API: configures (evidence: `src/Matterway.AppHost/Program.cs`)
- Aspire AppHost → Sales API: configures (evidence: `src/Matterway.AppHost/Program.cs`)
- Aspire AppHost → RustFS: starts (evidence: `src/Matterway.AppHost/Program.cs`)
- Aspire AppHost → Storefront: configures (evidence: `src/Matterway.AppHost/Program.cs`)
- Aspire AppHost → Admin dashboard: configures (evidence: `src/Matterway.AppHost/Program.cs`)
- Customers API → API service defaults: configures (evidence: `src/Matterway.Customers.Api/Program.cs`)
- Sales API → API service defaults: configures (evidence: `src/Matterway.Sales.Api/Program.cs`)
