# kutimo/eksamen_emne6 architecture

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

- Interactive diagram: https://gitdiagram.com/kutimo/eksamen_emne6
- Repository: https://github.com/kutimo/eksamen_emne6

## Overview

RandomStrangerStack is a Blazor WebAssembly app for browsing random-user profiles. The main workflow loads a selectable count of profiles from randomuser.me, maps API data into app users, then lets users search/filter results, inspect a profile in a modal, and retry after errors. The graph includes the documented landing, responsive styling, and loading-state capabilities. Source excerpts show the profile page’s service calls and the API mapping; UI composition beyond those excerpts is based on the README, so those links cite it.

Main entry points: [`exam_blazor_wasm/exam_blazor_wasm/Pages/Profiles.razor.cs`](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Pages/Profiles.razor.cs) (Profiles page), [`exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs`](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs) (User API service), [`exam_blazor_wasm/exam_blazor_wasm/App.razor`](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/App.razor) (App shell), [`exam_blazor_wasm/exam_blazor_wasm/Components/UserCard/UserCard.razor`](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/UserCard/UserCard.razor) (User cards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app_shell["App shell<br/>[App.razor]"]
  node_landing["Landing page<br/>[Home.razor]"]
  node_profiles_page["Profiles page<br/>[Profiles.razor.cs]"]
  node_readme_page["Markdown page<br/>[ReadMe.razor]"]
  node_responsive_styles["Responsive styles<br/>[app.css]"]
end

subgraph group_profile_ui["Profile interface"]
  node_profile_controls["Profile controls"]
  node_user_cards["User cards<br/>[UserCard.razor]"]
  node_loading_cards["Loading skeletons"]
  node_details_modal["Profile details modal"]
end

subgraph group_services["Application services"]
  node_user_service["User API service<br/>[UserService.cs]"]
  node_filter_service["User filtering"]
end

subgraph group_data["Profile data"]
  node_api_models["API response DTOs<br/>[ApiResponse.cs]"]
  node_api_details["API detail DTOs<br/>[ApiUserDetails.cs]"]
  node_user_model["User model<br/>[User.cs]"]
  node_result_model["Result state<br/>[Result.cs]"]
end

node_visitor(("Visitor"))
node_randomuser_api["randomuser.me API"]

node_visitor -->|"opens app"| node_app_shell
node_app_shell -->|"presents"| node_landing
node_app_shell -->|"presents"| node_profiles_page
node_visitor -->|"searches profiles"| node_profiles_page
node_profiles_page -->|"loads profiles"| node_user_service
node_profiles_page -->|"filters profiles"| node_filter_service
node_user_service -->|"requests users"| node_randomuser_api
node_user_service -->|"deserializes response"| node_api_models
node_user_service -->|"maps users"| node_user_model
node_user_service -->|"returns outcome"| node_result_model
node_profiles_page -->|"displays results"| node_user_cards
node_profiles_page -->|"offers search controls"| node_profile_controls
node_profiles_page -->|"shows while loading"| node_loading_cards
node_user_cards -->|"opens on click"| node_details_modal
node_profiles_page -->|"shows selected profile"| node_details_modal
node_profiles_page -->|"uses responsive design"| node_responsive_styles
node_visitor -->|"reads markdown"| node_readme_page
node_api_models -.->|"contains detail DTOs"| node_api_details

click node_app_shell "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/App.razor"
click node_landing "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Pages/Home.razor"
click node_profiles_page "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Pages/Profiles.razor.cs"
click node_readme_page "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Pages/ReadMe.razor"
click node_responsive_styles "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/wwwroot/css/app.css"
click node_profile_controls "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/ProfileControls.razor"
click node_user_cards "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/UserCard/UserCard.razor"
click node_loading_cards "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/UserCard/UserCardSkeleton.razor"
click node_details_modal "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/Modal/UserDetailsModal.razor"
click node_user_service "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs"
click node_filter_service "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Services/UserFilterService.cs"
click node_api_models "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Models/ApiResponse.cs"
click node_api_details "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Models/ApiUserDetails.cs"
click node_user_model "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Models/User.cs"
click node_result_model "https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Models/Result.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_app_shell,node_landing,node_profiles_page,node_readme_page,node_responsive_styles,node_randomuser_api toneBlue
class node_profile_controls,node_user_cards,node_loading_cards,node_details_modal toneAmber
class node_user_service,node_filter_service toneMint
class node_api_models,node_api_details,node_user_model,node_result_model toneRose
class node_visitor toneIndigo
```

## Components

### App experience

- [App shell](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/App.razor): `exam_blazor_wasm/exam_blazor_wasm/App.razor`
- [Landing page](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Pages/Home.razor): `exam_blazor_wasm/exam_blazor_wasm/Pages/Home.razor`
- [Profiles page](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Pages/Profiles.razor.cs): `exam_blazor_wasm/exam_blazor_wasm/Pages/Profiles.razor.cs`
- [Markdown page](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Pages/ReadMe.razor): `exam_blazor_wasm/exam_blazor_wasm/Pages/ReadMe.razor`
- [Responsive styles](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/wwwroot/css/app.css): `exam_blazor_wasm/exam_blazor_wasm/wwwroot/css/app.css`

### Profile interface

- [Profile controls](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/ProfileControls.razor): `exam_blazor_wasm/exam_blazor_wasm/Components/ProfileControls.razor`
- [User cards](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/UserCard/UserCard.razor): `exam_blazor_wasm/exam_blazor_wasm/Components/UserCard/UserCard.razor`
- [Loading skeletons](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/UserCard/UserCardSkeleton.razor): `exam_blazor_wasm/exam_blazor_wasm/Components/UserCard/UserCardSkeleton.razor`
- [Profile details modal](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Components/Modal/UserDetailsModal.razor): `exam_blazor_wasm/exam_blazor_wasm/Components/Modal/UserDetailsModal.razor`

### Application services

- [User API service](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs): `exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs`
- [User filtering](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Services/UserFilterService.cs): `exam_blazor_wasm/exam_blazor_wasm/Services/UserFilterService.cs`

### Profile data

- [API response DTOs](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Models/ApiResponse.cs): `exam_blazor_wasm/exam_blazor_wasm/Models/ApiResponse.cs`
- [API detail DTOs](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Models/ApiUserDetails.cs): `exam_blazor_wasm/exam_blazor_wasm/Models/ApiUserDetails.cs`
- [User model](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Models/User.cs): `exam_blazor_wasm/exam_blazor_wasm/Models/User.cs`
- [Result state](https://github.com/kutimo/eksamen_emne6/blob/main/exam_blazor_wasm/exam_blazor_wasm/Models/Result.cs): `exam_blazor_wasm/exam_blazor_wasm/Models/Result.cs`

### Other components

- **Visitor**
- **randomuser.me API**

## Connections

- Visitor → App shell: opens app (evidence: `README.md`)
- App shell → Landing page: presents (evidence: `README.md`)
- App shell → Profiles page: presents (evidence: `README.md`)
- Visitor → Profiles page: searches profiles (evidence: `README.md`)
- Profiles page → User API service: loads profiles (evidence: `exam_blazor_wasm/exam_blazor_wasm/Pages/Profiles.razor.cs`)
- Profiles page → User filtering: filters profiles (evidence: `exam_blazor_wasm/exam_blazor_wasm/Pages/Profiles.razor.cs`)
- User API service → randomuser.me API: requests users (evidence: `exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs`)
- User API service → API response DTOs: deserializes response (evidence: `exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs`)
- User API service → User model: maps users (evidence: `exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs`)
- User API service → Result state: returns outcome (evidence: `exam_blazor_wasm/exam_blazor_wasm/Services/UserService.cs`)
- Profiles page → User cards: displays results (evidence: `README.md`)
- Profiles page → Profile controls: offers search controls (evidence: `README.md`)
- Profiles page → Loading skeletons: shows while loading (evidence: `README.md`)
- User cards → Profile details modal: opens on click (evidence: `README.md`)
- Profiles page → Profile details modal: shows selected profile (evidence: `README.md`)
- Profiles page → Responsive styles: uses responsive design (evidence: `README.md`)
- Visitor → Markdown page: reads markdown (evidence: `README.md`)
- API response DTOs → API detail DTOs: contains detail DTOs
