# 9mirao/finalproject-master architecture

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

- Interactive diagram: https://gitdiagram.com/9mirao/finalproject-master
- Repository: https://github.com/9mirao/finalproject-master

## Overview

This is an ASP.NET Core Minimal API for in-memory user management. Clients list, retrieve, create, update, and delete users; create and update validate user data, and email uniqueness is maintained alongside user records. The app also exposes Swagger UI and redirects the root route there. The runtime wiring is concentrated in Program.cs; the graph reflects the sampled implementation and README, not unsampled internals.

Main entry points: [`Program.cs`](https://github.com/9mirao/finalproject-master/blob/main/Program.cs) (User Routes), [`UserValidationService.cs`](https://github.com/9mirao/finalproject-master/blob/main/UserValidationService.cs) (User Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_routes["User Routes<br/>[Program.cs]"]
  node_list["List Users<br/>[Program.cs]"]
  node_get["Get User<br/>[Program.cs]"]
  node_create["Create User<br/>[Program.cs]"]
  node_update["Update User<br/>[Program.cs]"]
  node_delete["Delete User<br/>[Program.cs]"]
  node_root["Root Redirect<br/>[Program.cs]"]
end

subgraph group_domain["User Rules"]
  node_validation["User Validation"]
  node_user["User Model<br/>[User.cs]"]
end

subgraph group_state["In-Memory State"]
  node_records[("User Records<br/>[Program.cs]")]
  node_emailindex[("Email Index<br/>[Program.cs]")]
end

subgraph group_docs["API Discovery"]
  node_swagger["Swagger UI<br/>[Program.cs]"]
  node_spec["OpenAPI Spec<br/>[Program.cs]"]
end

node_client(("API Client"))

node_client -->|"sends requests"| node_routes
node_routes -->|"dispatches"| node_list
node_routes -->|"dispatches"| node_get
node_routes -->|"dispatches"| node_create
node_routes -->|"dispatches"| node_update
node_routes -->|"dispatches"| node_delete
node_list -->|"reads"| node_records
node_get -->|"reads"| node_records
node_create -->|"validates"| node_validation
node_create -->|"checks and writes"| node_emailindex
node_create -->|"writes"| node_records
node_update -->|"validates"| node_validation
node_update -->|"reads and writes"| node_records
node_update -->|"checks and updates"| node_emailindex
node_delete -->|"removes"| node_records
node_delete -->|"removes"| node_emailindex
node_routes -->|"seeds users"| node_records
node_routes -->|"seeds emails"| node_emailindex
node_routes -->|"serves"| node_swagger
node_swagger -->|"loads"| node_spec
node_client -->|"requests root"| node_root
node_root -->|"redirects to"| node_swagger

click node_routes "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_list "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_get "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_create "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_update "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_delete "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_root "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_validation "https://github.com/9mirao/finalproject-master/blob/main/UserValidationService.cs"
click node_user "https://github.com/9mirao/finalproject-master/blob/main/User.cs"
click node_records "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_emailindex "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_swagger "https://github.com/9mirao/finalproject-master/blob/main/Program.cs"
click node_spec "https://github.com/9mirao/finalproject-master/blob/main/Program.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_routes,node_list,node_get,node_create,node_update,node_delete,node_root,node_client toneBlue
class node_validation,node_user toneAmber
class node_records,node_emailindex toneMint
class node_swagger,node_spec toneRose
```

## Components

### HTTP API

- [User Routes](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`
- [List Users](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`
- [Get User](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`
- [Create User](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`
- [Update User](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`
- [Delete User](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`
- [Root Redirect](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`

### User Rules

- [User Validation](https://github.com/9mirao/finalproject-master/blob/main/UserValidationService.cs): `UserValidationService.cs`
- [User Model](https://github.com/9mirao/finalproject-master/blob/main/User.cs): `User.cs`

### In-Memory State

- [User Records](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`
- [Email Index](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`

### API Discovery

- [Swagger UI](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`
- [OpenAPI Spec](https://github.com/9mirao/finalproject-master/blob/main/Program.cs): `Program.cs`

### Other components

- **API Client**

## Connections

- API Client → User Routes: sends requests
- User Routes → List Users: dispatches
- User Routes → Get User: dispatches
- User Routes → Create User: dispatches
- User Routes → Update User: dispatches
- User Routes → Delete User: dispatches
- List Users → User Records: reads
- Get User → User Records: reads
- Create User → User Validation: validates
- Create User → Email Index: checks and writes
- Create User → User Records: writes
- Update User → User Validation: validates
- Update User → User Records: reads and writes
- Update User → Email Index: checks and updates
- Delete User → User Records: removes
- Delete User → Email Index: removes
- User Routes → User Records: seeds users
- User Routes → Email Index: seeds emails
- User Routes → Swagger UI: serves
- Swagger UI → OpenAPI Spec: loads
- API Client → Root Redirect: requests root
- Root Redirect → Swagger UI: redirects to
