# aarhusuniversitet/webapicase architecture

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

- Interactive diagram: https://gitdiagram.com/aarhusuniversitet/webapicase
- Repository: https://github.com/aarhusuniversitet/webapicase

## Overview

This is a small ASP.NET Core product API. A client requests the products endpoints; the controller queries SQLite and returns product records. Program.cs configures the database connection and maps controller routes. The README says API calls are defined in ProductsController.cs and that IProductManager.cs is not currently used. The graph reflects the shown source; it does not infer write operations or behavior from unsampled files.

Main entry points: [`Controllers/ProductsController.cs`](https://github.com/aarhusuniversitet/webapicase/blob/main/Controllers/ProductsController.cs) (Products controller), [`Program.cs`](https://github.com/aarhusuniversitet/webapicase/blob/main/Program.cs) (Application host), [`app.db`](https://github.com/aarhusuniversitet/webapicase/blob/main/app.db) (SQLite database), [`Product.cs`](https://github.com/aarhusuniversitet/webapicase/blob/main/Product.cs) (Product record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_host["Application host<br/>[Program.cs]"]
  node_controller["Products controller"]
  node_database[("SQLite database<br/>[app.db]")]
end

subgraph group_domain["Product domain"]
  node_product["Product record<br/>[Product.cs]"]
  node_manager["Unused manager contract<br/>[IProductManager.cs]"]
end

node_client(("API client"))

node_client -->|"requests products"| node_controller
node_host -->|"maps routes"| node_controller
node_host -->|"opens and initializes"| node_database
node_controller -->|"queries"| node_database
node_controller -->|"creates records"| node_product
node_manager -->|"uses type"| node_product

click node_host "https://github.com/aarhusuniversitet/webapicase/blob/main/Program.cs"
click node_controller "https://github.com/aarhusuniversitet/webapicase/blob/main/Controllers/ProductsController.cs"
click node_database "https://github.com/aarhusuniversitet/webapicase/blob/main/app.db"
click node_product "https://github.com/aarhusuniversitet/webapicase/blob/main/Product.cs"
click node_manager "https://github.com/aarhusuniversitet/webapicase/blob/main/Logic/IProductManager.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_host,node_controller,node_database,node_client toneBlue
class node_product,node_manager toneAmber
```

## Components

### API runtime

- [Application host](https://github.com/aarhusuniversitet/webapicase/blob/main/Program.cs): `Program.cs`
- [Products controller](https://github.com/aarhusuniversitet/webapicase/blob/main/Controllers/ProductsController.cs): `Controllers/ProductsController.cs`
- [SQLite database](https://github.com/aarhusuniversitet/webapicase/blob/main/app.db): `app.db`

### Product domain

- [Product record](https://github.com/aarhusuniversitet/webapicase/blob/main/Product.cs): `Product.cs`
- [Unused manager contract](https://github.com/aarhusuniversitet/webapicase/blob/main/Logic/IProductManager.cs): `Logic/IProductManager.cs`

### Other components

- **API client**

## Connections

- API client → Products controller: requests products (evidence: `README.md`)
- Application host → Products controller: maps routes (evidence: `Program.cs`)
- Application host → SQLite database: opens and initializes (evidence: `Program.cs`)
- Products controller → SQLite database: queries (evidence: `Controllers/ProductsController.cs`)
- Products controller → Product record: creates records (evidence: `Controllers/ProductsController.cs`)
- Unused manager contract → Product record: uses type (evidence: `Logic/IProductManager.cs`)
