# starom00n/testwebsite436 architecture

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

- Interactive diagram: https://gitdiagram.com/starom00n/testwebsite436
- Repository: https://github.com/starom00n/testwebsite436

## Overview

This is a PHP webmail application with account registration and sign-in leading to a mailbox where users can view, send, and delete messages. The mailbox also exposes Chat, Document, and Draft sections, but these are placeholder views in the sampled code. The graph follows the visible page-to-handler and database relationships; some helper implementations were read but not excerpted, so their links are limited to relationships established by the source index or mailbox code.

Main entry points: [`mail.php`](https://github.com/starom00n/testwebsite436/blob/main/mail.php) (Mailbox UI), [`signup.php`](https://github.com/starom00n/testwebsite436/blob/main/signup.php) (Registration page), [`config/Database.php`](https://github.com/starom00n/testwebsite436/blob/main/config/Database.php) (Database connector), [`signin.php`](https://github.com/starom00n/testwebsite436/blob/main/signin.php) (Sign-in page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web pages"]
  node_home["Home page<br/>[index.php]"]
  node_utils["Alert rendering<br/>[Utils.php]"]
  node_header["Page header<br/>[header.php]"]
  node_nav["Public navigation<br/>[nav.php]"]
  node_footer["Page footer<br/>[footer.php]"]
end

subgraph group_identity["Account access"]
  node_signup["Registration page<br/>[signup.php]"]
  node_signin["Sign-in page<br/>[signin.php]"]
  node_register["User registration<br/>[UserRegister.php]"]
  node_login["Login logic<br/>[UserLogin.php]"]
end

subgraph group_mail["Mail features"]
  node_mailbox["Mailbox UI<br/>[mail.php]"]
  node_send["Send message<br/>[send_email.php]"]
  node_fetch["Fetch messages<br/>[fetch_message.php]"]
  node_read["Read message"]
  node_delete["Delete message<br/>[delete_mail.php]"]
  node_chat["Chat placeholder<br/>[mail.php]"]
  node_documents["Document placeholder<br/>[mail.php]"]
  node_drafts["Draft placeholder<br/>[mail.php]"]
end

subgraph group_storage["Persistence"]
  node_database["Database connector<br/>[Database.php]"]
  node_sql[("Azure SQL database")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"registers"| node_signup
node_visitor -->|"signs in"| node_signin
node_visitor -->|"opens"| node_mailbox
node_home -->|"includes"| node_header
node_home -->|"includes"| node_nav
node_home -->|"includes"| node_footer
node_signup -->|"calls"| node_register
node_signup -->|"connects through"| node_database
node_register -->|"queries"| node_sql
node_signup -->|"renders alerts"| node_utils
node_signup -->|"includes"| node_header
node_signup -->|"includes"| node_nav
node_signup -->|"includes"| node_footer
node_signin -->|"calls"| node_login
node_signin -->|"connects through"| node_database
node_login -->|"queries"| node_sql
node_signin -->|"renders alerts"| node_utils
node_signin -->|"redirects on success"| node_mailbox
node_mailbox -->|"loads user logic"| node_login
node_mailbox -->|"connects through"| node_database
node_mailbox -->|"requests messages"| node_fetch
node_mailbox -->|"requests message"| node_read
node_mailbox -->|"requests deletion"| node_delete
node_mailbox -->|"posts message"| node_send
node_send -->|"connects through"| node_database
node_fetch -->|"queries"| node_sql
node_fetch -->|"uses connector"| node_database
node_read -->|"queries"| node_sql
node_read -->|"uses connector"| node_database
node_delete -->|"queries"| node_sql
node_delete -->|"uses connector"| node_database
node_database -->|"connects"| node_sql
node_mailbox -->|"shows section"| node_chat
node_mailbox -->|"shows section"| node_documents
node_mailbox -->|"shows section"| node_drafts

click node_home "https://github.com/starom00n/testwebsite436/blob/main/index.php"
click node_signup "https://github.com/starom00n/testwebsite436/blob/main/signup.php"
click node_signin "https://github.com/starom00n/testwebsite436/blob/main/signin.php"
click node_register "https://github.com/starom00n/testwebsite436/blob/main/class/UserRegister.php"
click node_login "https://github.com/starom00n/testwebsite436/blob/main/class/UserLogin.php"
click node_mailbox "https://github.com/starom00n/testwebsite436/blob/main/mail.php"
click node_send "https://github.com/starom00n/testwebsite436/blob/main/asset/send_email.php"
click node_fetch "https://github.com/starom00n/testwebsite436/blob/main/asset/fetch_message.php"
click node_read "https://github.com/starom00n/testwebsite436/blob/main/asset/get_mail_content.php"
click node_delete "https://github.com/starom00n/testwebsite436/blob/main/asset/delete_mail.php"
click node_chat "https://github.com/starom00n/testwebsite436/blob/main/mail.php"
click node_documents "https://github.com/starom00n/testwebsite436/blob/main/mail.php"
click node_drafts "https://github.com/starom00n/testwebsite436/blob/main/mail.php"
click node_database "https://github.com/starom00n/testwebsite436/blob/main/config/Database.php"
click node_utils "https://github.com/starom00n/testwebsite436/blob/main/class/Utils.php"
click node_header "https://github.com/starom00n/testwebsite436/blob/main/asset/header.php"
click node_nav "https://github.com/starom00n/testwebsite436/blob/main/asset/nav.php"
click node_footer "https://github.com/starom00n/testwebsite436/blob/main/asset/footer.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_home,node_utils,node_header,node_nav,node_footer toneBlue
class node_signup,node_signin,node_register,node_login toneAmber
class node_mailbox,node_send,node_fetch,node_read,node_delete,node_chat,node_documents,node_drafts toneMint
class node_database,node_sql toneRose
class node_visitor toneIndigo
```

## Components

### Web pages

- [Home page](https://github.com/starom00n/testwebsite436/blob/main/index.php): `index.php`
- [Alert rendering](https://github.com/starom00n/testwebsite436/blob/main/class/Utils.php): `class/Utils.php`
- [Page header](https://github.com/starom00n/testwebsite436/blob/main/asset/header.php): `asset/header.php`
- [Public navigation](https://github.com/starom00n/testwebsite436/blob/main/asset/nav.php): `asset/nav.php`
- [Page footer](https://github.com/starom00n/testwebsite436/blob/main/asset/footer.php): `asset/footer.php`

### Account access

- [Registration page](https://github.com/starom00n/testwebsite436/blob/main/signup.php): `signup.php`
- [Sign-in page](https://github.com/starom00n/testwebsite436/blob/main/signin.php): `signin.php`
- [User registration](https://github.com/starom00n/testwebsite436/blob/main/class/UserRegister.php): `class/UserRegister.php`
- [Login logic](https://github.com/starom00n/testwebsite436/blob/main/class/UserLogin.php): `class/UserLogin.php`

### Mail features

- [Mailbox UI](https://github.com/starom00n/testwebsite436/blob/main/mail.php): `mail.php`
- [Send message](https://github.com/starom00n/testwebsite436/blob/main/asset/send_email.php): `asset/send_email.php`
- [Fetch messages](https://github.com/starom00n/testwebsite436/blob/main/asset/fetch_message.php): `asset/fetch_message.php`
- [Read message](https://github.com/starom00n/testwebsite436/blob/main/asset/get_mail_content.php): `asset/get_mail_content.php`
- [Delete message](https://github.com/starom00n/testwebsite436/blob/main/asset/delete_mail.php): `asset/delete_mail.php`
- [Chat placeholder](https://github.com/starom00n/testwebsite436/blob/main/mail.php): `mail.php`
- [Document placeholder](https://github.com/starom00n/testwebsite436/blob/main/mail.php): `mail.php`
- [Draft placeholder](https://github.com/starom00n/testwebsite436/blob/main/mail.php): `mail.php`

### Persistence

- [Database connector](https://github.com/starom00n/testwebsite436/blob/main/config/Database.php): `config/Database.php`
- **Azure SQL database**

### Other components

- **Visitor**

## Connections

- Visitor → Home page: opens (evidence: `index.php`)
- Visitor → Registration page: registers (evidence: `signup.php`)
- Visitor → Sign-in page: signs in (evidence: `signin.php`)
- Visitor → Mailbox UI: opens (evidence: `mail.php`)
- Home page → Page header: includes (evidence: `index.php`)
- Home page → Public navigation: includes (evidence: `index.php`)
- Home page → Page footer: includes (evidence: `index.php`)
- Registration page → User registration: calls (evidence: `signup.php`)
- Registration page → Database connector: connects through (evidence: `signup.php`)
- User registration → Azure SQL database: queries (evidence: `class/UserRegister.php`)
- Registration page → Alert rendering: renders alerts (evidence: `signup.php`)
- Registration page → Page header: includes (evidence: `signup.php`)
- Registration page → Public navigation: includes (evidence: `signup.php`)
- Registration page → Page footer: includes (evidence: `signup.php`)
- Sign-in page → Login logic: calls (evidence: `signin.php`)
- Sign-in page → Database connector: connects through (evidence: `signin.php`)
- Login logic → Azure SQL database: queries (evidence: `class/UserLogin.php`)
- Sign-in page → Alert rendering: renders alerts (evidence: `signin.php`)
- Sign-in page → Mailbox UI: redirects on success (evidence: `signin.php`)
- Mailbox UI → Login logic: loads user logic (evidence: `mail.php`)
- Mailbox UI → Database connector: connects through (evidence: `mail.php`)
- Mailbox UI → Fetch messages: requests messages (evidence: `mail.php`)
- Mailbox UI → Read message: requests message (evidence: `mail.php`)
- Mailbox UI → Delete message: requests deletion (evidence: `mail.php`)
- Mailbox UI → Send message: posts message (evidence: `mail.php`)
- Send message → Database connector: connects through (evidence: `asset/send_email.php`)
- Fetch messages → Azure SQL database: queries (evidence: `asset/fetch_message.php`)
- Fetch messages → Database connector: uses connector (evidence: `asset/fetch_message.php`)
- Read message → Azure SQL database: queries (evidence: `asset/get_mail_content.php`)
- Read message → Database connector: uses connector (evidence: `asset/get_mail_content.php`)
- Delete message → Azure SQL database: queries (evidence: `asset/delete_mail.php`)
- Delete message → Database connector: uses connector (evidence: `asset/delete_mail.php`)
- Database connector → Azure SQL database: connects (evidence: `config/Database.php`)
- Mailbox UI → Chat placeholder: shows section (evidence: `mail.php`)
- Mailbox UI → Document placeholder: shows section (evidence: `mail.php`)
- Mailbox UI → Draft placeholder: shows section (evidence: `mail.php`)
