# akocer/internet-1 architecture

> Architecture diagram of the GitHub repository akocer/internet-1, 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/akocer/internet-1
- Repository: https://github.com/akocer/internet-1

## Overview

Internet-1 is an ASP.NET Core MVC sample for browsing and maintaining products. A user reaches the default Home page or product actions; ProductController validates submitted products, delegates CRUD operations to ProductRepository, and returns MVC views. ProductRepository stores records in a static in-memory list, not a database. The graph reflects the sampled controllers, repository, and models; view links follow MVC action/view conventions. The README documents no additional capabilities, and unsampled view and client-side wiring is not inferred.

Main entry points: [`Internet-1/Repositories/ProductRepository.cs`](https://github.com/akocer/internet-1/blob/main/Internet-1/Repositories/ProductRepository.cs) (Product repository), [`Internet-1/Controllers/ProductController.cs`](https://github.com/akocer/internet-1/blob/main/Internet-1/Controllers/ProductController.cs) (Product actions), [`Internet-1/Program.cs`](https://github.com/akocer/internet-1/blob/main/Internet-1/Program.cs) (ASP.NET app), [`Internet-1/Controllers/HomeController.cs`](https://github.com/akocer/internet-1/blob/main/Internet-1/Controllers/HomeController.cs) (Home actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["ASP.NET app<br/>[Program.cs]"]
  node_home["Home actions<br/>[HomeController.cs]"]
  node_error["Error model<br/>[ErrorViewModel.cs]"]
end

subgraph group_catalog["Product catalog"]
  node_products["Product actions"]
  node_product["Product model<br/>[Product.cs]"]
  node_repository["Product repository"]
  node_product_state[("Static product list")]
end

subgraph group_presentation["MVC views"]
  node_home_views["Home views"]
  node_product_views["Product views"]
  node_shared_views["Shared layout"]
end

node_visitor(("Visitor"))

node_visitor -.->|"sends requests"| node_app
node_app -->|"routes default"| node_home
node_app -->|"registers service"| node_repository
node_home -->|"creates model"| node_error
node_home -->|"returns views"| node_home_views
node_products -->|"calls CRUD"| node_repository
node_products -->|"accepts model"| node_product
node_repository -->|"creates records"| node_product
node_repository -->|"reads and writes"| node_product_state
node_products -->|"returns views"| node_product_views

click node_app "https://github.com/akocer/internet-1/blob/main/Internet-1/Program.cs"
click node_home "https://github.com/akocer/internet-1/blob/main/Internet-1/Controllers/HomeController.cs"
click node_error "https://github.com/akocer/internet-1/blob/main/Internet-1/Models/ErrorViewModel.cs"
click node_products "https://github.com/akocer/internet-1/blob/main/Internet-1/Controllers/ProductController.cs"
click node_product "https://github.com/akocer/internet-1/blob/main/Internet-1/Models/Product.cs"
click node_repository "https://github.com/akocer/internet-1/blob/main/Internet-1/Repositories/ProductRepository.cs"
click node_product_state "https://github.com/akocer/internet-1/blob/main/Internet-1/Repositories/ProductRepository.cs"
click node_home_views "https://github.com/akocer/internet-1/tree/main/Internet-1/Views/Home"
click node_product_views "https://github.com/akocer/internet-1/tree/main/Internet-1/Views/Product"
click node_shared_views "https://github.com/akocer/internet-1/tree/main/Internet-1/Views/Shared"

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,node_home,node_error toneBlue
class node_products,node_product,node_repository,node_product_state toneAmber
class node_home_views,node_product_views,node_shared_views toneMint
class node_visitor toneIndigo
```

## Components

### Web application

- [ASP.NET app](https://github.com/akocer/internet-1/blob/main/Internet-1/Program.cs): `Internet-1/Program.cs`
- [Home actions](https://github.com/akocer/internet-1/blob/main/Internet-1/Controllers/HomeController.cs): `Internet-1/Controllers/HomeController.cs`
- [Error model](https://github.com/akocer/internet-1/blob/main/Internet-1/Models/ErrorViewModel.cs): `Internet-1/Models/ErrorViewModel.cs`

### Product catalog

- [Product actions](https://github.com/akocer/internet-1/blob/main/Internet-1/Controllers/ProductController.cs): `Internet-1/Controllers/ProductController.cs`
- [Product model](https://github.com/akocer/internet-1/blob/main/Internet-1/Models/Product.cs): `Internet-1/Models/Product.cs`
- [Product repository](https://github.com/akocer/internet-1/blob/main/Internet-1/Repositories/ProductRepository.cs): `Internet-1/Repositories/ProductRepository.cs`
- [Static product list](https://github.com/akocer/internet-1/blob/main/Internet-1/Repositories/ProductRepository.cs): `Internet-1/Repositories/ProductRepository.cs`

### MVC views

- [Home views](https://github.com/akocer/internet-1/tree/main/Internet-1/Views/Home): `Internet-1/Views/Home`
- [Product views](https://github.com/akocer/internet-1/tree/main/Internet-1/Views/Product): `Internet-1/Views/Product`
- [Shared layout](https://github.com/akocer/internet-1/tree/main/Internet-1/Views/Shared): `Internet-1/Views/Shared`

### Other components

- **Visitor**

## Connections

- Visitor → ASP.NET app: sends requests
- ASP.NET app → Home actions: routes default (evidence: `Internet-1/Program.cs`)
- ASP.NET app → Product repository: registers service (evidence: `Internet-1/Program.cs`)
- Home actions → Error model: creates model (evidence: `Internet-1/Controllers/HomeController.cs`)
- Home actions → Home views: returns views (evidence: `Internet-1/Controllers/HomeController.cs`)
- Product actions → Product repository: calls CRUD (evidence: `Internet-1/Controllers/ProductController.cs`)
- Product actions → Product model: accepts model (evidence: `Internet-1/Controllers/ProductController.cs`)
- Product repository → Product model: creates records (evidence: `Internet-1/Repositories/ProductRepository.cs`)
- Product repository → Static product list: reads and writes (evidence: `Internet-1/Repositories/ProductRepository.cs`)
- Product actions → Product views: returns views (evidence: `Internet-1/Controllers/ProductController.cs`)
