# nicamaezurbano/c-sharp-project-with-database-connection architecture

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

- Interactive diagram: https://gitdiagram.com/nicamaezurbano/c-sharp-project-with-database-connection
- Repository: https://github.com/nicamaezurbano/c-sharp-project-with-database-connection

## Overview

OnlineShop is a Windows Forms shopping application backed by MySQL, with Crystal Reports used for reporting. The main workflow is account registration or login, browsing the catalog, saving items to a wishlist or cart, checking out into orders, and tracking order status; administrators manage catalog data and fulfillment. Forms issue SQL directly rather than through a separate data-access layer. Several form relationships and capabilities are documented by the source index or README, but their implementation was not sampled, so those links are omitted or marked unverified.

Main entry points: [`onlineshop.sql`](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/onlineshop.sql) (MySQL database), [`OnlineShop/Login.cs`](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Login.cs) (Login), [`OnlineShop/Admin.cs`](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Admin.cs) (Admin dashboard), [`OnlineShop/Customer.cs`](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Customer.cs) (Storefront)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and accounts"]
  node_app["Application startup<br/>[Program.cs]"]
  node_login["Login<br/>[Login.cs]"]
  node_register["Registration<br/>[Register.cs]"]
end

subgraph group_shopping["Customer shopping"]
  node_customer["Storefront<br/>[Customer.cs]"]
  node_cart["Shopping cart<br/>[Cart.cs]"]
  node_wishlist["Wishlist<br/>[Wishlist.cs]"]
  node_checkout["Checkout<br/>[Checkout.cs]"]
  node_placed["Order tracking<br/>[PlacedOrder.cs]"]
end

subgraph group_management["Store management"]
  node_admin["Admin dashboard<br/>[Admin.cs]"]
  node_category["Category management<br/>[Category.cs]"]
  node_item["Item management<br/>[Item.cs]"]
  node_orders["Order fulfillment<br/>[Order.cs]"]
  node_reports["Reporting view<br/>[Report.cs]"]
  node_crystal["Crystal report<br/>[CrystalReport1.cs]"]
end

subgraph group_data["Database and reports"]
  node_mysql[("MySQL database<br/>[onlineshop.sql]")]
end

node_shopper(("User"))

node_shopper -->|"starts"| node_app
node_app -->|"opens"| node_login
node_shopper -.->|"signs in"| node_login
node_login -->|"reads user"| node_mysql
node_login -->|"opens admin"| node_admin
node_login -->|"opens store"| node_customer
node_login -->|"opens registration"| node_register
node_register -->|"creates account"| node_mysql
node_customer -->|"reads catalog"| node_mysql
node_customer -->|"saves selections"| node_mysql
node_customer -->|"opens"| node_cart
node_cart -->|"reads and updates"| node_mysql
node_cart -->|"opens checkout"| node_checkout
node_wishlist -->|"reads and updates"| node_mysql
node_wishlist -->|"adds item"| node_cart
node_checkout -->|"creates orders"| node_mysql
node_placed -->|"reads orders"| node_mysql
node_admin -->|"opens"| node_category
node_admin -->|"opens"| node_item
node_admin -->|"opens"| node_orders
node_admin -->|"opens"| node_reports
node_category -->|"manages categories"| node_mysql
node_item -->|"manages items"| node_mysql
node_orders -->|"updates fulfillment"| node_mysql
node_reports -.->|"uses report"| node_crystal

