# ranyyahh/unishare architecture

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

- Interactive diagram: https://gitdiagram.com/ranyyahh/unishare
- Repository: https://github.com/ranyyahh/unishare

## Overview

UniShare is an ASP.NET MVC campus marketplace for renting and lending student items. The clearest evidenced workflow is browsing sample listings and opening item details; listing owners can also create, edit, and delete listings, with uploaded photos stored under Uploads. The tree shows additional account, dashboard, messaging, chat, borrowing, reporting, and administration areas, but their internal wiring is not established by the available excerpts. The graph therefore preserves these capabilities without guessing their calls or data flow; no README was provided.

Main entry points: [`Controllers/MyListingsController.cs`](https://github.com/ranyyahh/unishare/blob/master/Controllers/MyListingsController.cs) (My Listings), [`Models/SampleItemData.cs`](https://github.com/ranyyahh/unishare/blob/master/Models/SampleItemData.cs) (Sample Item Data), [`Controllers/BrowseItemsController.cs`](https://github.com/ranyyahh/unishare/blob/master/Controllers/BrowseItemsController.cs) (Browse Items), [`Controllers/ItemsController.cs`](https://github.com/ranyyahh/unishare/blob/master/Controllers/ItemsController.cs) (Item Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["MVC Entry"]
  node_routes["MVC Routes<br/>[RouteConfig.cs]"]
  node_application["Application Startup<br/>[Global.asax.cs]"]
  node_home["Home<br/>[HomeController.cs]"]
end

subgraph group_marketplace["Marketplace"]
  node_browse["Browse Items"]
  node_items["Item Details<br/>[ItemsController.cs]"]
  node_sampledata["Sample Item Data<br/>[SampleItemData.cs]"]
end

subgraph group_listing["Listing Management"]
  node_mylistings["My Listings"]
end

subgraph group_community["Campus Services"]
  node_account["Accounts"]
  node_dashboard["Dashboard"]
  node_borrowed["Borrowed Items"]
  node_messages["Messages"]
  node_chat["Chatroom"]
  node_admin["Administration<br/>[AdminController.cs]"]
  node_sales["Sales Reports"]
  node_listings["Listings"]
end

subgraph group_models["View Models"]
  node_browsemodel["Browse View Model"]
  node_detailmodel["Item Detail Model"]
  node_createform["Create Listing Model"]
  node_editform["Edit Listing Model"]
  node_createdmodel["Listing Created Model"]
  node_listingmodels["Listing View Models"]
  node_dashboardmodels["Dashboard Models"]
end

node_student(("Student"))

node_application -->|"registers routes"| node_routes
node_student -.->|"requests pages"| node_routes
node_browse -->|"creates model"| node_browsemodel
node_browse -->|"loads item"| node_sampledata
node_items -->|"creates model"| node_browsemodel
node_items -->|"loads item"| node_sampledata
node_sampledata -->|"builds details"| node_detailmodel
node_mylistings -->|"uses form"| node_createform
node_mylistings -->|"uses form"| node_editform
node_mylistings -->|"builds result"| node_createdmodel
node_mylistings -->|"uses models"| node_listingmodels
node_editform -->|"inherits from"| node_createform
node_dashboard -.->|"uses models"| node_dashboardmodels
node_listings -->|"references controller"| node_mylistings

click node_routes "https://github.com/ranyyahh/unishare/blob/master/App_Start/RouteConfig.cs"
click node_application "https://github.com/ranyyahh/unishare/blob/master/Global.asax.cs"
click node_home "https://github.com/ranyyahh/unishare/blob/master/Controllers/HomeController.cs"
click node_browse "https://github.com/ranyyahh/unishare/blob/master/Controllers/BrowseItemsController.cs"
click node_items "https://github.com/ranyyahh/unishare/blob/master/Controllers/ItemsController.cs"
click node_sampledata "https://github.com/ranyyahh/unishare/blob/master/Models/SampleItemData.cs"
click node_browsemodel "https://github.com/ranyyahh/unishare/blob/master/Models/BrowseItemsViewModel.cs"
click node_detailmodel "https://github.com/ranyyahh/unishare/blob/master/Models/ItemDetailsViewModel.cs"
click node_mylistings "https://github.com/ranyyahh/unishare/blob/master/Controllers/MyListingsController.cs"
click node_createform "https://github.com/ranyyahh/unishare/blob/master/Models/CreateListingViewModel.cs"
click node_editform "https://github.com/ranyyahh/unishare/blob/master/Models/EditListingViewModel.cs"
click node_createdmodel "https://github.com/ranyyahh/unishare/blob/master/Models/ListingCreatedViewModel.cs"
click node_listingmodels "https://github.com/ranyyahh/unishare/blob/master/Models/ListingsviewModels.cs"
click node_dashboardmodels "https://github.com/ranyyahh/unishare/blob/master/Models/DashboardViewModels.cs"
click node_account "https://github.com/ranyyahh/unishare/blob/master/Controllers/AccountController.cs"
click node_dashboard "https://github.com/ranyyahh/unishare/blob/master/Controllers/DashboardController.cs"
click node_borrowed "https://github.com/ranyyahh/unishare/blob/master/Controllers/BorrowedItemsController.cs"
click node_messages "https://github.com/ranyyahh/unishare/blob/master/Controllers/MessagesController.cs"
click node_chat "https://github.com/ranyyahh/unishare/blob/master/Controllers/ChatroomController.cs"
click node_admin "https://github.com/ranyyahh/unishare/blob/master/Controllers/AdminController.cs"
click node_sales "https://github.com/ranyyahh/unishare/blob/master/Controllers/SalesReportController.cs"
click node_listings "https://github.com/ranyyahh/unishare/blob/master/Controllers/ListingsController.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_routes,node_application,node_home toneBlue
class node_browse,node_items,node_sampledata toneAmber
class node_mylistings toneMint
class node_account,node_dashboard,node_borrowed,node_messages,node_chat,node_admin,node_sales,node_listings toneRose
class node_browsemodel,node_detailmodel,node_createform,node_editform,node_createdmodel,node_listingmodels,node_dashboardmodels,node_student toneIndigo
```

## Components

### MVC Entry

- [MVC Routes](https://github.com/ranyyahh/unishare/blob/master/App_Start/RouteConfig.cs): `App_Start/RouteConfig.cs`
- [Application Startup](https://github.com/ranyyahh/unishare/blob/master/Global.asax.cs): `Global.asax.cs`
- [Home](https://github.com/ranyyahh/unishare/blob/master/Controllers/HomeController.cs): `Controllers/HomeController.cs`

### Marketplace

- [Browse Items](https://github.com/ranyyahh/unishare/blob/master/Controllers/BrowseItemsController.cs): `Controllers/BrowseItemsController.cs`
- [Item Details](https://github.com/ranyyahh/unishare/blob/master/Controllers/ItemsController.cs): `Controllers/ItemsController.cs`
- [Sample Item Data](https://github.com/ranyyahh/unishare/blob/master/Models/SampleItemData.cs): `Models/SampleItemData.cs`

### Listing Management

- [My Listings](https://github.com/ranyyahh/unishare/blob/master/Controllers/MyListingsController.cs): `Controllers/MyListingsController.cs`

### Campus Services

- [Accounts](https://github.com/ranyyahh/unishare/blob/master/Controllers/AccountController.cs): `Controllers/AccountController.cs`
- [Dashboard](https://github.com/ranyyahh/unishare/blob/master/Controllers/DashboardController.cs): `Controllers/DashboardController.cs`
- [Borrowed Items](https://github.com/ranyyahh/unishare/blob/master/Controllers/BorrowedItemsController.cs): `Controllers/BorrowedItemsController.cs`
- [Messages](https://github.com/ranyyahh/unishare/blob/master/Controllers/MessagesController.cs): `Controllers/MessagesController.cs`
- [Chatroom](https://github.com/ranyyahh/unishare/blob/master/Controllers/ChatroomController.cs): `Controllers/ChatroomController.cs`
- [Administration](https://github.com/ranyyahh/unishare/blob/master/Controllers/AdminController.cs): `Controllers/AdminController.cs`
- [Sales Reports](https://github.com/ranyyahh/unishare/blob/master/Controllers/SalesReportController.cs): `Controllers/SalesReportController.cs`
- [Listings](https://github.com/ranyyahh/unishare/blob/master/Controllers/ListingsController.cs): `Controllers/ListingsController.cs`

### View Models

- [Browse View Model](https://github.com/ranyyahh/unishare/blob/master/Models/BrowseItemsViewModel.cs): `Models/BrowseItemsViewModel.cs`
- [Item Detail Model](https://github.com/ranyyahh/unishare/blob/master/Models/ItemDetailsViewModel.cs): `Models/ItemDetailsViewModel.cs`
- [Create Listing Model](https://github.com/ranyyahh/unishare/blob/master/Models/CreateListingViewModel.cs): `Models/CreateListingViewModel.cs`
- [Edit Listing Model](https://github.com/ranyyahh/unishare/blob/master/Models/EditListingViewModel.cs): `Models/EditListingViewModel.cs`
- [Listing Created Model](https://github.com/ranyyahh/unishare/blob/master/Models/ListingCreatedViewModel.cs): `Models/ListingCreatedViewModel.cs`
- [Listing View Models](https://github.com/ranyyahh/unishare/blob/master/Models/ListingsviewModels.cs): `Models/ListingsviewModels.cs`
- [Dashboard Models](https://github.com/ranyyahh/unishare/blob/master/Models/DashboardViewModels.cs): `Models/DashboardViewModels.cs`

### Other components

- **Student**

## Connections

- Application Startup → MVC Routes: registers routes (evidence: `Global.asax.cs`)
- Student → MVC Routes: requests pages
- Browse Items → Browse View Model: creates model (evidence: `Controllers/BrowseItemsController.cs`)
- Browse Items → Sample Item Data: loads item (evidence: `Controllers/BrowseItemsController.cs`)
- Item Details → Browse View Model: creates model (evidence: `Controllers/ItemsController.cs`)
- Item Details → Sample Item Data: loads item (evidence: `Controllers/ItemsController.cs`)
- Sample Item Data → Item Detail Model: builds details (evidence: `Models/SampleItemData.cs`)
- My Listings → Create Listing Model: uses form (evidence: `Controllers/MyListingsController.cs`)
- My Listings → Edit Listing Model: uses form (evidence: `Controllers/MyListingsController.cs`)
- My Listings → Listing Created Model: builds result (evidence: `Controllers/MyListingsController.cs`)
- My Listings → Listing View Models: uses models (evidence: `Controllers/MyListingsController.cs`)
- Edit Listing Model → Create Listing Model: inherits from (evidence: `Models/EditListingViewModel.cs`)
- Dashboard → Dashboard Models: uses models
- Listings → My Listings: references controller (evidence: `Controllers/ListingsController.cs`)
