# ranatarekahmed/dawi architecture

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

- Interactive diagram: https://gitdiagram.com/ranatarekahmed/dawi
- Repository: https://github.com/ranatarekahmed/dawi

## Overview

Dawy is an ASP.NET Core MVC platform that mediates surplus-medicine donations through verified pharmacies. Its principal workflow runs from donor submission, pharmacy inspection and catalog publication through beneficiary prescription-backed requests, pickup scheduling, payment and delivery confirmation. Separate account, pharmacy-verification, administration, audit and notification capabilities support that workflow. Edges are based on README statements and SOURCE INDEX references; unsampled controllers are represented by their listed paths, without inferring details beyond documented capabilities.

Main entry points: [`Dawy/Data/DawiContext.cs`](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Data/DawiContext.cs) (EF data context), [`Dawy/Controllers/AccountController.cs`](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/AccountController.cs) (Accounts and login), [`Dawy/Services/NotificationService.cs`](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Services/NotificationService.cs) (Notifications), [`Dawy/Controllers/RequestController.cs`](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/RequestController.cs) (Beneficiary requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Donation workflow"]
  node_donation["Donation submission"]
  node_inspection["Donation inspection"]
  node_catalog["Public catalog"]
  node_products["Product management"]
  node_requests["Beneficiary requests"]
  node_collection["Pickup and delivery"]
  node_payment["Collection payments"]
end

subgraph group_access["Accounts and pharmacies"]
  node_accounts["Accounts and login"]
  node_pharmacies["Pharmacy registration"]
  node_profiles["User profiles"]
end

subgraph group_oversight["Administration and oversight"]
  node_adminops["Platform administration<br/>[AdminController.cs]"]
  node_audit["Audit review<br/>[AuditController.cs]"]
  node_notifications["Notifications"]
end

subgraph group_persistence["Persistence and services"]
  node_context["EF data context<br/>[DawiContext.cs]"]
  node_sql[("SQL Server")]
  node_uploader["Document uploads"]
end

node_donor(("Donor"))
node_beneficiary(("Beneficiary"))
node_pharmacist(("Pharmacist"))
node_admin(("Administrator"))

node_donor -->|"submits donations"| node_donation
node_pharmacist -->|"inspects donations"| node_inspection
node_beneficiary -->|"browses catalog"| node_catalog
node_beneficiary -->|"requests medicine"| node_requests
node_pharmacist -->|"schedules and confirms"| node_collection
node_beneficiary -->|"pays collection fees"| node_payment
node_admin -->|"verifies pharmacies"| node_pharmacies
node_admin -->|"manages platform"| node_adminops
node_admin -->|"reviews audit logs"| node_audit
node_donor -->|"registers or signs in"| node_accounts
node_beneficiary -->|"registers or signs in"| node_accounts
node_pharmacist -->|"registers or signs in"| node_accounts
node_donation -->|"reads and writes"| node_context
node_inspection -->|"reads and writes"| node_context
node_catalog -->|"queries catalog"| node_context
node_products -->|"reads and writes"| node_context
node_requests -->|"reserves stock and saves"| node_context
node_requests -->|"dispatches notices"| node_notifications
node_collection -->|"reads and writes"| node_context
node_collection -->|"dispatches notices"| node_notifications
node_payment -->|"reads and writes"| node_context
node_payment -->|"dispatches notices"| node_notifications
node_accounts -->|"reads and writes"| node_context
node_accounts -->|"uploads documents"| node_uploader
node_pharmacies -->|"reads and writes"| node_context
node_pharmacies -->|"uploads documents"| node_uploader
node_adminops -->|"reads and writes"| node_context
node_adminops -->|"dispatches notices"| node_notifications
node_audit -->|"reads audit records"| node_context
node_notifications -->|"persists notices"| node_context
node_context -->|"maps application data"| node_sql

click node_donation "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/DonationController.cs"
click node_inspection "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/InspectionController.cs"
click node_catalog "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/CategoryController.cs"
click node_products "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/ProductController.cs"
click node_requests "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/RequestController.cs"
click node_collection "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/CollectionController.cs"
click node_payment "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/PaymentController.cs"
click node_accounts "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/AccountController.cs"
click node_pharmacies "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/PharmacyController.cs"
click node_profiles "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/ProfileController.cs"
click node_adminops "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/AdminController.cs"
click node_audit "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/AuditController.cs"
click node_notifications "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Services/NotificationService.cs"
click node_context "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Data/DawiContext.cs"
click node_uploader "https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Services/DocumentUploader.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_donation,node_inspection,node_catalog,node_products,node_requests,node_collection,node_payment toneBlue
class node_accounts,node_pharmacies,node_profiles toneAmber
class node_adminops,node_audit,node_notifications toneMint
class node_context,node_sql,node_uploader toneRose
class node_donor,node_beneficiary,node_pharmacist,node_admin toneIndigo
```

## Components

### Donation workflow

- [Donation submission](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/DonationController.cs): `Dawy/Controllers/DonationController.cs`
- [Donation inspection](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/InspectionController.cs): `Dawy/Controllers/InspectionController.cs`
- [Public catalog](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/CategoryController.cs): `Dawy/Controllers/CategoryController.cs`
- [Product management](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/ProductController.cs): `Dawy/Controllers/ProductController.cs`
- [Beneficiary requests](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/RequestController.cs): `Dawy/Controllers/RequestController.cs`
- [Pickup and delivery](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/CollectionController.cs): `Dawy/Controllers/CollectionController.cs`
- [Collection payments](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/PaymentController.cs): `Dawy/Controllers/PaymentController.cs`

### Accounts and pharmacies

- [Accounts and login](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/AccountController.cs): `Dawy/Controllers/AccountController.cs`
- [Pharmacy registration](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/PharmacyController.cs): `Dawy/Controllers/PharmacyController.cs`
- [User profiles](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/ProfileController.cs): `Dawy/Controllers/ProfileController.cs`

### Administration and oversight

- [Platform administration](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/AdminController.cs): `Dawy/Controllers/AdminController.cs`
- [Audit review](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Controllers/AuditController.cs): `Dawy/Controllers/AuditController.cs`
- [Notifications](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Services/NotificationService.cs): `Dawy/Services/NotificationService.cs`

### Persistence and services

- [EF data context](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Data/DawiContext.cs): `Dawy/Data/DawiContext.cs`
- **SQL Server**
- [Document uploads](https://github.com/ranatarekahmed/dawi/blob/main/Dawy/Services/DocumentUploader.cs): `Dawy/Services/DocumentUploader.cs`

### Other components

- **Donor**
- **Beneficiary**
- **Pharmacist**
- **Administrator**

## Connections

- Donor → Donation submission: submits donations
- Pharmacist → Donation inspection: inspects donations
- Beneficiary → Public catalog: browses catalog
- Beneficiary → Beneficiary requests: requests medicine
- Pharmacist → Pickup and delivery: schedules and confirms
- Beneficiary → Collection payments: pays collection fees
- Administrator → Pharmacy registration: verifies pharmacies
- Administrator → Platform administration: manages platform
- Administrator → Audit review: reviews audit logs
- Donor → Accounts and login: registers or signs in
- Beneficiary → Accounts and login: registers or signs in
- Pharmacist → Accounts and login: registers or signs in
- Donation submission → EF data context: reads and writes (evidence: `Dawy/Controllers/DonationController.cs`)
- Donation inspection → EF data context: reads and writes (evidence: `Dawy/Controllers/InspectionController.cs`)
- Public catalog → EF data context: queries catalog (evidence: `Dawy/Controllers/CategoryController.cs`)
- Product management → EF data context: reads and writes (evidence: `Dawy/Controllers/ProductController.cs`)
- Beneficiary requests → EF data context: reserves stock and saves (evidence: `Dawy/Controllers/RequestController.cs`)
- Beneficiary requests → Notifications: dispatches notices (evidence: `Dawy/Controllers/RequestController.cs`)
- Pickup and delivery → EF data context: reads and writes (evidence: `Dawy/Controllers/CollectionController.cs`)
- Pickup and delivery → Notifications: dispatches notices (evidence: `Dawy/Controllers/CollectionController.cs`)
- Collection payments → EF data context: reads and writes (evidence: `Dawy/Controllers/PaymentController.cs`)
- Collection payments → Notifications: dispatches notices (evidence: `Dawy/Controllers/PaymentController.cs`)
- Accounts and login → EF data context: reads and writes (evidence: `Dawy/Controllers/AccountController.cs`)
- Accounts and login → Document uploads: uploads documents (evidence: `Dawy/Controllers/AccountController.cs`)
- Pharmacy registration → EF data context: reads and writes (evidence: `Dawy/Controllers/PharmacyController.cs`)
- Pharmacy registration → Document uploads: uploads documents (evidence: `Dawy/Controllers/PharmacyController.cs`)
- Platform administration → EF data context: reads and writes (evidence: `Dawy/Controllers/AdminController.cs`)
- Platform administration → Notifications: dispatches notices (evidence: `Dawy/Controllers/AdminController.cs`)
- Audit review → EF data context: reads audit records
- Notifications → EF data context: persists notices (evidence: `Dawy/Services/NotificationService.cs`)
- EF data context → SQL Server: maps application data
