# aksevinch/soa-1 architecture

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

- Interactive diagram: https://gitdiagram.com/aksevinch/soa-1
- Repository: https://github.com/aksevinch/soa-1

## Overview

This repository is an architecture-design exercise for a digital marketplace, with one deliberately minimal runtime service. The implemented workflow is a GET /health request returning JSON with HTTP 200; it has no marketplace business logic. The README documents broader planned domains and integrations, but these are not implemented in the sampled source. Relationships for those planned components are shown only where the README explicitly states them.

Main entry points: [`docs/c4/02-container.md`](https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md) (API Gateway), [`services/catalog-service/main.go`](https://github.com/aksevinch/soa-1/blob/main/services/catalog-service/main.go) (Catalog service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Implemented runtime"]
  node_catalog["Catalog service<br/>[main.go]"]
end

subgraph group_marketplace["Planned marketplace"]
  node_web["Web Portal<br/>[02-container.md]"]
  node_gateway["API Gateway<br/>[02-container.md]"]
  node_identity["Identity Service<br/>[02-container.md]"]
  node_identitydb[("Identity DB<br/>[02-container.md]")]
  node_planned_catalog["Catalog domain<br/>[02-container.md]"]
  node_catalogdb[("Catalog DB<br/>[02-container.md]")]
end

node_caller(("HTTP client"))
node_buyer(("Buyer"))
node_seller(("Seller"))
node_moderator(("Moderator"))
node_payment["Payment gateway"]
node_carrier["Delivery API"]
node_notifications["Notification providers"]
node_idp["Identity provider"]

node_caller -->|"requests health"| node_catalog
node_catalog -->|"returns 200 JSON"| node_caller
node_buyer -.->|"uses portal"| node_web
node_seller -.->|"uses portal"| node_web
node_moderator -.->|"moderates"| node_gateway
node_web -.->|"sends requests"| node_gateway
node_gateway -.->|"routes requests"| node_identity
node_gateway -.->|"routes requests"| node_planned_catalog
node_identity -.->|"owns data"| node_identitydb
node_planned_catalog -.->|"owns data"| node_catalogdb
node_gateway -.->|"handles payments"| node_payment
node_gateway -.->|"requests delivery"| node_carrier
node_gateway -.->|"sends notices"| node_notifications
node_identity -.->|"delegates login"| node_idp

click node_catalog "https://github.com/aksevinch/soa-1/blob/main/services/catalog-service/main.go"
click node_web "https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md"
click node_gateway "https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md"
click node_identity "https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md"
click node_identitydb "https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md"
click node_planned_catalog "https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md"
click node_catalogdb "https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md"

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,node_caller toneBlue
class node_web,node_gateway,node_identity,node_identitydb,node_planned_catalog,node_catalogdb toneAmber
class node_buyer,node_seller,node_moderator,node_payment,node_notifications,node_idp toneIndigo
class node_carrier toneMint
```

## Components

### Implemented runtime

- [Catalog service](https://github.com/aksevinch/soa-1/blob/main/services/catalog-service/main.go): `services/catalog-service/main.go`

### Planned marketplace

- [Web Portal](https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md): `docs/c4/02-container.md`
- [API Gateway](https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md): `docs/c4/02-container.md`
- [Identity Service](https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md): `docs/c4/02-container.md`
- [Identity DB](https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md): `docs/c4/02-container.md`
- [Catalog domain](https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md): `docs/c4/02-container.md`
- [Catalog DB](https://github.com/aksevinch/soa-1/blob/main/docs/c4/02-container.md): `docs/c4/02-container.md`

### Other components

- **HTTP client**
- **Buyer**
- **Seller**
- **Moderator**
- **Payment gateway**
- **Delivery API**
- **Notification providers**
- **Identity provider**

## Connections

- HTTP client → Catalog service: requests health (evidence: `services/catalog-service/main.go`)
- Catalog service → HTTP client: returns 200 JSON (evidence: `services/catalog-service/main.go`)
- Buyer → Web Portal: uses portal (evidence: `README.md`)
- Seller → Web Portal: uses portal (evidence: `README.md`)
- Moderator → API Gateway: moderates (evidence: `README.md`)
- Web Portal → API Gateway: sends requests (evidence: `README.md`)
- API Gateway → Identity Service: routes requests (evidence: `README.md`)
- API Gateway → Catalog domain: routes requests (evidence: `README.md`)
- Identity Service → Identity DB: owns data (evidence: `README.md`)
- Catalog domain → Catalog DB: owns data (evidence: `README.md`)
- API Gateway → Payment gateway: handles payments (evidence: `README.md`)
- API Gateway → Delivery API: requests delivery (evidence: `README.md`)
- API Gateway → Notification providers: sends notices (evidence: `README.md`)
- Identity Service → Identity provider: delegates login (evidence: `README.md`)
