# phinmark05/linkflow2 architecture

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

- Interactive diagram: https://gitdiagram.com/phinmark05/linkflow2
- Repository: https://github.com/phinmark05/linkflow2

## Overview

LinkFlow is a field application management system. Its principal workflow is student application entry and document submission, followed by staff review and an eventual placement assignment; administrators also manage users and application settings. The sampled code shows the application form, secure document helpers, shared data functions, and access checks. Several workflow actions and management pages are indexed but unsampled, so their capabilities are represented without asserting unverified call sequences.

Main entry points: [`FMS/includes/functions.php`](https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/functions.php) (Shared Data Functions), [`FMS/includes/document_helpers.php`](https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/document_helpers.php) (Document Helpers), [`FMS/student/application.php`](https://github.com/phinmark05/linkflow2/blob/main/FMS/student/application.php) (Application Form), [`FMS/admin/view_application.php`](https://github.com/phinmark05/linkflow2/blob/main/FMS/admin/view_application.php) (Application Review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and Access"]
  node_login["Login and Registration<br/>[login.php]"]
  node_access["Access Checks<br/>[auth_check.php]"]
  node_staffcheck["Staff Authorization<br/>[admin_check.php]"]
end

subgraph group_applications["Applications and Review"]
  node_studentform["Application Form<br/>[application.php]"]
  node_submission["Application Submission"]
  node_studentview["Student Application View"]
  node_reviewlist["Application Queue<br/>[applications.php]"]
  node_reviewdetail["Application Review"]
  node_reviewactions["Review Decisions"]
  node_decisionactions["Accept and Return"]
end

subgraph group_documents["Document Handling"]
  node_documents["Document Helpers"]
  node_documentui["Document Interface<br/>[document_ui.php]"]
  node_documentdelivery["Preview and Download"]
end

subgraph group_operations["Administration and Placement"]
  node_placement["Placement Assignment"]
  node_adminpages["Administrative Management<br/>[dashboard.php]"]
  node_staffpages["Staff Workspace<br/>[dashboard.php]"]
end

subgraph group_shared["Shared Runtime"]
  node_functions["Shared Data Functions<br/>[functions.php]"]
  node_database[("MySQL Database<br/>[database.php]")]
end

node_student(("Student"))
node_staff(("Staff"))

node_student -->|"signs in"| node_login
node_student -.->|"enters application"| node_studentform
node_staff -->|"reviews queue"| node_reviewlist
node_staff -.->|"uses workspace"| node_staffpages
node_login -->|"uses helpers"| node_functions
node_access -->|"loads account"| node_functions
node_staffcheck -->|"requires authentication"| node_access
node_studentform -->|"loads document types"| node_documents
node_studentform -->|"renders uploads"| node_documentui
node_studentform -.->|"submits data"| node_submission
node_submission -->|"uses shared logic"| node_functions
node_submission -->|"validates and stores"| node_documents
node_reviewlist -->|"requires staff access"| node_staffcheck
node_reviewlist -->|"links to detail"| node_reviewdetail
node_reviewdetail -->|"requires staff access"| node_staffcheck
node_reviewdetail -->|"loads document helpers"| node_documents
node_reviewdetail -->|"renders documents"| node_documentui
node_reviewactions -->|"uses shared logic"| node_functions
node_decisionactions -.->|"uses shared logic"| node_functions
node_studentview -->|"requires student access"| node_access
node_studentview -->|"renders documents"| node_documentui
node_documentui -->|"loads helpers"| node_documents
node_documentdelivery -->|"uses document helpers"| node_documents
node_placement -->|"uses shared logic"| node_functions
node_functions -->|"queries database"| node_database
node_database --> node_database

click node_login "https://github.com/phinmark05/linkflow2/blob/main/FMS/auth/login.php"
click node_access "https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/auth_check.php"
click node_staffcheck "https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/admin_check.php"
click node_studentform "https://github.com/phinmark05/linkflow2/blob/main/FMS/student/application.php"
click node_submission "https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/save_application.php"
click node_studentview "https://github.com/phinmark05/linkflow2/blob/main/FMS/student/view_application.php"
click node_reviewlist "https://github.com/phinmark05/linkflow2/blob/main/FMS/admin/applications.php"
click node_reviewdetail "https://github.com/phinmark05/linkflow2/blob/main/FMS/admin/view_application.php"
click node_reviewactions "https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/review_application.php"
click node_decisionactions "https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/accept_application.php"
click node_documents "https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/document_helpers.php"
click node_documentui "https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/document_ui.php"
click node_documentdelivery "https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/preview_document.php"
click node_placement "https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/create_placement.php"
click node_adminpages "https://github.com/phinmark05/linkflow2/blob/main/FMS/admin/dashboard.php"
click node_staffpages "https://github.com/phinmark05/linkflow2/blob/main/FMS/staff/dashboard.php"
click node_functions "https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/functions.php"
click node_database "https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/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_login,node_access,node_staffcheck toneBlue
class node_studentform,node_submission,node_studentview,node_reviewlist,node_reviewdetail,node_reviewactions,node_decisionactions toneAmber
class node_documents,node_documentui,node_documentdelivery toneMint
class node_placement,node_adminpages,node_staffpages toneRose
class node_functions,node_database,node_student,node_staff toneIndigo
```

## Components

### Identity and Access

- [Login and Registration](https://github.com/phinmark05/linkflow2/blob/main/FMS/auth/login.php): `FMS/auth/login.php`
- [Access Checks](https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/auth_check.php): `FMS/includes/auth_check.php`
- [Staff Authorization](https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/admin_check.php): `FMS/includes/admin_check.php`

### Applications and Review

- [Application Form](https://github.com/phinmark05/linkflow2/blob/main/FMS/student/application.php): `FMS/student/application.php`
- [Application Submission](https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/save_application.php): `FMS/actions/save_application.php`
- [Student Application View](https://github.com/phinmark05/linkflow2/blob/main/FMS/student/view_application.php): `FMS/student/view_application.php`
- [Application Queue](https://github.com/phinmark05/linkflow2/blob/main/FMS/admin/applications.php): `FMS/admin/applications.php`
- [Application Review](https://github.com/phinmark05/linkflow2/blob/main/FMS/admin/view_application.php): `FMS/admin/view_application.php`
- [Review Decisions](https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/review_application.php): `FMS/actions/review_application.php`
- [Accept and Return](https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/accept_application.php): `FMS/actions/accept_application.php`

### Document Handling

- [Document Helpers](https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/document_helpers.php): `FMS/includes/document_helpers.php`
- [Document Interface](https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/document_ui.php): `FMS/includes/document_ui.php`
- [Preview and Download](https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/preview_document.php): `FMS/actions/preview_document.php`

### Administration and Placement

- [Placement Assignment](https://github.com/phinmark05/linkflow2/blob/main/FMS/actions/create_placement.php): `FMS/actions/create_placement.php`
- [Administrative Management](https://github.com/phinmark05/linkflow2/blob/main/FMS/admin/dashboard.php): `FMS/admin/dashboard.php`
- [Staff Workspace](https://github.com/phinmark05/linkflow2/blob/main/FMS/staff/dashboard.php): `FMS/staff/dashboard.php`

### Shared Runtime

- [Shared Data Functions](https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/functions.php): `FMS/includes/functions.php`
- [MySQL Database](https://github.com/phinmark05/linkflow2/blob/main/FMS/includes/database.php): `FMS/includes/database.php`

### Other components

- **Student**
- **Staff**

## Connections

- Student → Login and Registration: signs in (evidence: `FMS/auth/login.php`)
- Student → Application Form: enters application
- Staff → Application Queue: reviews queue (evidence: `FMS/admin/applications.php`)
- Staff → Staff Workspace: uses workspace
- Login and Registration → Shared Data Functions: uses helpers (evidence: `FMS/auth/login.php`)
- Access Checks → Shared Data Functions: loads account (evidence: `FMS/includes/auth_check.php`)
- Staff Authorization → Access Checks: requires authentication (evidence: `FMS/includes/admin_check.php`)
- Application Form → Document Helpers: loads document types (evidence: `FMS/student/application.php`)
- Application Form → Document Interface: renders uploads (evidence: `FMS/student/application.php`)
- Application Form → Application Submission: submits data
- Application Submission → Shared Data Functions: uses shared logic (evidence: `FMS/actions/save_application.php`)
- Application Submission → Document Helpers: validates and stores (evidence: `FMS/actions/save_application.php`)
- Application Queue → Staff Authorization: requires staff access (evidence: `FMS/admin/applications.php`)
- Application Queue → Application Review: links to detail (evidence: `FMS/admin/applications.php`)
- Application Review → Staff Authorization: requires staff access (evidence: `FMS/admin/view_application.php`)
- Application Review → Document Helpers: loads document helpers (evidence: `FMS/admin/view_application.php`)
- Application Review → Document Interface: renders documents (evidence: `FMS/admin/view_application.php`)
- Review Decisions → Shared Data Functions: uses shared logic (evidence: `FMS/actions/review_application.php`)
- Accept and Return → Shared Data Functions: uses shared logic
- Student Application View → Access Checks: requires student access (evidence: `FMS/student/view_application.php`)
- Student Application View → Document Interface: renders documents (evidence: `FMS/student/view_application.php`)
- Document Interface → Document Helpers: loads helpers (evidence: `FMS/includes/document_ui.php`)
- Preview and Download → Document Helpers: uses document helpers (evidence: `FMS/actions/preview_document.php`)
- Placement Assignment → Shared Data Functions: uses shared logic (evidence: `FMS/actions/create_placement.php`)
- Shared Data Functions → MySQL Database: queries database (evidence: `FMS/includes/functions.php`)
- MySQL Database → MySQL Database (evidence: `FMS/includes/database.php`)