click node_app "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Program.cs"
click node_login "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Login.cs"
click node_register "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Register.cs"
click node_customer "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Customer.cs"
click node_cart "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Cart.cs"
click node_wishlist "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Wishlist.cs"
click node_checkout "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Checkout.cs"
click node_placed "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/PlacedOrder.cs"
click node_admin "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Admin.cs"
click node_category "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Category.cs"
click node_item "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Item.cs"
click node_orders "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Order.cs"
click node_reports "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Report.cs"
click node_crystal "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/CrystalReport1.cs"
click node_mysql "https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/onlineshop.sql"

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_app,node_login,node_register,node_shopper toneBlue
class node_customer,node_cart,node_wishlist,node_checkout,node_placed toneAmber
class node_admin,node_category,node_item,node_orders,node_reports,node_crystal toneMint
class node_mysql toneRose
```

## Components

### Access and accounts

- [Application startup](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Program.cs): `OnlineShop/Program.cs`
- [Login](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Login.cs): `OnlineShop/Login.cs`
- [Registration](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Register.cs): `OnlineShop/Register.cs`

### Customer shopping

- [Storefront](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Customer.cs): `OnlineShop/Customer.cs`
- [Shopping cart](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Cart.cs): `OnlineShop/Cart.cs`
- [Wishlist](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Wishlist.cs): `OnlineShop/Wishlist.cs`
- [Checkout](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Checkout.cs): `OnlineShop/Checkout.cs`
- [Order tracking](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/PlacedOrder.cs): `OnlineShop/PlacedOrder.cs`

### Store management

- [Admin dashboard](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Admin.cs): `OnlineShop/Admin.cs`
- [Category management](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Category.cs): `OnlineShop/Category.cs`
- [Item management](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Item.cs): `OnlineShop/Item.cs`
- [Order fulfillment](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Order.cs): `OnlineShop/Order.cs`
- [Reporting view](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/Report.cs): `OnlineShop/Report.cs`
- [Crystal report](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/OnlineShop/CrystalReport1.cs): `OnlineShop/CrystalReport1.cs`

### Database and reports

- [MySQL database](https://github.com/nicamaezurbano/c-sharp-project-with-database-connection/blob/main/onlineshop.sql): `onlineshop.sql`

### Other components

- **User**

## Connections

- User → Application startup: starts (evidence: `OnlineShop/Program.cs`)
- Application startup → Login: opens (evidence: `OnlineShop/Program.cs`)
- User → Login: signs in
- Login → MySQL database: reads user (evidence: `OnlineShop/Login.cs`)
- Login → Admin dashboard: opens admin (evidence: `OnlineShop/Login.cs`)
- Login → Storefront: opens store (evidence: `OnlineShop/Login.cs`)
- Login → Registration: opens registration (evidence: `OnlineShop/Login.cs`)
- Registration → MySQL database: creates account (evidence: `OnlineShop/Register.cs`)
- Storefront → MySQL database: reads catalog (evidence: `OnlineShop/Customer.cs`)
- Storefront → MySQL database: saves selections (evidence: `OnlineShop/Customer.cs`)
- Storefront → Shopping cart: opens (evidence: `OnlineShop/Customer.cs`)
- Shopping cart → MySQL database: reads and updates (evidence: `OnlineShop/Cart.cs`)
- Shopping cart → Checkout: opens checkout (evidence: `OnlineShop/Cart.cs`)
- Wishlist → MySQL database: reads and updates (evidence: `OnlineShop/Wishlist.cs`)
- Wishlist → Shopping cart: adds item (evidence: `OnlineShop/Wishlist.cs`)
- Checkout → MySQL database: creates orders (evidence: `OnlineShop/Checkout.cs`)
- Order tracking → MySQL database: reads orders (evidence: `OnlineShop/PlacedOrder.cs`)
- Admin dashboard → Category management: opens (evidence: `OnlineShop/Admin.cs`)
- Admin dashboard → Item management: opens (evidence: `OnlineShop/Admin.cs`)
- Admin dashboard → Order fulfillment: opens (evidence: `OnlineShop/Admin.cs`)
- Admin dashboard → Reporting view: opens (evidence: `OnlineShop/Admin.cs`)
- Category management → MySQL database: manages categories (evidence: `OnlineShop/Category.cs`)
- Item management → MySQL database: manages items (evidence: `OnlineShop/Item.cs`)
- Order fulfillment → MySQL database: updates fulfillment (evidence: `OnlineShop/Order.cs`)
- Reporting view → Crystal report: uses report (evidence: `OnlineShop/Report.cs`)
