# tj-eps/userinfo architecture

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

- Interactive diagram: https://gitdiagram.com/tj-eps/userinfo
- Repository: https://github.com/tj-eps/userinfo

## Overview

UserInfo is a small ASP.NET Core application for managing users through a browser-based interface, backed by an in-memory store. The main workflow is browser interaction → user API → store, with CRUD operations over user records. The application also exposes a separate weather-forecast endpoint that generates sample forecasts. Source excerpts show the API and store wiring; the HTML page and project configuration were not sampled, so their detailed behavior is not represented.

Main entry points: [`UserInfo/Controllers/UsersController.cs`](https://github.com/tj-eps/userinfo/blob/main/UserInfo/Controllers/UsersController.cs) (Users API), [`UserInfo/Program.cs`](https://github.com/tj-eps/userinfo/blob/main/UserInfo/Program.cs) (Application host), [`UserInfo/wwwroot/app.js`](https://github.com/tj-eps/userinfo/blob/main/UserInfo/wwwroot/app.js) (User interface), [`UserInfo/Services/InMemoryUserStore.cs`](https://github.com/tj-eps/userinfo/blob/main/UserInfo/Services/InMemoryUserStore.cs) (In-memory store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_web_ui["User interface<br/>[app.js]"]
end

subgraph group_host["ASP.NET host"]
  node_host_app["Application host<br/>[Program.cs]"]
end

subgraph group_users["User management"]
  node_users_api["Users API<br/>[UsersController.cs]"]
  node_user_store[("In-memory store")]
  node_user_model["User record<br/>[User.cs]"]
end

subgraph group_weather["Weather sample"]
  node_weather_api["Forecast API"]
  node_forecast_model["Forecast record<br/>[WeatherForecast.cs]"]
end

node_browser(("Browser"))

node_browser -.->|"uses"| node_web_ui
node_web_ui -->|"calls CRUD"| node_users_api
node_host_app -->|"maps controllers"| node_users_api
node_host_app -->|"maps controllers"| node_weather_api
node_users_api -->|"calls CRUD"| node_user_store
node_user_store -->|"stores records"| node_user_model
node_weather_api -->|"creates forecasts"| node_forecast_model

click node_web_ui "https://github.com/tj-eps/userinfo/blob/main/UserInfo/wwwroot/app.js"
click node_host_app "https://github.com/tj-eps/userinfo/blob/main/UserInfo/Program.cs"
click node_users_api "https://github.com/tj-eps/userinfo/blob/main/UserInfo/Controllers/UsersController.cs"
click node_user_store "https://github.com/tj-eps/userinfo/blob/main/UserInfo/Services/InMemoryUserStore.cs"
click node_user_model "https://github.com/tj-eps/userinfo/blob/main/UserInfo/Models/User.cs"
click node_weather_api "https://github.com/tj-eps/userinfo/blob/main/UserInfo/Controllers/WeatherForecastController.cs"
click node_forecast_model "https://github.com/tj-eps/userinfo/blob/main/UserInfo/WeatherForecast.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_web_ui,node_browser toneBlue
class node_host_app toneAmber
class node_users_api,node_user_store,node_user_model toneMint
class node_weather_api,node_forecast_model toneRose
```

## Components

### Browser client

- [User interface](https://github.com/tj-eps/userinfo/blob/main/UserInfo/wwwroot/app.js): `UserInfo/wwwroot/app.js`

### ASP.NET host

- [Application host](https://github.com/tj-eps/userinfo/blob/main/UserInfo/Program.cs): `UserInfo/Program.cs`

### User management

- [Users API](https://github.com/tj-eps/userinfo/blob/main/UserInfo/Controllers/UsersController.cs): `UserInfo/Controllers/UsersController.cs`
- [In-memory store](https://github.com/tj-eps/userinfo/blob/main/UserInfo/Services/InMemoryUserStore.cs): `UserInfo/Services/InMemoryUserStore.cs`
- [User record](https://github.com/tj-eps/userinfo/blob/main/UserInfo/Models/User.cs): `UserInfo/Models/User.cs`

### Weather sample

- [Forecast API](https://github.com/tj-eps/userinfo/blob/main/UserInfo/Controllers/WeatherForecastController.cs): `UserInfo/Controllers/WeatherForecastController.cs`
- [Forecast record](https://github.com/tj-eps/userinfo/blob/main/UserInfo/WeatherForecast.cs): `UserInfo/WeatherForecast.cs`

### Other components

- **Browser**

## Connections

- Browser → User interface: uses
- User interface → Users API: calls CRUD (evidence: `UserInfo/wwwroot/app.js`)
- Application host → Users API: maps controllers (evidence: `UserInfo/Program.cs`)
- Application host → Forecast API: maps controllers (evidence: `UserInfo/Program.cs`)
- Users API → In-memory store: calls CRUD (evidence: `UserInfo/Controllers/UsersController.cs`)
- In-memory store → User record: stores records (evidence: `UserInfo/Services/InMemoryUserStore.cs`)
- Forecast API → Forecast record: creates forecasts (evidence: `UserInfo/Controllers/WeatherForecastController.cs`)
