# josephamuasi001/phpfullcourse architecture

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

- Interactive diagram: https://gitdiagram.com/josephamuasi001/phpfullcourse
- Repository: https://github.com/josephamuasi001/phpfullcourse

## Overview

This repository is a set of introductory PHP exercises, form-handling examples, and a small student-management application. The main user workflow is to browse student records, open a record, and add, view, edit, or delete it; the PHP pages directly issue database operations through a shared PDO connection. The basics examples are independent learning scripts rather than stages in that workflow. The forms examples show both inline POST handling and a separate registration form/handler. Connections reflect only shown form actions, links, redirects, and database use; unsampled behavior is not inferred.

Main entry points: [`04-mini-project/public/index.php`](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/index.php) (Student listing), [`04-mini-project/config/database.php`](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/config/database.php) (PDO connection), [`04-mini-project/public/view.php`](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/view.php) (View student), [`04-mini-project/public/edit.php`](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/edit.php) (Edit student)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_basics["PHP basics"]
  node_age["Age category<br/>[age-category.php]"]
  node_arraymod["Array modification"]
  node_arrays["Arrays<br/>[arrays.php]"]
  node_datatypes["Data types<br/>[data-types.php]"]
  node_functions["Functions and averages<br/>[functions.php]"]
  node_grade["Grade calculator"]
  node_basicindex["PHP introduction<br/>[index.php]"]
  node_operators["Operators<br/>[operators.php]"]
  node_profiletext["Profile text<br/>[profile-text.php]"]
  node_salary["Salary calculator"]
  node_studentprofile["Student profile"]
  node_studentresult["Student result<br/>[student-result.php]"]
  node_student["Student data<br/>[student.php]"]
  node_students["Student list<br/>[students.php]"]
end

subgraph group_forms["Registration forms"]
  node_inlineform["Inline registration<br/>[index.php]"]
  node_registerform["Registration form<br/>[register.php]"]
  node_registerhandler["Registration handler"]
end

subgraph group_management["Student management"]
  node_listing["Student listing<br/>[index.php]"]
  node_addstudent["Add student<br/>[add-student.php]"]
  node_viewstudent["View student<br/>[view.php]"]
  node_editstudent["Edit student<br/>[edit.php]"]
  node_deletestudent["Delete student<br/>[delete.php]"]
  node_connection["PDO connection<br/>[database.php]"]
  node_mysql[("MySQL store")]
end

node_learner(("Learner"))

node_learner -.->|"runs example"| node_basicindex
node_learner -->|"submits form"| node_inlineform
node_learner -.->|"opens form"| node_registerform
node_registerform -->|"posts to"| node_registerhandler
node_learner -.->|"browses records"| node_listing
node_listing -->|"links to"| node_addstudent
node_listing -->|"links to"| node_viewstudent
node_viewstudent -->|"links to"| node_editstudent
node_viewstudent -->|"posts to"| node_deletestudent
node_listing -->|"requires"| node_connection
node_addstudent -->|"requires"| node_connection
node_viewstudent -->|"requires"| node_connection
node_editstudent -->|"requires"| node_connection
node_deletestudent -->|"requires"| node_connection
node_connection -->|"connects to"| node_mysql
node_editstudent -->|"redirects to"| node_listing
node_deletestudent -->|"redirects to"| node_listing

