# mana2k/codeacademy2026 architecture

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

- Interactive diagram: https://gitdiagram.com/mana2k/codeacademy2026
- Repository: https://github.com/mana2k/codeacademy2026

## Overview

This tree contains several workshop tracks rather than one deployed application. The main end-to-end product flow is Kaffebar: customers browse a menu and place orders, baristas update order status, and the web UI can receive live events. Idempotweet and the standalone RabbitMQ producer/consumer are separate event-driven examples. Edges reflect sampled code or explicit source comments; some unsampled subsystems are represented only at their existing directory paths.

Main entry points: [`4-Frontend/kaffebar-web/src/app`](https://github.com/mana2k/codeacademy2026/tree/main/4-Frontend/kaffebar-web/src/app) (Customer and barista UI), [`3-APIs/kaffebar-dotnet-solution/Kaffebar/Controllers/OrdersController.cs`](https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Controllers/OrdersController.cs) (Order endpoints), [`1-DevOps/idempotweet/src/app/page.tsx`](https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/page.tsx) (Idem web UI), [`1-DevOps/idempotweet/src/app/api/publish/route.ts`](https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/api/publish/route.ts) (Publish Idem)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Kaffebar web"]
  node_webapp["Customer and barista UI"]
  node_orderform["Order form<br/>[OrderForm.tsx]"]
  node_baristaboard["Barista board<br/>[BaristaBoard.tsx]"]
  node_ordershook["Order data hook<br/>[useOrders.ts]"]
  node_eventhook["Live event hook<br/>[useEventSource.ts]"]
  node_ordersbff["Orders BFF<br/>[route.ts]"]
  node_eventsbff["Events BFF<br/>[route.ts]"]
  node_apiclient["API client<br/>[api.ts]"]
end

subgraph group_api["Kaffebar API"]
  node_orderapi["Order endpoints"]
  node_menuroute["Menu and health<br/>[Program.cs]"]
  node_repository[("Order repository")]
  node_eventpublisher["Order event publisher"]
  node_autobarista["Auto barista<br/>[AutoBarista.cs]"]
end

subgraph group_idem["Idempotweet"]
  node_idemui["Idem web UI<br/>[page.tsx]"]
  node_idemform["Publish form<br/>[IdemForm.tsx]"]
  node_idemfeed["Idem feed<br/>[IdemsFeed.tsx]"]
  node_idemget["List Idems<br/>[route.ts]"]
  node_idempublish["Publish Idem<br/>[route.ts]"]
  node_idemdb[("Idem database<br/>[db.ts]")]
end

subgraph group_messaging["Messaging examples"]
  node_producer["Sample producer<br/>[Program.cs]"]
  node_consumer["Sample consumer<br/>[Program.cs]"]
  node_idemconsumer["Idem database consumer<br/>[IdemRepository.cs]"]
end

node_customer(("Customer"))
node_barista(("Barista"))
node_rabbit["RabbitMQ"]
node_idemuser(("Idem user"))

node_customer -->|"uses"| node_webapp
node_barista -->|"uses"| node_webapp
node_webapp -->|"presents"| node_orderform
node_webapp -->|"presents"| node_baristaboard
node_orderform -->|"submits"| node_ordershook
node_baristaboard -->|"updates"| node_ordershook
node_ordershook -->|"requests"| node_ordersbff
node_ordersbff -->|"calls"| node_apiclient
node_apiclient -->|"calls"| node_orderapi
node_orderapi -->|"reads and writes"| node_repository
node_orderapi -.->|"publishes"| node_eventpublisher
node_eventpublisher -.->|"publishes"| node_rabbit
node_autobarista -.->|"subscribes"| node_rabbit
node_eventhook -->|"subscribes"| node_eventsbff
node_eventsbff -->|"subscribes"| node_rabbit
node_idemuser -->|"uses"| node_idemui
node_idemui -->|"presents"| node_idemform
node_idemui -->|"presents"| node_idemfeed
node_idemform -->|"submits"| node_idempublish
node_idemfeed -->|"requests"| node_idemget
node_idemget -->|"reads"| node_idemdb
node_idempublish -->|"writes"| node_idemdb
node_idempublish -.->|"publishes"| node_rabbit
node_producer -->|"publishes"| node_rabbit
node_rabbit -->|"delivers"| node_consumer
node_rabbit -.->|"delivers"| node_idemconsumer

click node_webapp "https://github.com/mana2k/codeacademy2026/tree/main/4-Frontend/kaffebar-web/src/app"
click node_orderform "https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/components/OrderForm.tsx"
click node_baristaboard "https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/components/BaristaBoard.tsx"
click node_ordershook "https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/hooks/useOrders.ts"
click node_eventhook "https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/hooks/useEventSource.ts"
click node_ordersbff "https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/app/api/orders/route.ts"
click node_eventsbff "https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/app/api/events/route.ts"
click node_apiclient "https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/lib/api.ts"
click node_orderapi "https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Controllers/OrdersController.cs"
click node_menuroute "https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Program.cs"
click node_repository "https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Storage/InMemoryOrderRepository.cs"
click node_eventpublisher "https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Events/OrderEventPublisher.cs"
click node_autobarista "https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Events/AutoBarista.cs"
click node_idemui "https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/page.tsx"
click node_idemform "https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/components/IdemForm.tsx"
click node_idemfeed "https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/components/IdemsFeed.tsx"
click node_idemget "https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/api/idems/route.ts"
click node_idempublish "https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/api/publish/route.ts"
click node_idemdb "https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/lib/db.ts"
click node_producer "https://github.com/mana2k/codeacademy2026/blob/main/2-EventDriven/dotnet-consumer/Producer/Program.cs"
click node_consumer "https://github.com/mana2k/codeacademy2026/blob/main/2-EventDriven/dotnet-consumer/Consumer/Program.cs"
click node_idemconsumer "https://github.com/mana2k/codeacademy2026/blob/main/2-EventDriven/dotnet-consumer/Infrastructure/Repository/IdemRepository.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_webapp,node_orderform,node_baristaboard,node_ordershook,node_eventhook,node_ordersbff,node_eventsbff,node_apiclient,node_idemuser toneBlue
class node_orderapi,node_menuroute,node_repository,node_eventpublisher,node_autobarista toneAmber
class node_idemui,node_idemform,node_idemfeed,node_idemget,node_idempublish,node_idemdb toneMint
class node_producer,node_consumer,node_idemconsumer toneRose
class node_customer,node_barista,node_rabbit toneIndigo
```

## Components

### Kaffebar web

- [Customer and barista UI](https://github.com/mana2k/codeacademy2026/tree/main/4-Frontend/kaffebar-web/src/app): `4-Frontend/kaffebar-web/src/app`
- [Order form](https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/components/OrderForm.tsx): `4-Frontend/kaffebar-web/src/components/OrderForm.tsx`
- [Barista board](https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/components/BaristaBoard.tsx): `4-Frontend/kaffebar-web/src/components/BaristaBoard.tsx`
- [Order data hook](https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/hooks/useOrders.ts): `4-Frontend/kaffebar-web/src/hooks/useOrders.ts`
- [Live event hook](https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/hooks/useEventSource.ts): `4-Frontend/kaffebar-web/src/hooks/useEventSource.ts`
- [Orders BFF](https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/app/api/orders/route.ts): `4-Frontend/kaffebar-web/src/app/api/orders/route.ts`
- [Events BFF](https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/app/api/events/route.ts): `4-Frontend/kaffebar-web/src/app/api/events/route.ts`
- [API client](https://github.com/mana2k/codeacademy2026/blob/main/4-Frontend/kaffebar-web/src/lib/api.ts): `4-Frontend/kaffebar-web/src/lib/api.ts`

### Kaffebar API

- [Order endpoints](https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Controllers/OrdersController.cs): `3-APIs/kaffebar-dotnet-solution/Kaffebar/Controllers/OrdersController.cs`
- [Menu and health](https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Program.cs): `3-APIs/kaffebar-dotnet-solution/Kaffebar/Program.cs`
- [Order repository](https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Storage/InMemoryOrderRepository.cs): `3-APIs/kaffebar-dotnet-solution/Kaffebar/Storage/InMemoryOrderRepository.cs`
- [Order event publisher](https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Events/OrderEventPublisher.cs): `3-APIs/kaffebar-dotnet-solution/Kaffebar/Events/OrderEventPublisher.cs`
- [Auto barista](https://github.com/mana2k/codeacademy2026/blob/main/3-APIs/kaffebar-dotnet-solution/Kaffebar/Events/AutoBarista.cs): `3-APIs/kaffebar-dotnet-solution/Kaffebar/Events/AutoBarista.cs`

### Idempotweet

- [Idem web UI](https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/page.tsx): `1-DevOps/idempotweet/src/app/page.tsx`
- [Publish form](https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/components/IdemForm.tsx): `1-DevOps/idempotweet/src/app/components/IdemForm.tsx`
- [Idem feed](https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/components/IdemsFeed.tsx): `1-DevOps/idempotweet/src/app/components/IdemsFeed.tsx`
- [List Idems](https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/api/idems/route.ts): `1-DevOps/idempotweet/src/app/api/idems/route.ts`
- [Publish Idem](https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/app/api/publish/route.ts): `1-DevOps/idempotweet/src/app/api/publish/route.ts`
- [Idem database](https://github.com/mana2k/codeacademy2026/blob/main/1-DevOps/idempotweet/src/lib/db.ts): `1-DevOps/idempotweet/src/lib/db.ts`

### Messaging examples

- [Sample producer](https://github.com/mana2k/codeacademy2026/blob/main/2-EventDriven/dotnet-consumer/Producer/Program.cs): `2-EventDriven/dotnet-consumer/Producer/Program.cs`
- [Sample consumer](https://github.com/mana2k/codeacademy2026/blob/main/2-EventDriven/dotnet-consumer/Consumer/Program.cs): `2-EventDriven/dotnet-consumer/Consumer/Program.cs`
- [Idem database consumer](https://github.com/mana2k/codeacademy2026/blob/main/2-EventDriven/dotnet-consumer/Infrastructure/Repository/IdemRepository.cs): `2-EventDriven/dotnet-consumer/Infrastructure/Repository/IdemRepository.cs`

### Other components

- **Customer**
- **Barista**
- **RabbitMQ**
- **Idem user**

## Connections

- Customer → Customer and barista UI: uses
- Barista → Customer and barista UI: uses
- Customer and barista UI → Order form: presents
- Customer and barista UI → Barista board: presents
- Order form → Order data hook: submits
- Barista board → Order data hook: updates
- Order data hook → Orders BFF: requests
- Orders BFF → API client: calls
- API client → Order endpoints: calls
- Order endpoints → Order repository: reads and writes
- Order endpoints → Order event publisher: publishes
- Order event publisher → RabbitMQ: publishes
- Auto barista → RabbitMQ: subscribes
- Live event hook → Events BFF: subscribes
- Events BFF → RabbitMQ: subscribes
- Idem user → Idem web UI: uses
- Idem web UI → Publish form: presents
- Idem web UI → Idem feed: presents
- Publish form → Publish Idem: submits
- Idem feed → List Idems: requests
- List Idems → Idem database: reads
- Publish Idem → Idem database: writes
- Publish Idem → RabbitMQ: publishes
- Sample producer → RabbitMQ: publishes
- RabbitMQ → Sample consumer: delivers
- RabbitMQ → Idem database consumer: delivers
