# akithn/cake-shop-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/akithn/cake-shop-management-system
- Repository: https://github.com/akithn/cake-shop-management-system

## Overview

This is a small PHP-and-static-web cake shop application. Customers can browse cakes, use a client-side cart, register or log in, and look up product details; staff have a separate login and product-management pages. The README also names browsing and ordering, while the tree indicates informational and review pages. Sampled PHP confirms account and product database operations; HTML page wiring and several page behaviors were not sampled, so uncertain links are omitted.

Main entry points: [`db-config.php`](https://github.com/akithn/cake-shop-management-system/blob/main/db-config.php) (Account connection), [`login.php`](https://github.com/akithn/cake-shop-management-system/blob/main/login.php) (Customer login), [`mlogin.php`](https://github.com/akithn/cake-shop-management-system/blob/main/mlogin.php) (Manager login), [`Addtocart.html`](https://github.com/akithn/cake-shop-management-system/blob/main/Addtocart.html) (Cart page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop["Customer shop"]
  node_storefront["Cake browsing<br/>[index.html]"]
  node_cartpage["Cart page<br/>[Addtocart.html]"]
  node_cartlogic["Cart logic<br/>[Addtocart.js]"]
  node_lookup["Product lookup<br/>[search.php]"]
  node_review["Review page<br/>[Review.html]"]
  node_services["Services page<br/>[Servises.html]"]
  node_about["About page<br/>[About.html]"]
end

subgraph group_accounts["Accounts"]
  node_register["Registration<br/>[register.php]"]
  node_customerlogin["Customer login<br/>[login.php]"]
  node_managerlogin["Manager login<br/>[mlogin.php]"]
  node_accountdb["Account connection<br/>[db-config.php]"]
end

subgraph group_catalog["Product management"]
  node_manager["Item management<br/>[ManageItems.html]"]
  node_createitem["Add product<br/>[ManageItems.php]"]
  node_updateitem["Update product<br/>[update.php]"]
  node_deleteitem["Delete product<br/>[delete.php]"]
end

node_customer(("Customer"))
node_productdb[("Product database")]
node_accountdbstore[("Account database")]

node_customer -->|"browses"| node_storefront
node_customer -->|"uses"| node_cartpage
node_customer -->|"looks up"| node_lookup
node_customer -->|"visits"| node_review
node_customer -->|"visits"| node_services
node_customer -->|"visits"| node_about
node_cartpage -->|"runs"| node_cartlogic
node_customerlogin -->|"redirects"| node_cartpage
node_managerlogin -->|"redirects"| node_manager
node_register -->|"includes"| node_accountdb
node_customerlogin -->|"includes"| node_accountdb
node_managerlogin -->|"includes"| node_accountdb
node_accountdb -->|"connects"| node_accountdbstore
node_register -->|"reads/writes"| node_accountdbstore
node_customerlogin -->|"checks"| node_accountdbstore
node_managerlogin -->|"checks"| node_accountdbstore
node_lookup -->|"queries"| node_productdb
node_createitem -->|"inserts"| node_productdb
node_updateitem -->|"updates"| node_productdb
node_deleteitem -->|"deletes"| node_productdb

click node_storefront "https://github.com/akithn/cake-shop-management-system/blob/main/index.html"
click node_cartpage "https://github.com/akithn/cake-shop-management-system/blob/main/Addtocart.html"
click node_cartlogic "https://github.com/akithn/cake-shop-management-system/blob/main/Addtocart.js"
click node_lookup "https://github.com/akithn/cake-shop-management-system/blob/main/search.php"
click node_review "https://github.com/akithn/cake-shop-management-system/blob/main/Review.html"
click node_services "https://github.com/akithn/cake-shop-management-system/blob/main/Servises.html"
click node_about "https://github.com/akithn/cake-shop-management-system/blob/main/About.html"
click node_register "https://github.com/akithn/cake-shop-management-system/blob/main/register.php"
click node_customerlogin "https://github.com/akithn/cake-shop-management-system/blob/main/login.php"
click node_managerlogin "https://github.com/akithn/cake-shop-management-system/blob/main/mlogin.php"
click node_accountdb "https://github.com/akithn/cake-shop-management-system/blob/main/db-config.php"
click node_manager "https://github.com/akithn/cake-shop-management-system/blob/main/ManageItems.html"
click node_createitem "https://github.com/akithn/cake-shop-management-system/blob/main/ManageItems.php"
click node_updateitem "https://github.com/akithn/cake-shop-management-system/blob/main/update.php"
click node_deleteitem "https://github.com/akithn/cake-shop-management-system/blob/main/delete.php"

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_storefront,node_cartpage,node_cartlogic,node_lookup,node_review,node_services,node_about toneBlue
class node_register,node_customerlogin,node_managerlogin,node_accountdb,node_productdb,node_accountdbstore toneAmber
class node_manager,node_createitem,node_updateitem,node_deleteitem toneMint
class node_customer toneIndigo
```

## Components

### Customer shop

- [Cake browsing](https://github.com/akithn/cake-shop-management-system/blob/main/index.html): `index.html`
- [Cart page](https://github.com/akithn/cake-shop-management-system/blob/main/Addtocart.html): `Addtocart.html`
- [Cart logic](https://github.com/akithn/cake-shop-management-system/blob/main/Addtocart.js): `Addtocart.js`
- [Product lookup](https://github.com/akithn/cake-shop-management-system/blob/main/search.php): `search.php`
- [Review page](https://github.com/akithn/cake-shop-management-system/blob/main/Review.html): `Review.html`
- [Services page](https://github.com/akithn/cake-shop-management-system/blob/main/Servises.html): `Servises.html`
- [About page](https://github.com/akithn/cake-shop-management-system/blob/main/About.html): `About.html`

### Accounts

- [Registration](https://github.com/akithn/cake-shop-management-system/blob/main/register.php): `register.php`
- [Customer login](https://github.com/akithn/cake-shop-management-system/blob/main/login.php): `login.php`
- [Manager login](https://github.com/akithn/cake-shop-management-system/blob/main/mlogin.php): `mlogin.php`
- [Account connection](https://github.com/akithn/cake-shop-management-system/blob/main/db-config.php): `db-config.php`

### Product management

- [Item management](https://github.com/akithn/cake-shop-management-system/blob/main/ManageItems.html): `ManageItems.html`
- [Add product](https://github.com/akithn/cake-shop-management-system/blob/main/ManageItems.php): `ManageItems.php`
- [Update product](https://github.com/akithn/cake-shop-management-system/blob/main/update.php): `update.php`
- [Delete product](https://github.com/akithn/cake-shop-management-system/blob/main/delete.php): `delete.php`

### Other components

- **Customer**
- **Product database**
- **Account database**

## Connections

- Customer → Cake browsing: browses
- Customer → Cart page: uses
- Customer → Product lookup: looks up
- Customer → Review page: visits
- Customer → Services page: visits
- Customer → About page: visits
- Cart page → Cart logic: runs
- Customer login → Cart page: redirects
- Manager login → Item management: redirects
- Registration → Account connection: includes
- Customer login → Account connection: includes
- Manager login → Account connection: includes
- Account connection → Account database: connects
- Registration → Account database: reads/writes
- Customer login → Account database: checks
- Manager login → Account database: checks
- Product lookup → Product database: queries
- Add product → Product database: inserts
- Update product → Product database: updates
- Delete product → Product database: deletes