click node_age "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/age-category.php"
click node_arraymod "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/array-modification.php"
click node_arrays "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/arrays.php"
click node_datatypes "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/data-types.php"
click node_functions "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/functions.php"
click node_grade "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/grade-calculator.php"
click node_basicindex "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/index.php"
click node_operators "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/operators.php"
click node_profiletext "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/profile-text.php"
click node_salary "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/salary-calculator.php"
click node_studentprofile "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/student-profile.php"
click node_studentresult "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/student-result.php"
click node_student "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/student.php"
click node_students "https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/students.php"
click node_inlineform "https://github.com/josephamuasi001/phpfullcourse/blob/master/03-forms/index.php"
click node_registerform "https://github.com/josephamuasi001/phpfullcourse/blob/master/03-forms/register.php"
click node_registerhandler "https://github.com/josephamuasi001/phpfullcourse/blob/master/03-forms/process-register.php"
click node_listing "https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/index.php"
click node_addstudent "https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/add-student.php"
click node_viewstudent "https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/view.php"
click node_editstudent "https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/edit.php"
click node_deletestudent "https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/delete.php"
click node_connection "https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/config/database.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_age,node_arraymod,node_arrays,node_datatypes,node_functions,node_grade,node_basicindex,node_operators,node_profiletext,node_salary,node_studentprofile,node_studentresult,node_student,node_students toneBlue
class node_inlineform,node_registerform,node_registerhandler toneAmber
class node_listing,node_addstudent,node_viewstudent,node_editstudent,node_deletestudent,node_connection,node_mysql toneMint
class node_learner toneIndigo
```

## Components

### PHP basics

- [Age category](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/age-category.php): `01-php-basics/age-category.php`
- [Array modification](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/array-modification.php): `01-php-basics/array-modification.php`
- [Arrays](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/arrays.php): `01-php-basics/arrays.php`
- [Data types](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/data-types.php): `01-php-basics/data-types.php`
- [Functions and averages](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/functions.php): `01-php-basics/functions.php`
- [Grade calculator](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/grade-calculator.php): `01-php-basics/grade-calculator.php`
- [PHP introduction](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/index.php): `01-php-basics/index.php`
- [Operators](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/operators.php): `01-php-basics/operators.php`
- [Profile text](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/profile-text.php): `01-php-basics/profile-text.php`
- [Salary calculator](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/salary-calculator.php): `01-php-basics/salary-calculator.php`
- [Student profile](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/student-profile.php): `01-php-basics/student-profile.php`
- [Student result](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/student-result.php): `01-php-basics/student-result.php`
- [Student data](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/student.php): `01-php-basics/student.php`
- [Student list](https://github.com/josephamuasi001/phpfullcourse/blob/master/01-php-basics/students.php): `01-php-basics/students.php`

### Registration forms

- [Inline registration](https://github.com/josephamuasi001/phpfullcourse/blob/master/03-forms/index.php): `03-forms/index.php`
- [Registration form](https://github.com/josephamuasi001/phpfullcourse/blob/master/03-forms/register.php): `03-forms/register.php`
- [Registration handler](https://github.com/josephamuasi001/phpfullcourse/blob/master/03-forms/process-register.php): `03-forms/process-register.php`

### Student management

- [Student listing](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/index.php): `04-mini-project/public/index.php`
- [Add student](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/add-student.php): `04-mini-project/public/add-student.php`
- [View student](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/view.php): `04-mini-project/public/view.php`
- [Edit student](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/edit.php): `04-mini-project/public/edit.php`
- [Delete student](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/public/delete.php): `04-mini-project/public/delete.php`
- [PDO connection](https://github.com/josephamuasi001/phpfullcourse/blob/master/04-mini-project/config/database.php): `04-mini-project/config/database.php`
- **MySQL store**

### Other components

- **Learner**

## Connections

- Learner → PHP introduction: runs example
- Learner → Inline registration: submits form (evidence: `03-forms/index.php`)
- Learner → Registration form: opens form
- Registration form → Registration handler: posts to (evidence: `03-forms/register.php`)
- Learner → Student listing: browses records
- Student listing → Add student: links to (evidence: `04-mini-project/public/index.php`)
- Student listing → View student: links to (evidence: `04-mini-project/public/index.php`)
- View student → Edit student: links to (evidence: `04-mini-project/public/view.php`)
- View student → Delete student: posts to (evidence: `04-mini-project/public/view.php`)
- Student listing → PDO connection: requires (evidence: `04-mini-project/public/index.php`)
- Add student → PDO connection: requires (evidence: `04-mini-project/public/add-student.php`)
- View student → PDO connection: requires (evidence: `04-mini-project/public/view.php`)
- Edit student → PDO connection: requires (evidence: `04-mini-project/public/edit.php`)
- Delete student → PDO connection: requires (evidence: `04-mini-project/public/delete.php`)
- PDO connection → MySQL store: connects to (evidence: `04-mini-project/config/database.php`)
- Edit student → Student listing: redirects to (evidence: `04-mini-project/public/edit.php`)
- Delete student → Student listing: redirects to (evidence: `04-mini-project/public/delete.php`)
