# sarahtariqbutt/carrentalapp architecture

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

- Interactive diagram: https://gitdiagram.com/sarahtariqbutt/carrentalapp
- Repository: https://github.com/sarahtariqbutt/carrentalapp

## Overview

This is a small ASP.NET Core MVC car-rental app. A visitor opens the car listing, submits a booking, and sees the booked-car list; the controller moves cars between in-memory lists. Home and privacy pages are separate MVC actions. No README or persistence implementation was provided, so the graph shows only the evidenced in-memory workflow and MVC routing, not a database or payment system.

Main entry points: [`Program.cs`](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Program.cs) (MVC host and routing), [`Controllers/CarsController.cs`](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Controllers/CarsController.cs) (Car actions and state), [`Controllers/HomeController.cs`](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Controllers/HomeController.cs) (Home and privacy actions), [`Models/Car.cs`](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Models/Car.cs) (Car model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Web runtime"]
  node_host["MVC host and routing<br/>[Program.cs]"]
end

subgraph group_rental["Car rental"]
  node_cars["Car actions and state<br/>[CarsController.cs]"]
  node_car["Car model<br/>[Car.cs]"]
  node_carviews["Listing and booking views"]
end

subgraph group_home["Home pages"]
  node_home["Home and privacy actions<br/>[HomeController.cs]"]
  node_error["Error view model<br/>[ErrorViewModel.cs]"]
end

node_visitor(("Visitor"))

node_visitor -->|"sends requests"| node_host
node_host -->|"routes MVC"| node_cars
node_cars -->|"creates and uses"| node_car
node_cars -->|"returns views"| node_carviews
node_host -->|"routes MVC"| node_home
node_home -->|"creates error model"| node_error

click node_host "https://github.com/sarahtariqbutt/carrentalapp/blob/main/Program.cs"
click node_cars "https://github.com/sarahtariqbutt/carrentalapp/blob/main/Controllers/CarsController.cs"
click node_car "https://github.com/sarahtariqbutt/carrentalapp/blob/main/Models/Car.cs"
click node_carviews "https://github.com/sarahtariqbutt/carrentalapp/tree/main/Views/Cars"
click node_home "https://github.com/sarahtariqbutt/carrentalapp/blob/main/Controllers/HomeController.cs"
click node_error "https://github.com/sarahtariqbutt/carrentalapp/blob/main/Models/ErrorViewModel.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 toneBlue
class node_cars,node_car,node_carviews toneAmber
class node_home,node_error toneMint
class node_visitor toneIndigo
```

## Components

### Web runtime

- [MVC host and routing](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Program.cs): `Program.cs`

### Car rental

- [Car actions and state](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Controllers/CarsController.cs): `Controllers/CarsController.cs`
- [Car model](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Models/Car.cs): `Models/Car.cs`
- [Listing and booking views](https://github.com/sarahtariqbutt/carrentalapp/tree/main/Views/Cars): `Views/Cars`

### Home pages

- [Home and privacy actions](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Controllers/HomeController.cs): `Controllers/HomeController.cs`
- [Error view model](https://github.com/sarahtariqbutt/carrentalapp/blob/main/Models/ErrorViewModel.cs): `Models/ErrorViewModel.cs`

### Other components

- **Visitor**

## Connections

- Visitor → MVC host and routing: sends requests (evidence: `Program.cs`)
- MVC host and routing → Car actions and state: routes MVC (evidence: `Program.cs`)
- Car actions and state → Car model: creates and uses (evidence: `Controllers/CarsController.cs`)
- Car actions and state → Listing and booking views: returns views (evidence: `Controllers/CarsController.cs`)
- MVC host and routing → Home and privacy actions: routes MVC (evidence: `Program.cs`)
- Home and privacy actions → Error view model: creates error model (evidence: `Controllers/HomeController.cs`)
