# inam003/medishop architecture

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

- Interactive diagram: https://gitdiagram.com/inam003/medishop
- Repository: https://github.com/inam003/medishop

## Overview

MediShop is an ASP.NET Core medicine storefront with customer shopping and ordering, plus administrator catalog, supplier, fulfillment, customer, dashboard, and reporting functions. The main customer flow is browse medicines → manage a cart → place an order → view confirmation and order history; administrators complete and deliver orders, with completion reducing stock. The graph includes the EF Core persistence layer and Identity setup. The README provides only test-user credentials, so features and wiring are inferred from the tree and sampled controllers; unsampled subsystem links are omitted where behavior is uncertain.

Main entry points: [`MediShop/Program.cs`](https://github.com/inam003/medishop/blob/master/MediShop/Program.cs) (Web application), [`MediShop.DataAccess/Data/ApplicationDbContext.cs`](https://github.com/inam003/medishop/blob/master/MediShop.DataAccess/Data/ApplicationDbContext.cs) (EF Core context), [`MediShop/Areas/Admin/Controllers/HomeController.cs`](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/HomeController.cs) (Admin dashboard), [`MediShop/Areas/Customer/Controllers/HomeController.cs`](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Customer/Controllers/HomeController.cs) (Medicine browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer storefront"]
  node_browse["Medicine browsing<br/>[HomeController.cs]"]
  node_cart["Shopping cart<br/>[CartController.cs]"]
  node_checkout["Checkout and orders"]
end

subgraph group_admin["Administration"]
  node_catalog["Medicine catalog"]
  node_suppliers["Supplier management"]
  node_fulfillment["Order fulfillment"]
  node_customer_admin["Customer administration"]
  node_dashboard["Admin dashboard<br/>[HomeController.cs]"]
  node_reports["Sales and stock reports"]
end

subgraph group_identity["Identity"]
  node_identity_pages["Account and login"]
  node_email["Email sender<br/>[EmailSender.cs]"]
end

subgraph group_platform["Application and data"]
  node_app["Web application<br/>[Program.cs]"]
  node_context["EF Core context"]
  node_models["Commerce and user models<br/>[MediShop.Model]"]
end

node_shopper(("Customer"))
node_admin_actor(("Administrator"))
node_database[("SQL database")]
node_email_service["Email service"]

node_shopper -->|"uses"| node_app
node_admin_actor -->|"uses"| node_app
node_app -->|"routes"| node_browse
node_app -->|"routes"| node_cart
node_app -->|"routes"| node_checkout
node_app -->|"routes"| node_catalog
node_app -->|"routes"| node_suppliers
node_app -->|"routes"| node_fulfillment
node_app -->|"routes"| node_customer_admin
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_reports
node_app -->|"maps pages"| node_identity_pages
node_app -->|"registers"| node_context
node_browse -->|"queries"| node_context
node_cart -->|"reads and writes"| node_context
node_checkout -->|"reads and writes"| node_context
node_catalog -->|"reads and writes"| node_context
node_suppliers -->|"reads and writes"| node_context
node_fulfillment -->|"reads and writes"| node_context
node_customer_admin -->|"uses Identity"| node_app
node_dashboard -->|"queries"| node_context
node_dashboard -->|"queries Identity"| node_app
node_reports -->|"queries"| node_context
node_identity_pages -->|"uses Identity"| node_app
node_app -->|"registers sender"| node_email
node_email -.->|"sends email"| node_email_service
node_context -->|"reads and writes"| node_database
node_context -->|"maps entities"| node_models

click node_browse "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Customer/Controllers/HomeController.cs"
click node_cart "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Customer/Controllers/CartController.cs"
click node_checkout "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Customer/Controllers/OrdersController.cs"
click node_catalog "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/MedicinesController.cs"
click node_suppliers "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/SuppliersController.cs"
click node_fulfillment "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/OrdersController.cs"
click node_customer_admin "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/CustomersController.cs"
click node_dashboard "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/HomeController.cs"
click node_reports "https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/ReportsController.cs"
click node_identity_pages "https://github.com/inam003/medishop/tree/master/MediShop/Areas/Identity/Pages"
click node_email "https://github.com/inam003/medishop/blob/master/MediShop.Utility/EmailSender.cs"
click node_app "https://github.com/inam003/medishop/blob/master/MediShop/Program.cs"
click node_context "https://github.com/inam003/medishop/blob/master/MediShop.DataAccess/Data/ApplicationDbContext.cs"
click node_models "https://github.com/inam003/medishop/tree/master/MediShop.Model"

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_browse,node_cart,node_checkout toneBlue
class node_catalog,node_suppliers,node_fulfillment,node_customer_admin,node_dashboard,node_reports,node_database toneAmber
class node_identity_pages,node_email toneMint
class node_app,node_context,node_models toneRose
class node_shopper,node_admin_actor,node_email_service toneIndigo
```

## Components

### Customer storefront

- [Medicine browsing](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Customer/Controllers/HomeController.cs): `MediShop/Areas/Customer/Controllers/HomeController.cs`
- [Shopping cart](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Customer/Controllers/CartController.cs): `MediShop/Areas/Customer/Controllers/CartController.cs`
- [Checkout and orders](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Customer/Controllers/OrdersController.cs): `MediShop/Areas/Customer/Controllers/OrdersController.cs`

### Administration

- [Medicine catalog](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/MedicinesController.cs): `MediShop/Areas/Admin/Controllers/MedicinesController.cs`
- [Supplier management](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/SuppliersController.cs): `MediShop/Areas/Admin/Controllers/SuppliersController.cs`
- [Order fulfillment](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/OrdersController.cs): `MediShop/Areas/Admin/Controllers/OrdersController.cs`
- [Customer administration](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/CustomersController.cs): `MediShop/Areas/Admin/Controllers/CustomersController.cs`
- [Admin dashboard](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/HomeController.cs): `MediShop/Areas/Admin/Controllers/HomeController.cs`
- [Sales and stock reports](https://github.com/inam003/medishop/blob/master/MediShop/Areas/Admin/Controllers/ReportsController.cs): `MediShop/Areas/Admin/Controllers/ReportsController.cs`

### Identity

- [Account and login](https://github.com/inam003/medishop/tree/master/MediShop/Areas/Identity/Pages): `MediShop/Areas/Identity/Pages`
- [Email sender](https://github.com/inam003/medishop/blob/master/MediShop.Utility/EmailSender.cs): `MediShop.Utility/EmailSender.cs`

### Application and data

- [Web application](https://github.com/inam003/medishop/blob/master/MediShop/Program.cs): `MediShop/Program.cs`
- [EF Core context](https://github.com/inam003/medishop/blob/master/MediShop.DataAccess/Data/ApplicationDbContext.cs): `MediShop.DataAccess/Data/ApplicationDbContext.cs`
- [Commerce and user models](https://github.com/inam003/medishop/tree/master/MediShop.Model): `MediShop.Model`

### Other components

- **Customer**
- **Administrator**
- **SQL database**
- **Email service**

## Connections

- Customer → Web application: uses
- Administrator → Web application: uses
- Web application → Medicine browsing: routes
- Web application → Shopping cart: routes
- Web application → Checkout and orders: routes
- Web application → Medicine catalog: routes
- Web application → Supplier management: routes
- Web application → Order fulfillment: routes
- Web application → Customer administration: routes
- Web application → Admin dashboard: routes
- Web application → Sales and stock reports: routes
- Web application → Account and login: maps pages
- Web application → EF Core context: registers
- Medicine browsing → EF Core context: queries
- Shopping cart → EF Core context: reads and writes
- Checkout and orders → EF Core context: reads and writes
- Medicine catalog → EF Core context: reads and writes
- Supplier management → EF Core context: reads and writes
- Order fulfillment → EF Core context: reads and writes
- Customer administration → Web application: uses Identity
- Admin dashboard → EF Core context: queries
- Admin dashboard → Web application: queries Identity
- Sales and stock reports → EF Core context: queries
- Account and login → Web application: uses Identity
- Web application → Email sender: registers sender
- Email sender → Email service: sends email
- EF Core context → SQL database: reads and writes
- EF Core context → Commerce and user models: maps entities
