# thanhhoan0312/shopthucung-main architecture

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

- Interactive diagram: https://gitdiagram.com/thanhhoan0312/shopthucung-main
- Repository: https://github.com/thanhhoan0312/shopthucung-main

## Overview

This is a small Vietnamese pet-shop website. Visitors reach a home page with pet-category navigation and a featured-animal slider; the separate account page offers registration and login, with PHP handling submitted credentials and session feedback. The sampled login handler connects to MySQL and queries the users table. Source excerpts do not establish product browsing, checkout, or catalog persistence. The README provides no capability details, so the map is limited to the visible workflow and its documented code references.

Main entry points: [`html/Login.php`](https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/Login.php) (Account handler), [`html/index.php`](https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/index.php) (Account page), [`html/trangchu.php`](https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/trangchu.php) (Pet home), [`html/connect.php`](https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/connect.php) (DB connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web pages"]
  node_account_page["Account page<br/>[index.php]"]
  node_pet_home["Pet home<br/>[trangchu.php]"]
end

subgraph group_account["Account handling"]
  node_account_handler["Account handler<br/>[Login.php]"]
end

subgraph group_storage["Persistence"]
  node_db_connection["DB connection<br/>[connect.php]"]
  node_mysql[("MySQL")]
end

subgraph group_interaction["Browser interactions"]
  node_account_toggle["Account toggle<br/>[chungnang.js]"]
  node_pet_slider["Pet slider<br/>[slide.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens account"| node_account_page
node_account_page -->|"posts credentials"| node_account_handler
node_account_handler -->|"requires connection"| node_db_connection
node_db_connection -->|"connects to"| node_mysql
node_account_handler -->|"queries users"| node_mysql
node_account_handler -->|"redirects feedback"| node_account_page
node_account_handler -->|"redirects after login"| node_pet_home
node_visitor -->|"opens home"| node_pet_home
node_pet_home -->|"loads slider"| node_pet_slider
node_pet_home -->|"loads account toggle"| node_account_toggle
node_account_page -->|"loads account toggle"| node_account_toggle

click node_account_page "https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/index.php"
click node_pet_home "https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/trangchu.php"
click node_account_handler "https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/Login.php"
click node_db_connection "https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/connect.php"
click node_account_toggle "https://github.com/thanhhoan0312/shopthucung-main/blob/master/JS/chungnang.js"
click node_pet_slider "https://github.com/thanhhoan0312/shopthucung-main/blob/master/JS/slide.js"

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_account_page,node_pet_home toneBlue
class node_account_handler toneAmber
class node_db_connection,node_mysql toneMint
class node_account_toggle,node_pet_slider toneRose
class node_visitor toneIndigo
```

## Components

### Web pages

- [Account page](https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/index.php): `html/index.php`
- [Pet home](https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/trangchu.php): `html/trangchu.php`

### Account handling

- [Account handler](https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/Login.php): `html/Login.php`

### Persistence

- [DB connection](https://github.com/thanhhoan0312/shopthucung-main/blob/master/html/connect.php): `html/connect.php`
- **MySQL**

### Browser interactions

- [Account toggle](https://github.com/thanhhoan0312/shopthucung-main/blob/master/JS/chungnang.js): `JS/chungnang.js`
- [Pet slider](https://github.com/thanhhoan0312/shopthucung-main/blob/master/JS/slide.js): `JS/slide.js`

### Other components

- **Visitor**

## Connections

- Visitor → Account page: opens account (evidence: `html/index.php`)
- Account page → Account handler: posts credentials (evidence: `html/index.php`)
- Account handler → DB connection: requires connection (evidence: `html/Login.php`)
- DB connection → MySQL: connects to (evidence: `html/connect.php`)
- Account handler → MySQL: queries users (evidence: `html/Login.php`)
- Account handler → Account page: redirects feedback (evidence: `html/Login.php`)
- Account handler → Pet home: redirects after login (evidence: `html/Login.php`)
- Visitor → Pet home: opens home
- Pet home → Pet slider: loads slider (evidence: `html/trangchu.php`)
- Pet home → Account toggle: loads account toggle (evidence: `html/trangchu.php`)
- Account page → Account toggle: loads account toggle (evidence: `html/index.php`)
