# thumesan/fs-engineer-test architecture

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

- Interactive diagram: https://gitdiagram.com/thumesan/fs-engineer-test
- Repository: https://github.com/thumesan/fs-engineer-test

## Overview

This is a full-stack Angular and .NET demo for browsing Chuck Norris jokes and Star Wars people, with combined query search. Users enter through the Angular app, navigate to results, and the generated API clients expose endpoints backed by .NET controllers and repository interfaces. The backend search controller explicitly queries both repositories and combines their responses. The README documents the Chuck and SWAPI endpoints and hosted deployment; result-component calls and repository-to-external-service details are not shown in the excerpts, so those links are marked unverified or omitted.

Main entry points: [`FS-Engineer-Test-FE/src/app/api/services`](https://github.com/thumesan/fs-engineer-test/tree/main/FS-Engineer-Test-FE/src/app/api/services) (Generated API clients), [`FS_Engineer_Test/FS_Engineer_Test/Controllers/SearchController.cs`](https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Controllers/SearchController.cs) (Combined search), [`FS-Engineer-Test-FE/src/app/main/main.component.ts`](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/main/main.component.ts) (Main page), [`FS-Engineer-Test-FE/src/app/results/results-main/results-main.component.ts`](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/results/results-main/results-main.component.ts) (Results view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Angular application"]
  node_main["Main page<br/>[main.component.ts]"]
  node_cards["Display cards<br/>[card.component.ts]"]
  node_results["Results view"]
  node_results_widgets["Result widgets"]
  node_router["App routing"]
end

subgraph group_client["API client"]
  node_api_clients["Generated API clients"]
  node_api_config["API configuration"]
  node_request_builder["Request construction<br/>[request-builder.ts]"]
  node_http_response["HTTP response wrapper"]
end

subgraph group_backend[".NET API"]
  node_chuck_controller["Chuck endpoints<br/>[ChuckController.cs]"]
  node_swapi_controller["SWAPI endpoints<br/>[SwapiController.cs]"]
  node_search_controller["Combined search"]
  node_chuck_repo["Chuck repository<br/>[ChuckRepo.cs]"]
  node_swapi_repo["SWAPI repository<br/>[SwapiRepo.cs]"]
end

subgraph group_domain["Domain contracts"]
  node_chuck_contract["Chuck contracts"]
  node_swapi_contract["SWAPI contracts"]
  node_search_contract["Search contracts<br/>[SearchResponse.cs]"]
end

node_user(("User"))
node_chuck_service{{"Chuck API"}}
node_swapi_service{{"SWAPI API"}}

node_user -->|"opens app"| node_main
node_main -.->|"displays cards"| node_cards
node_main -.->|"navigates"| node_router
node_router -->|"loads results"| node_results
node_results -.->|"uses views"| node_results_widgets
node_results -.->|"requests results"| node_api_clients
node_api_clients -->|"reads base URL"| node_api_config
node_api_clients -->|"builds requests"| node_request_builder
node_api_clients -->|"wraps responses"| node_http_response
node_api_clients -->|"calls HTTP endpoint"| node_chuck_controller
node_api_clients -->|"calls HTTP endpoint"| node_swapi_controller
node_api_clients -->|"calls HTTP endpoint"| node_search_controller
node_chuck_controller -->|"dispatches to"| node_chuck_repo
node_swapi_controller -->|"dispatches to"| node_swapi_repo
node_search_controller -->|"searches jokes"| node_chuck_repo
node_search_controller -->|"searches people"| node_swapi_repo
node_search_controller -->|"returns combined result"| node_search_contract
node_chuck_repo -.->|"fetches jokes"| node_chuck_service
node_swapi_repo -.->|"fetches people"| node_swapi_service
node_chuck_controller -->|"returns Chuck data"| node_chuck_contract
node_swapi_controller -->|"returns people data"| node_swapi_contract

click node_main "https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/main/main.component.ts"
click node_cards "https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/card/card.component.ts"
click node_results "https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/results/results-main/results-main.component.ts"
click node_results_widgets "https://github.com/thumesan/fs-engineer-test/tree/main/FS-Engineer-Test-FE/src/app/results"
click node_router "https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/app-routing.module.ts"
click node_api_clients "https://github.com/thumesan/fs-engineer-test/tree/main/FS-Engineer-Test-FE/src/app/api/services"
click node_api_config "https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/api/api-configuration.ts"
click node_request_builder "https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/api/request-builder.ts"
click node_http_response "https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/api/strict-http-response.ts"
click node_chuck_controller "https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Controllers/ChuckController.cs"
click node_swapi_controller "https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Controllers/SwapiController.cs"
click node_search_controller "https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Controllers/SearchController.cs"
click node_chuck_repo "https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Repo/ChuckRepo.cs"
click node_swapi_repo "https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Repo/SwapiRepo.cs"
click node_chuck_contract "https://github.com/thumesan/fs-engineer-test/tree/main/FS_Engineer_Test/FS_Engineer_Test/Models"
click node_swapi_contract "https://github.com/thumesan/fs-engineer-test/tree/main/FS_Engineer_Test/FS_Engineer_Test/Models"
click node_search_contract "https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Models/SearchResponse.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_main,node_cards,node_results,node_results_widgets,node_router,node_user toneBlue
class node_api_clients,node_api_config,node_request_builder,node_http_response toneAmber
class node_chuck_controller,node_swapi_controller,node_search_controller,node_chuck_repo,node_swapi_repo,node_chuck_service,node_swapi_service toneMint
class node_chuck_contract,node_swapi_contract,node_search_contract toneRose
```

## Components

### Angular application

- [Main page](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/main/main.component.ts): `FS-Engineer-Test-FE/src/app/main/main.component.ts`
- [Display cards](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/card/card.component.ts): `FS-Engineer-Test-FE/src/app/card/card.component.ts`
- [Results view](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/results/results-main/results-main.component.ts): `FS-Engineer-Test-FE/src/app/results/results-main/results-main.component.ts`
- [Result widgets](https://github.com/thumesan/fs-engineer-test/tree/main/FS-Engineer-Test-FE/src/app/results): `FS-Engineer-Test-FE/src/app/results`
- [App routing](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/app-routing.module.ts): `FS-Engineer-Test-FE/src/app/app-routing.module.ts`

### API client

- [Generated API clients](https://github.com/thumesan/fs-engineer-test/tree/main/FS-Engineer-Test-FE/src/app/api/services): `FS-Engineer-Test-FE/src/app/api/services`
- [API configuration](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/api/api-configuration.ts): `FS-Engineer-Test-FE/src/app/api/api-configuration.ts`
- [Request construction](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/api/request-builder.ts): `FS-Engineer-Test-FE/src/app/api/request-builder.ts`
- [HTTP response wrapper](https://github.com/thumesan/fs-engineer-test/blob/main/FS-Engineer-Test-FE/src/app/api/strict-http-response.ts): `FS-Engineer-Test-FE/src/app/api/strict-http-response.ts`

### .NET API

- [Chuck endpoints](https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Controllers/ChuckController.cs): `FS_Engineer_Test/FS_Engineer_Test/Controllers/ChuckController.cs`
- [SWAPI endpoints](https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Controllers/SwapiController.cs): `FS_Engineer_Test/FS_Engineer_Test/Controllers/SwapiController.cs`
- [Combined search](https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Controllers/SearchController.cs): `FS_Engineer_Test/FS_Engineer_Test/Controllers/SearchController.cs`
- [Chuck repository](https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Repo/ChuckRepo.cs): `FS_Engineer_Test/FS_Engineer_Test/Repo/ChuckRepo.cs`
- [SWAPI repository](https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Repo/SwapiRepo.cs): `FS_Engineer_Test/FS_Engineer_Test/Repo/SwapiRepo.cs`

### Domain contracts

- [Chuck contracts](https://github.com/thumesan/fs-engineer-test/tree/main/FS_Engineer_Test/FS_Engineer_Test/Models): `FS_Engineer_Test/FS_Engineer_Test/Models`
- [SWAPI contracts](https://github.com/thumesan/fs-engineer-test/tree/main/FS_Engineer_Test/FS_Engineer_Test/Models): `FS_Engineer_Test/FS_Engineer_Test/Models`
- [Search contracts](https://github.com/thumesan/fs-engineer-test/blob/main/FS_Engineer_Test/FS_Engineer_Test/Models/SearchResponse.cs): `FS_Engineer_Test/FS_Engineer_Test/Models/SearchResponse.cs`

### Other components

- **User**
- **Chuck API**
- **SWAPI API**

## Connections

- User → Main page: opens app
- Main page → Display cards: displays cards
- Main page → App routing: navigates (evidence: `FS-Engineer-Test-FE/src/app/app-routing.module.ts`)
- App routing → Results view: loads results (evidence: `FS-Engineer-Test-FE/src/app/app-routing.module.ts`)
- Results view → Result widgets: uses views (evidence: `FS-Engineer-Test-FE/src/app/results/results.routing.module.ts`)
- Results view → Generated API clients: requests results
- Generated API clients → API configuration: reads base URL (evidence: `FS-Engineer-Test-FE/src/app/api/services/search.service.ts`)
- Generated API clients → Request construction: builds requests (evidence: `FS-Engineer-Test-FE/src/app/api/services/search.service.ts`)
- Generated API clients → HTTP response wrapper: wraps responses (evidence: `FS-Engineer-Test-FE/src/app/api/services/search.service.ts`)
- Generated API clients → Chuck endpoints: calls HTTP endpoint (evidence: `FS-Engineer-Test-FE/src/app/api/services/chuck.service.ts`)
- Generated API clients → SWAPI endpoints: calls HTTP endpoint (evidence: `FS-Engineer-Test-FE/src/app/api/services/swapi.service.ts`)
- Generated API clients → Combined search: calls HTTP endpoint (evidence: `FS-Engineer-Test-FE/src/app/api/services/search.service.ts`)
- Chuck endpoints → Chuck repository: dispatches to (evidence: `FS_Engineer_Test/FS_Engineer_Test/Controllers/ChuckController.cs`)
- SWAPI endpoints → SWAPI repository: dispatches to (evidence: `FS_Engineer_Test/FS_Engineer_Test/Controllers/SwapiController.cs`)
- Combined search → Chuck repository: searches jokes (evidence: `FS_Engineer_Test/FS_Engineer_Test/Controllers/SearchController.cs`)
- Combined search → SWAPI repository: searches people (evidence: `FS_Engineer_Test/FS_Engineer_Test/Controllers/SearchController.cs`)
- Combined search → Search contracts: returns combined result (evidence: `FS_Engineer_Test/FS_Engineer_Test/Controllers/SearchController.cs`)
- Chuck repository → Chuck API: fetches jokes
- SWAPI repository → SWAPI API: fetches people
- Chuck endpoints → Chuck contracts: returns Chuck data (evidence: `FS_Engineer_Test/FS_Engineer_Test/Controllers/ChuckController.cs`)
- SWAPI endpoints → SWAPI contracts: returns people data (evidence: `FS_Engineer_Test/FS_Engineer_Test/Controllers/SwapiController.cs`)
