# clear-sys/phpcrud_bagobo_clear architecture

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

- Interactive diagram: https://gitdiagram.com/clear-sys/phpcrud_bagobo_clear
- Repository: https://github.com/clear-sys/phpcrud_bagobo_clear

## Overview

This is a small PHP student information system: users sign in, reach a session-gated student list, and can add, edit, or delete records. The sampled files show each request handler connecting to MySQL through a shared connection file. The graph also includes logout and the SQL database file; its schema details were not sampled.

Main entry points: [`home.php`](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/home.php) (Student List), [`database.php`](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/database.php) (MySQL Connection), [`SQL database.sql`](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/SQL%20database.sql) (MySQL Database), [`pakicheck.php`](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/pakicheck.php) (Sign-in Check)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_login["Login Form<br/>[index.php]"]
  node_auth["Sign-in Check<br/>[pakicheck.php]"]
  node_logout["Logout<br/>[logout.php]"]
end

subgraph group_students["Student Records"]
  node_home["Student List<br/>[home.php]"]
  node_create["Add Student<br/>[insert.php]"]
  node_update["Edit Student<br/>[update.php]"]
  node_delete["Delete Student<br/>[delete.php]"]
end

subgraph group_persistence["Persistence"]
  node_connection["MySQL Connection<br/>[database.php]"]
  node_database[("MySQL Database<br/>[SQL database.sql]")]
end

node_user(("User"))

node_user -->|"opens"| node_login
node_login -->|"submits credentials"| node_auth
node_auth -->|"includes"| node_connection
node_connection -->|"connects"| node_database
node_auth -->|"checks credentials"| node_database
node_auth -->|"redirects on success"| node_home
node_user -->|"requests"| node_home
node_home -->|"includes"| node_connection
node_home -->|"reads students"| node_database
node_home -->|"submits add form"| node_create
node_home -->|"submits edits"| node_update
node_home -->|"requests deletion"| node_delete
node_home -->|"requests logout"| node_logout
node_create -->|"includes"| node_connection
node_create -->|"inserts student"| node_database
node_update -->|"includes"| node_connection
node_update -->|"updates student"| node_database
node_delete -->|"includes"| node_connection
node_delete -->|"deletes student"| node_database
node_logout -->|"redirects"| node_login

click node_login "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/index.php"
click node_auth "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/pakicheck.php"
click node_logout "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/logout.php"
click node_home "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/home.php"
click node_create "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/insert.php"
click node_update "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/update.php"
click node_delete "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/delete.php"
click node_connection "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/database.php"
click node_database "https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/SQL%20database.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_login,node_auth,node_logout,node_user toneBlue
class node_home,node_create,node_update,node_delete toneAmber
class node_connection,node_database toneMint
```

## Components

### Access

- [Login Form](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/index.php): `index.php`
- [Sign-in Check](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/pakicheck.php): `pakicheck.php`
- [Logout](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/logout.php): `logout.php`

### Student Records

- [Student List](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/home.php): `home.php`
- [Add Student](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/insert.php): `insert.php`
- [Edit Student](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/update.php): `update.php`
- [Delete Student](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/delete.php): `delete.php`

### Persistence

- [MySQL Connection](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/database.php): `database.php`
- [MySQL Database](https://github.com/clear-sys/phpcrud_bagobo_clear/blob/main/SQL%20database.sql): `SQL database.sql`

### Other components

- **User**

## Connections

- User → Login Form: opens
- Login Form → Sign-in Check: submits credentials
- Sign-in Check → MySQL Connection: includes
- MySQL Connection → MySQL Database: connects
- Sign-in Check → MySQL Database: checks credentials
- Sign-in Check → Student List: redirects on success
- User → Student List: requests
- Student List → MySQL Connection: includes
- Student List → MySQL Database: reads students
- Student List → Add Student: submits add form
- Student List → Edit Student: submits edits
- Student List → Delete Student: requests deletion
- Student List → Logout: requests logout
- Add Student → MySQL Connection: includes
- Add Student → MySQL Database: inserts student
- Edit Student → MySQL Connection: includes
- Edit Student → MySQL Database: updates student
- Delete Student → MySQL Connection: includes
- Delete Student → MySQL Database: deletes student
- Logout → Login Form: redirects
