# biancalautaru/emall architecture

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

- Interactive diagram: https://gitdiagram.com/biancalautaru/emall
- Repository: https://github.com/biancalautaru/emall

## Overview

eMall is an ASP.NET MVC online shop. Shoppers browse and search products, then registered users manage a cart, place stock-checked orders, and use wishlists; collaborators submit products for approval, while administrators manage catalog content and users. Reviews and product-specific AI assistance round out the product. The graph follows documented capabilities and source-index references; unsampled controller behavior is represented at controller level, while uncertain links are omitted.

Main entry points: [`eMall/Data/ApplicationDbContext.cs`](https://github.com/biancalautaru/emall/blob/master/eMall/Data/ApplicationDbContext.cs) (EF data context), [`eMall/Controllers/CartsController.cs`](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/CartsController.cs) (Cart & checkout), [`eMall/Services/GoogleProductAssistantService.cs`](https://github.com/biancalautaru/emall/blob/master/eMall/Services/GoogleProductAssistantService.cs) (Mally AI service), [`eMall/Controllers/ProductsController.cs`](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/ProductsController.cs) (Product workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog &amp; Discovery"]
  node_product_ops["Product workflows"]
  node_categories["Category management"]
  node_discovery["Search &amp; filtering"]
end

subgraph group_commerce["Shopping &amp; Orders"]
  node_cart["Cart &amp; checkout<br/>[CartsController.cs]"]
  node_orders["Order history"]
  node_wishlists["Wishlists"]
end

subgraph group_community["Accounts &amp; Reviews"]
  node_accounts["Identity &amp; roles<br/>[Register.cshtml.cs]"]
  node_users["User administration<br/>[UsersController.cs]"]
  node_reviews["Reviews &amp; ratings"]
end

subgraph group_assistant["Product Assistant"]
  node_assistant_ui["Product assistant entry"]
  node_assistant_service["Mally AI service"]
end

subgraph group_persistence["Application Data"]
  node_db_context["EF data context"]
  node_database[("Application database<br/>[app.db]")]
  node_seed_data["Seed data<br/>[SeedData.cs]"]
end

node_shopper(("Shopper"))
node_google_ai{{"Google Generative AI"}}

node_shopper -->|"browses products"| node_product_ops
node_shopper -->|"searches catalog"| node_discovery
node_shopper -->|"manages cart"| node_cart
node_shopper -->|"manages wishlist"| node_wishlists
node_shopper -->|"writes reviews"| node_reviews
node_product_ops -->|"reads and updates"| node_db_context
node_categories -->|"manages categories"| node_db_context
node_discovery -->|"queries catalog"| node_db_context
node_cart -->|"reads and writes"| node_db_context
node_cart -->|"creates order"| node_orders
node_orders -->|"queries orders"| node_db_context
node_wishlists -->|"reads and writes"| node_db_context
node_reviews -->|"reads and writes"| node_db_context
node_accounts -->|"uses identity data"| node_db_context
node_users -.->|"manages users"| node_db_context
node_assistant_ui -->|"asks product questions"| node_assistant_service
node_assistant_service -->|"requests generated answer"| node_google_ai
node_assistant_service -.->|"uses product FAQ"| node_db_context
node_db_context -.->|"persists entities"| node_database
node_seed_data -->|"initializes data"| node_db_context

click node_product_ops "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/ProductsController.cs"
click node_categories "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/CategoriesController.cs"
click node_discovery "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/SearchController.cs"
click node_cart "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/CartsController.cs"
click node_orders "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/OrdersController.cs"
click node_wishlists "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/WishlistsController.cs"
click node_accounts "https://github.com/biancalautaru/emall/blob/master/eMall/Areas/Identity/Pages/Account/Register.cshtml.cs"
click node_users "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/UsersController.cs"
click node_reviews "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/ReviewsController.cs"
click node_assistant_ui "https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/ProductsController.cs"
click node_assistant_service "https://github.com/biancalautaru/emall/blob/master/eMall/Services/GoogleProductAssistantService.cs"
click node_db_context "https://github.com/biancalautaru/emall/blob/master/eMall/Data/ApplicationDbContext.cs"
click node_database "https://github.com/biancalautaru/emall/blob/master/eMall/app.db"
click node_seed_data "https://github.com/biancalautaru/emall/blob/master/eMall/Models/SeedData.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_product_ops,node_categories,node_discovery toneBlue
class node_cart,node_orders,node_wishlists toneAmber
class node_accounts,node_users,node_reviews toneMint
class node_assistant_ui,node_assistant_service toneRose
class node_db_context,node_database,node_seed_data,node_shopper,node_google_ai toneIndigo
```

## Components

### Catalog & Discovery

- [Product workflows](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/ProductsController.cs): `eMall/Controllers/ProductsController.cs`
- [Category management](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/CategoriesController.cs): `eMall/Controllers/CategoriesController.cs`
- [Search & filtering](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/SearchController.cs): `eMall/Controllers/SearchController.cs`

### Shopping & Orders

- [Cart & checkout](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/CartsController.cs): `eMall/Controllers/CartsController.cs`
- [Order history](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/OrdersController.cs): `eMall/Controllers/OrdersController.cs`
- [Wishlists](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/WishlistsController.cs): `eMall/Controllers/WishlistsController.cs`

### Accounts & Reviews

- [Identity & roles](https://github.com/biancalautaru/emall/blob/master/eMall/Areas/Identity/Pages/Account/Register.cshtml.cs): `eMall/Areas/Identity/Pages/Account/Register.cshtml.cs`
- [User administration](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/UsersController.cs): `eMall/Controllers/UsersController.cs`
- [Reviews & ratings](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/ReviewsController.cs): `eMall/Controllers/ReviewsController.cs`

### Product Assistant

- [Product assistant entry](https://github.com/biancalautaru/emall/blob/master/eMall/Controllers/ProductsController.cs): `eMall/Controllers/ProductsController.cs`
- [Mally AI service](https://github.com/biancalautaru/emall/blob/master/eMall/Services/GoogleProductAssistantService.cs): `eMall/Services/GoogleProductAssistantService.cs`

### Application Data

- [EF data context](https://github.com/biancalautaru/emall/blob/master/eMall/Data/ApplicationDbContext.cs): `eMall/Data/ApplicationDbContext.cs`
- [Application database](https://github.com/biancalautaru/emall/blob/master/eMall/app.db): `eMall/app.db`
- [Seed data](https://github.com/biancalautaru/emall/blob/master/eMall/Models/SeedData.cs): `eMall/Models/SeedData.cs`

### Other components

- **Shopper**
- **Google Generative AI**

## Connections

- Shopper → Product workflows: browses products (evidence: `README.md`)
- Shopper → Search & filtering: searches catalog (evidence: `README.md`)
- Shopper → Cart & checkout: manages cart (evidence: `README.md`)
- Shopper → Wishlists: manages wishlist (evidence: `README.md`)
- Shopper → Reviews & ratings: writes reviews (evidence: `README.md`)
- Product workflows → EF data context: reads and updates (evidence: `eMall/Controllers/ProductsController.cs`)
- Category management → EF data context: manages categories (evidence: `eMall/Controllers/CategoriesController.cs`)
- Search & filtering → EF data context: queries catalog (evidence: `eMall/Controllers/SearchController.cs`)
- Cart & checkout → EF data context: reads and writes (evidence: `eMall/Controllers/CartsController.cs`)
- Cart & checkout → Order history: creates order (evidence: `eMall/Controllers/CartsController.cs`)
- Order history → EF data context: queries orders (evidence: `eMall/Controllers/OrdersController.cs`)
- Wishlists → EF data context: reads and writes (evidence: `eMall/Controllers/WishlistsController.cs`)
- Reviews & ratings → EF data context: reads and writes (evidence: `eMall/Controllers/ReviewsController.cs`)
- Identity & roles → EF data context: uses identity data (evidence: `eMall/Areas/Identity/Pages/Account/Register.cshtml.cs`)
- User administration → EF data context: manages users
- Product assistant entry → Mally AI service: asks product questions (evidence: `eMall/Controllers/ProductsController.cs`)
- Mally AI service → Google Generative AI: requests generated answer (evidence: `eMall/Services/GoogleProductAssistantService.cs`)
- Mally AI service → EF data context: uses product FAQ
- EF data context → Application database: persists entities
- Seed data → EF data context: initializes data (evidence: `eMall/Models/SeedData.cs`)
