# idhldeveloper/idhldevelopertest architecture

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

- Interactive diagram: https://gitdiagram.com/idhldeveloper/idhldevelopertest
- Repository: https://github.com/idhldeveloper/idhldevelopertest

## Overview

#### Purpose and runtime
A .NET 10 Blazor Server/Web App coding exercise that presents Disney character data from the Disney Characters API. The application is server-hosted, with interactive Razor components rendering character listing, search, pagination, and intended character-detail navigation.

Core startup is `IDHLDeveloperTest/Program.cs`; project dependencies and target framework are defined in `IDHLDeveloperTest/IDHLDeveloperTest.csproj`.

#### Application composition and routing
The root UI shell is assembled through `IDHLDeveloperTest/App.razor`, which hosts routing via `IDHLDeveloperTest/Routes.razor`. Shared page chrome belongs in `IDHLDeveloperTest/Components/MainLayout.razor`.

Primary routes are expected to resolve to:
- Character-list landing page: `IDHLDeveloperTest/Pages/Index.razor`
- Fallback route: `IDHLDeveloperTest/Pages/NotFound.razor`

The current tree has no dedicated character-details page, despite the requirement to navigate from a character name and show films, TV shows, and video games; that is a missing architectural endpoint.

#### UI stages
`IDHLDeveloperTest/Pages/Index.razor` should own page-level list state: current page, search term, loading/error state, and selected navigation context. It delegates tabular rendering to `IDHLDeveloperTest/Components/CharactersTable.razor`.

The table component is the presentation boundary for ID, name link, image, and pagination/search controls or their callbacks. It should not directly own API transport concerns; it consumes character data and reports user intent upward.

Static styling and image-related browser assets are served from `IDHLDeveloperTest/wwwroot/css/site.css` and `IDHLDeveloperTest/wwwroot/image`.

#### External API boundary
`IDHLDeveloperTest/Services/IClientService.cs` defines the application-facing contract for Disney API access, while `IDHLDeveloperTest/Services/ClientService.cs` implements HTTP communication with the external Disney Characters API (`https://disneyapi.dev/docs`).

`Program.cs` is the dependency-injection and HTTP-client registration boundary. Components should depend on `IClientService`, keeping external endpoint details, response handling, and query construction isolated in `ClientService`.

#### Data model boundary
API payloads are represented by:
- `IDHLDeveloperTest/Models/Character.cs`: an individual Disney character, including identifier, name, image URL, and media lists.
- `IDHLDeveloperTest/Models/CharacterList.cs`: the paged/list response wrapper.

The expected flow is Disney API response → `ClientService` deserialization → `CharacterList`/`Character` models → `Index` state → `CharactersTable` rendering. Pagination metadata and name filtering should travel through the service contract rather than requiring the UI to fetch and filter an unbounded dataset.

#### Character navigation flow
A name rendered by `Components/CharactersTable.razor` should link using the character ID supplied by `Models/Character.cs`. The router in `Routes.razor` should dispatch that URL to a dedicated page, which obtains the selected character through `IClientService` and renders its films, TV shows, and video games.

This separates list-query state from single-character detail retrieval and makes direct URLs/bookmarks viable.

#### Infrastructure and operational concerns
Configuration is available in `IDHLDeveloperTest/appsettings.json` and `IDHLDeveloperTest/appsettings.Development.json`; API base URLs or related client settings belong there rather than in components. Development launch behavior is defined by `IDHLDeveloperTest/Properties/launchSettings.json`.

There is no persistence layer, authentication system, background worker, or separate frontend deployment indicated by the repository. The material external dependency is the Disney API, so API failures, missing images, and empty media arrays are the primary integration failure boundaries.

