# tassosgomes/code-for-coders architecture

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

- Interactive diagram: https://gitdiagram.com/tassosgomes/code-for-coders
- Repository: https://github.com/tassosgomes/code-for-coders

## Overview

Code for Coders is a multi-service learning platform: student and administrator web apps sit in front of dedicated BFFs, alongside identity, learning, media, commerce, notification, and audit APIs. The evident user-facing entry is the SPA-to-BFF path; the sampled student BFF identity client explicitly handles session creation, validation, and revocation against Identity. README confirms the local service and infrastructure set, but sampled source does not establish detailed business workflows among the other APIs, so those are shown as separate capabilities rather than connected in an assumed pipeline.

Main entry points: [`src/bff-student/src/CodeForCoders.BffStudent.Api`](https://github.com/tassosgomes/code-for-coders/tree/main/src/bff-student/src/CodeForCoders.BffStudent.Api) (Student BFF), [`src/bff-admin/src/CodeForCoders.BffAdmin.Api`](https://github.com/tassosgomes/code-for-coders/tree/main/src/bff-admin/src/CodeForCoders.BffAdmin.Api) (Admin BFF), [`src/audit/src/CodeForCoders.Audit.Api`](https://github.com/tassosgomes/code-for-coders/tree/main/src/audit/src/CodeForCoders.Audit.Api) (Audit API), [`src/student-spa`](https://github.com/tassosgomes/code-for-coders/tree/main/src/student-spa) (Student SPA)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontends["Web applications"]
  node_student_spa["Student SPA"]
  node_admin_spa["Admin SPA"]
end

subgraph group_bffs["Backend gateways"]
  node_student_bff["Student BFF"]
  node_admin_bff["Admin BFF"]
  node_student_sessions["Session client"]
  node_admin_proxy["Admin proxy<br/>[ProxyEndpoints.cs]"]
  node_student_proxy["Student proxy<br/>[ProxyEndpoints.cs]"]
end

subgraph group_platform["Platform services"]
  node_identity["Identity API"]
  node_learning["Learning API"]
  node_media["Media API"]
  node_commerce["Commerce API"]
  node_notification["Notification API"]
  node_audit["Audit API"]
end

subgraph group_data["Data and messaging"]
  node_postgres[("PostgreSQL")]
  node_rabbitmq["RabbitMQ"]
  node_valkey[("Valkey")]
end

node_student(("Student"))
node_admin(("Administrator"))

node_student -->|"uses"| node_student_spa
node_admin -->|"uses"| node_admin_spa
node_student_spa -->|"requests"| node_student_bff
node_admin_spa -->|"requests"| node_admin_bff
node_student_bff -->|"dispatches sessions"| node_student_sessions
node_student_sessions -->|"calls session API"| node_identity
node_student_bff -->|"dispatches proxy"| node_student_proxy
node_admin_bff -->|"dispatches proxy"| node_admin_proxy
node_learning -->|"persists"| node_postgres
node_media -->|"persists"| node_postgres
node_commerce -->|"persists"| node_postgres
node_notification -->|"persists"| node_postgres
node_audit -->|"persists"| node_postgres
node_student_bff -->|"sessions"| node_valkey
node_admin_bff -->|"sessions"| node_valkey
node_audit -.->|"consumes events"| node_rabbitmq
node_student_bff -.->|"publishes events"| node_rabbitmq
node_admin_bff -.->|"publishes events"| node_rabbitmq

click node_student_spa "https://github.com/tassosgomes/code-for-coders/tree/main/src/student-spa"
click node_admin_spa "https://github.com/tassosgomes/code-for-coders/tree/main/src/admin-spa/src"
click node_student_bff "https://github.com/tassosgomes/code-for-coders/tree/main/src/bff-student/src/CodeForCoders.BffStudent.Api"
click node_admin_bff "https://github.com/tassosgomes/code-for-coders/tree/main/src/bff-admin/src/CodeForCoders.BffAdmin.Api"
click node_identity "https://github.com/tassosgomes/code-for-coders/tree/main/src/identity/src/CodeForCoders.Identity.Api"
click node_learning "https://github.com/tassosgomes/code-for-coders/tree/main/src/learning/src/CodeForCoders.Learning.Api"
click node_media "https://github.com/tassosgomes/code-for-coders/tree/main/src/media/src/CodeForCoders.Media.Api"
click node_commerce "https://github.com/tassosgomes/code-for-coders/tree/main/src/commerce/src/CodeForCoders.Commerce.Api"
click node_notification "https://github.com/tassosgomes/code-for-coders/tree/main/src/notification/src/CodeForCoders.Notification.Api"
click node_audit "https://github.com/tassosgomes/code-for-coders/tree/main/src/audit/src/CodeForCoders.Audit.Api"
click node_student_sessions "https://github.com/tassosgomes/code-for-coders/blob/main/src/bff-student/src/CodeForCoders.BffStudent.Api/Clients/StudentSessionIdentityClient.cs"
click node_admin_proxy "https://github.com/tassosgomes/code-for-coders/blob/main/src/bff-admin/src/CodeForCoders.BffAdmin.Api/Endpoints/ProxyEndpoints.cs"
click node_student_proxy "https://github.com/tassosgomes/code-for-coders/blob/main/src/bff-student/src/CodeForCoders.BffStudent.Api/Endpoints/ProxyEndpoints.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_student_spa,node_admin_spa toneBlue
class node_student_bff,node_admin_bff,node_student_sessions,node_admin_proxy,node_student_proxy toneAmber
class node_identity,node_learning,node_media,node_commerce,node_notification,node_audit toneMint
class node_postgres,node_rabbitmq,node_valkey toneRose
class node_student,node_admin toneIndigo
```

## Components

### Web applications

- [Student SPA](https://github.com/tassosgomes/code-for-coders/tree/main/src/student-spa): `src/student-spa`
- [Admin SPA](https://github.com/tassosgomes/code-for-coders/tree/main/src/admin-spa/src): `src/admin-spa/src`

### Backend gateways

- [Student BFF](https://github.com/tassosgomes/code-for-coders/tree/main/src/bff-student/src/CodeForCoders.BffStudent.Api): `src/bff-student/src/CodeForCoders.BffStudent.Api`
- [Admin BFF](https://github.com/tassosgomes/code-for-coders/tree/main/src/bff-admin/src/CodeForCoders.BffAdmin.Api): `src/bff-admin/src/CodeForCoders.BffAdmin.Api`
- [Session client](https://github.com/tassosgomes/code-for-coders/blob/main/src/bff-student/src/CodeForCoders.BffStudent.Api/Clients/StudentSessionIdentityClient.cs): `src/bff-student/src/CodeForCoders.BffStudent.Api/Clients/StudentSessionIdentityClient.cs`
- [Admin proxy](https://github.com/tassosgomes/code-for-coders/blob/main/src/bff-admin/src/CodeForCoders.BffAdmin.Api/Endpoints/ProxyEndpoints.cs): `src/bff-admin/src/CodeForCoders.BffAdmin.Api/Endpoints/ProxyEndpoints.cs`
- [Student proxy](https://github.com/tassosgomes/code-for-coders/blob/main/src/bff-student/src/CodeForCoders.BffStudent.Api/Endpoints/ProxyEndpoints.cs): `src/bff-student/src/CodeForCoders.BffStudent.Api/Endpoints/ProxyEndpoints.cs`

### Platform services

- [Identity API](https://github.com/tassosgomes/code-for-coders/tree/main/src/identity/src/CodeForCoders.Identity.Api): `src/identity/src/CodeForCoders.Identity.Api`
- [Learning API](https://github.com/tassosgomes/code-for-coders/tree/main/src/learning/src/CodeForCoders.Learning.Api): `src/learning/src/CodeForCoders.Learning.Api`
- [Media API](https://github.com/tassosgomes/code-for-coders/tree/main/src/media/src/CodeForCoders.Media.Api): `src/media/src/CodeForCoders.Media.Api`
- [Commerce API](https://github.com/tassosgomes/code-for-coders/tree/main/src/commerce/src/CodeForCoders.Commerce.Api): `src/commerce/src/CodeForCoders.Commerce.Api`
- [Notification API](https://github.com/tassosgomes/code-for-coders/tree/main/src/notification/src/CodeForCoders.Notification.Api): `src/notification/src/CodeForCoders.Notification.Api`
- [Audit API](https://github.com/tassosgomes/code-for-coders/tree/main/src/audit/src/CodeForCoders.Audit.Api): `src/audit/src/CodeForCoders.Audit.Api`

### Data and messaging

- **PostgreSQL**
- **RabbitMQ**
- **Valkey**

### Other components

- **Student**
- **Administrator**

## Connections

- Student → Student SPA: uses
- Administrator → Admin SPA: uses
- Student SPA → Student BFF: requests
- Admin SPA → Admin BFF: requests
- Student BFF → Session client: dispatches sessions
- Session client → Identity API: calls session API
- Student BFF → Student proxy: dispatches proxy
- Admin BFF → Admin proxy: dispatches proxy
- Learning API → PostgreSQL: persists
- Media API → PostgreSQL: persists
- Commerce API → PostgreSQL: persists
- Notification API → PostgreSQL: persists
- Audit API → PostgreSQL: persists
- Student BFF → Valkey: sessions
- Admin BFF → Valkey: sessions
- Audit API → RabbitMQ: consumes events
- Student BFF → RabbitMQ: publishes events
- Admin BFF → RabbitMQ: publishes events
