# chodipalliajay/alpha architecture

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

- Interactive diagram: https://gitdiagram.com/chodipalliajay/alpha
- Repository: https://github.com/chodipalliajay/alpha

## Overview

This is a PHP student-application portal. Applicants fill in and submit an application, receive a reference/token, and can view confirmation and download a PDF copy; administrators sign in to search applications and update statuses. The graph includes the database and uploaded-document storage as runtime state. The tree indicates an HTML form and stylesheet, but their contents were not sampled, so the form-to-handler relationship is documented only where supported by the handler’s behavior; no Excel export capability is inferred from the empty Python file.

Main entry points: [`student_app/admin/dashboard.php`](https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/dashboard.php) (Application dashboard), [`student_app/config/db.php`](https://github.com/chodipalliajay/alpha/blob/main/student_app/config/db.php) (MySQL database), [`student_app/submit.php`](https://github.com/chodipalliajay/alpha/blob/main/student_app/submit.php) (Validate and submit), [`student_app/admin/login.php`](https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/login.php) (Admin login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_applicant["Applicant workflow"]
  node_form["Application form<br/>[index.html]"]
  node_validation["Client validation<br/>[validate.js]"]
  node_submission["Validate and submit<br/>[submit.php]"]
  node_confirmation["Submission confirmation<br/>[success.php]"]
end

subgraph group_admin["Admin operations"]
  node_login["Admin login<br/>[login.php]"]
  node_auth["Session guard<br/>[auth_check.php]"]
  node_dashboard["Application dashboard<br/>[dashboard.php]"]
  node_logout["Admin logout<br/>[logout.php]"]
end

subgraph group_storage["Application state"]
  node_database[("MySQL database<br/>[db.php]")]
  node_uploads["Uploaded documents<br/>[submit.php]"]
end

subgraph group_documents["Document output"]
  node_pdf_endpoint["PDF download endpoint<br/>[download_pdf.php]"]
  node_fpdf["FPDF generator<br/>[fpdf.php]"]
end

node_applicant_actor(("Applicant"))
node_admin_actor(("Administrator"))

node_applicant_actor -.->|"fills"| node_form
node_form -.->|"validates with"| node_validation
node_form -.->|"posts to"| node_submission
node_submission -->|"checks and writes"| node_database
node_submission -->|"stores upload"| node_uploads
node_submission -->|"redirects with token"| node_confirmation
node_confirmation -->|"reads application"| node_database
node_confirmation -->|"links download"| node_pdf_endpoint
node_applicant_actor -.->|"requests copy"| node_pdf_endpoint
node_pdf_endpoint -->|"loads application"| node_database
node_pdf_endpoint -->|"generates PDF"| node_fpdf
node_admin_actor -.->|"signs in"| node_login
node_login -->|"checks credentials"| node_database
node_login -->|"redirects on success"| node_dashboard
node_admin_actor -.->|"searches and updates"| node_dashboard
node_dashboard -->|"requires session"| node_auth
node_dashboard -->|"searches and updates"| node_database
node_dashboard -->|"links logout"| node_logout
node_logout -.->|"redirects"| node_login

click node_form "https://github.com/chodipalliajay/alpha/blob/main/student_app/index.html"
click node_validation "https://github.com/chodipalliajay/alpha/blob/main/student_app/js/validate.js"
click node_submission "https://github.com/chodipalliajay/alpha/blob/main/student_app/submit.php"
click node_confirmation "https://github.com/chodipalliajay/alpha/blob/main/student_app/success.php"
click node_login "https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/login.php"
click node_auth "https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/auth_check.php"
click node_dashboard "https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/dashboard.php"
click node_logout "https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/logout.php"
click node_database "https://github.com/chodipalliajay/alpha/blob/main/student_app/config/db.php"
click node_uploads "https://github.com/chodipalliajay/alpha/blob/main/student_app/submit.php"
click node_pdf_endpoint "https://github.com/chodipalliajay/alpha/blob/main/student_app/download_pdf.php"
click node_fpdf "https://github.com/chodipalliajay/alpha/blob/main/student_app/lib/fbdf/fpdf.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_form,node_validation,node_submission,node_confirmation toneBlue
class node_login,node_auth,node_dashboard,node_logout toneAmber
class node_database,node_uploads toneMint
class node_pdf_endpoint,node_fpdf toneRose
class node_applicant_actor,node_admin_actor toneIndigo
```

## Components

### Applicant workflow

- [Application form](https://github.com/chodipalliajay/alpha/blob/main/student_app/index.html): `student_app/index.html`
- [Client validation](https://github.com/chodipalliajay/alpha/blob/main/student_app/js/validate.js): `student_app/js/validate.js`
- [Validate and submit](https://github.com/chodipalliajay/alpha/blob/main/student_app/submit.php): `student_app/submit.php`
- [Submission confirmation](https://github.com/chodipalliajay/alpha/blob/main/student_app/success.php): `student_app/success.php`

### Admin operations

- [Admin login](https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/login.php): `student_app/admin/login.php`
- [Session guard](https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/auth_check.php): `student_app/admin/auth_check.php`
- [Application dashboard](https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/dashboard.php): `student_app/admin/dashboard.php`
- [Admin logout](https://github.com/chodipalliajay/alpha/blob/main/student_app/admin/logout.php): `student_app/admin/logout.php`

### Application state

- [MySQL database](https://github.com/chodipalliajay/alpha/blob/main/student_app/config/db.php): `student_app/config/db.php`
- [Uploaded documents](https://github.com/chodipalliajay/alpha/blob/main/student_app/submit.php): `student_app/submit.php`

### Document output

- [PDF download endpoint](https://github.com/chodipalliajay/alpha/blob/main/student_app/download_pdf.php): `student_app/download_pdf.php`
- [FPDF generator](https://github.com/chodipalliajay/alpha/blob/main/student_app/lib/fbdf/fpdf.php): `student_app/lib/fbdf/fpdf.php`

### Other components

- **Applicant**
- **Administrator**

## Connections

- Applicant → Application form: fills
- Application form → Client validation: validates with
- Application form → Validate and submit: posts to
- Validate and submit → MySQL database: checks and writes (evidence: `student_app/submit.php`)
- Validate and submit → Uploaded documents: stores upload (evidence: `student_app/submit.php`)
- Validate and submit → Submission confirmation: redirects with token (evidence: `student_app/submit.php`)
- Submission confirmation → MySQL database: reads application (evidence: `student_app/success.php`)
- Submission confirmation → PDF download endpoint: links download (evidence: `student_app/success.php`)
- Applicant → PDF download endpoint: requests copy
- PDF download endpoint → MySQL database: loads application (evidence: `student_app/download_pdf.php`)
- PDF download endpoint → FPDF generator: generates PDF (evidence: `student_app/download_pdf.php`)
- Administrator → Admin login: signs in
- Admin login → MySQL database: checks credentials (evidence: `student_app/admin/login.php`)
- Admin login → Application dashboard: redirects on success (evidence: `student_app/admin/login.php`)
- Administrator → Application dashboard: searches and updates
- Application dashboard → Session guard: requires session (evidence: `student_app/admin/dashboard.php`)
- Application dashboard → MySQL database: searches and updates (evidence: `student_app/admin/dashboard.php`)
- Application dashboard → Admin logout: links logout (evidence: `student_app/admin/dashboard.php`)
- Admin logout → Admin login: redirects