Main entry points: [`IDHLDeveloperTest/Routes.razor`](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Routes.razor) (Router), [`IDHLDeveloperTest/Program.cs`](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Program.cs) (Program startup), [`IDHLDeveloperTest/Services/ClientService.cs`](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Services/ClientService.cs) (Disney API client), [`IDHLDeveloperTest/Pages/Index.razor`](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Pages/Index.razor) (Character list page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Server Host"]
  node_program["Program startup<br/>.NET bootstrap<br/>[Program.cs]"]
  node_project["Project definition<br/>MSBuild project"]
  node_settings["API configuration<br/>app settings<br/>[appsettings.json]"]
end

subgraph group_ui["Razor UI"]
  node_app["App shell<br/>Razor root<br/>[App.razor]"]
  node_routes["Router<br/>Razor routing<br/>[Routes.razor]"]
  node_layout["Main layout<br/>Razor layout<br/>[MainLayout.razor]"]
  node_index["Character list page<br/>Razor page<br/>[Index.razor]"]
  node_table["Characters table<br/>Razor component"]
  node_detail["Character detail page<br/>missing Razor page"]
  node_notfound["Not found page<br/>Razor page<br/>[NotFound.razor]"]
  node_assets["Browser assets<br/>static assets<br/>[site.css]"]
end

subgraph group_data["API Access &amp; Models"]
  node_contract["Character API contract<br/>service interface<br/>[IClientService.cs]"]
  node_client["Disney API client<br/>HTTP service<br/>[ClientService.cs]"]
  node_characterlist["Paged character result<br/>response model<br/>[CharacterList.cs]"]
  node_character["Character<br/>domain model<br/>[Character.cs]"]
end

node_disneyapi{{"Disney Characters API<br/>external API"}}

node_project -->|"builds"| node_program
node_settings -->|"configures"| node_program
node_program -->|"hosts"| node_app
node_program -->|"registers HTTP client"| node_client
node_program -->|"registers DI"| node_contract
node_app -->|"hosts"| node_routes
node_routes -->|"applies"| node_layout
node_routes -->|"list route"| node_index
node_routes -.->|"detail route"| node_detail
node_routes -->|"fallback"| node_notfound
node_index -->|"supplies list state"| node_table
node_table -->|"search, page, name intent"| node_index
node_table -.->|"character ID link"| node_detail
node_index -->|"queries page and filter"| node_contract
node_detail -.->|"gets character by ID"| node_contract
node_contract -->|"implemented by"| node_client
node_client -->|"HTTP requests"| node_disneyapi
node_client -->|"deserializes list"| node_characterlist
node_client -->|"deserializes detail"| node_character
node_characterlist -->|"contains"| node_character
node_assets -->|"styles UI"| node_layout

click node_program "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Program.cs"
click node_project "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/IDHLDeveloperTest.csproj"
click node_settings "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/appsettings.json"
click node_app "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/App.razor"
click node_routes "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Routes.razor"
click node_layout "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Components/MainLayout.razor"
click node_index "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Pages/Index.razor"
click node_table "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Components/CharactersTable.razor"
click node_notfound "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Pages/NotFound.razor"
click node_assets "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/wwwroot/css/site.css"
click node_contract "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Services/IClientService.cs"
click node_client "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Services/ClientService.cs"
click node_characterlist "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Models/CharacterList.cs"
click node_character "https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Models/Character.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_program,node_project,node_settings toneBlue
class node_app,node_routes,node_layout,node_index,node_table,node_detail,node_notfound,node_assets toneAmber
class node_contract,node_client,node_characterlist,node_character toneMint
class node_disneyapi toneNeutral
```

## Components

### Server Host

- [Program startup](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Program.cs): .NET bootstrap · Registers routing, HTTP client, and application services. · `IDHLDeveloperTest/Program.cs`
- [Project definition](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/IDHLDeveloperTest.csproj): MSBuild project · `IDHLDeveloperTest/IDHLDeveloperTest.csproj`
- [API configuration](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/appsettings.json): app settings · Holds API base URL or client settings. · `IDHLDeveloperTest/appsettings.json`

### Razor UI

- [App shell](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/App.razor): Razor root · `IDHLDeveloperTest/App.razor`
- [Router](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Routes.razor): Razor routing · Dispatches list, fallback, and intended detail URLs. · `IDHLDeveloperTest/Routes.razor`
- [Main layout](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Components/MainLayout.razor): Razor layout · `IDHLDeveloperTest/Components/MainLayout.razor`
- [Character list page](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Pages/Index.razor): Razor page · Owns query, pagination, loading, error, and navigation state. · `IDHLDeveloperTest/Pages/Index.razor`
- [Characters table](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Components/CharactersTable.razor): Razor component · Renders rows and reports search, paging, and name-link intent. · `IDHLDeveloperTest/Components/CharactersTable.razor`
- **Character detail page**: missing Razor page · Required endpoint for direct ID navigation and media rendering.
- [Not found page](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Pages/NotFound.razor): Razor page · `IDHLDeveloperTest/Pages/NotFound.razor`
- [Browser assets](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/wwwroot/css/site.css): static assets · `IDHLDeveloperTest/wwwroot/css/site.css`

### API Access & Models

- [Character API contract](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Services/IClientService.cs): service interface · `IDHLDeveloperTest/Services/IClientService.cs`
- [Disney API client](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Services/ClientService.cs): HTTP service · Builds queries and deserializes Disney API responses. · `IDHLDeveloperTest/Services/ClientService.cs`
- [Paged character result](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Models/CharacterList.cs): response model · Carries characters and pagination metadata. · `IDHLDeveloperTest/Models/CharacterList.cs`
- [Character](https://github.com/idhldeveloper/idhldevelopertest/blob/master/IDHLDeveloperTest/Models/Character.cs): domain model · Contains ID, name, image URL, and media lists. · `IDHLDeveloperTest/Models/Character.cs`

### Other components

- **Disney Characters API**: external API · Remote character search, paging, and detail source.

## Connections

- Project definition → Program startup: builds
- API configuration → Program startup: configures
- Program startup → App shell: hosts
- Program startup → Disney API client: registers HTTP client
- Program startup → Character API contract: registers DI
- App shell → Router: hosts
- Router → Main layout: applies
- Router → Character list page: list route
- Router → Character detail page: detail route
- Router → Not found page: fallback
- Character list page → Characters table: supplies list state
- Characters table → Character list page: search, page, name intent
- Characters table → Character detail page: character ID link
- Character list page → Character API contract: queries page and filter
- Character detail page → Character API contract: gets character by ID
- Character API contract → Disney API client: implemented by
- Disney API client → Disney Characters API: HTTP requests
- Disney API client → Paged character result: deserializes list
- Disney API client → Character: deserializes detail
- Paged character result → Character: contains
- Browser assets → Main layout: styles UI
