# drr25/agriquiz_website architecture

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

- Interactive diagram: https://gitdiagram.com/drr25/agriquiz_website
- Repository: https://github.com/drr25/agriquiz_website

## Overview

AGRIQUIZ is a PHP/MySQL agriculture exam-preparation platform. Students log in, study reviewer materials, take practice quizzes, receive feedback and review performance analytics; administrators manage users, learning content and pre-board records. The graph separates those domain stages from authentication and administration. API/database links are included where shown in the excerpts; several page-to-feature connections reflect README documentation because the relevant page implementations were not sampled.

Main entry points: [`api/api.php`](https://github.com/drr25/agriquiz_website/blob/main/api/api.php) (Learning Content API), [`review_quiz.php`](https://github.com/drr25/agriquiz_website/blob/main/review_quiz.php) (Reviewer Materials), [`review_quiz_adminside.php`](https://github.com/drr25/agriquiz_website/blob/main/review_quiz_adminside.php) (Reviewer and Quiz Management), [`index.php`](https://github.com/drr25/agriquiz_website/blob/main/index.php) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Access and Profiles"]
  node_login["Login<br/>[index.php]"]
  node_privacy["Privacy Consent"]
  node_profile["Profile<br/>[profile.php]"]
end

subgraph group_learning["Student Learning"]
  node_student_home["Student Dashboard"]
  node_reviewers["Reviewer Materials<br/>[review_quiz.php]"]
  node_review_render["Reviewer Renderer<br/>[reviewer-render.js]"]
  node_quiz["Practice Quiz<br/>[review_quiz.php]"]
end

subgraph group_admin["Administration"]
  node_content_api["Learning Content API<br/>[api.php]"]
  node_admin_content["Reviewer and Quiz Management"]
  node_content_save["Content Save API<br/>[save_content.php]"]
  node_student_admin["Student Accounts"]
  node_admin_home["Admin Dashboard"]
  node_preboard["Pre-board Records"]
end

subgraph group_analytics["Performance Analytics"]
  node_student_analytics["Student Analytics"]
  node_admin_analytics["Admin Analytics"]
  node_analytics_api["Analytics API<br/>[analytics_api.php]"]
  node_preboard_analytics["Pre-board Analytics API"]
  node_passing_rate["Passing Rate Settings"]
end

node_student(("Student"))
node_administrator(("Administrator"))
node_mysql[("MySQL Database<br/>[database.sql]")]

node_student -->|"signs in"| node_login
node_administrator -->|"signs in"| node_login
node_login -->|"opens consent"| node_privacy
node_student -->|"accesses"| node_student_home
node_student -->|"studies"| node_reviewers
node_reviewers -.->|"requests materials"| node_content_api
node_reviewers -.->|"renders content"| node_review_render
node_student -->|"takes quiz"| node_quiz
node_quiz -.->|"loads quiz data"| node_content_api
node_administrator -->|"manages platform"| node_admin_home
node_administrator -->|"manages learning content"| node_admin_content
node_admin_content -->|"saves content"| node_content_save
node_admin_content -->|"requests content"| node_content_api
node_content_api -->|"reads and writes"| node_mysql
node_content_save -->|"reads and writes"| node_mysql
node_administrator -->|"manages accounts"| node_student_admin
node_administrator -->|"manages records"| node_preboard
node_student -->|"reviews progress"| node_student_analytics
node_administrator -->|"views performance"| node_admin_analytics
node_student_analytics -.->|"requests analytics"| node_analytics_api
node_admin_analytics -.->|"requests analytics"| node_analytics_api
node_preboard -.->|"requests summaries"| node_preboard_analytics
node_administrator -->|"sets passing rate"| node_passing_rate
node_passing_rate -->|"stores setting"| node_mysql
node_administrator -->|"manages profile"| node_profile
node_student -->|"manages profile"| node_profile

click node_login "https://github.com/drr25/agriquiz_website/blob/main/index.php"
click node_privacy "https://github.com/drr25/agriquiz_website/blob/main/data_privacy_agreement.php"
click node_profile "https://github.com/drr25/agriquiz_website/blob/main/profile.php"
click node_student_home "https://github.com/drr25/agriquiz_website/blob/main/student_dashboard.php"
click node_reviewers "https://github.com/drr25/agriquiz_website/blob/main/review_quiz.php"
click node_review_render "https://github.com/drr25/agriquiz_website/blob/main/js/reviewer-render.js"
click node_quiz "https://github.com/drr25/agriquiz_website/blob/main/review_quiz.php"
click node_content_api "https://github.com/drr25/agriquiz_website/blob/main/api/api.php"
click node_admin_content "https://github.com/drr25/agriquiz_website/blob/main/review_quiz_adminside.php"
click node_content_save "https://github.com/drr25/agriquiz_website/blob/main/api/save_content.php"
click node_student_admin "https://github.com/drr25/agriquiz_website/blob/main/admin_student_list.php"
click node_admin_home "https://github.com/drr25/agriquiz_website/blob/main/admin_dashboard.php"
click node_preboard "https://github.com/drr25/agriquiz_website/blob/main/admin_preboard_records.php"
click node_student_analytics "https://github.com/drr25/agriquiz_website/blob/main/student_analytics.php"
click node_admin_analytics "https://github.com/drr25/agriquiz_website/blob/main/admin_analytics.php"
click node_analytics_api "https://github.com/drr25/agriquiz_website/blob/main/api/analytics_api.php"
click node_preboard_analytics "https://github.com/drr25/agriquiz_website/blob/main/api/get_preboard_analytics.php"
click node_passing_rate "https://github.com/drr25/agriquiz_website/blob/main/api/passing_rate_api.php"
click node_mysql "https://github.com/drr25/agriquiz_website/blob/main/database.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_privacy,node_profile toneBlue
class node_student_home,node_reviewers,node_review_render,node_quiz,node_mysql toneAmber
class node_content_api,node_admin_content,node_content_save,node_student_admin,node_admin_home,node_preboard toneMint
class node_student_analytics,node_admin_analytics,node_analytics_api,node_preboard_analytics,node_passing_rate toneRose
class node_student,node_administrator toneIndigo
```

## Components

### Access and Profiles

- [Login](https://github.com/drr25/agriquiz_website/blob/main/index.php): `index.php`
- [Privacy Consent](https://github.com/drr25/agriquiz_website/blob/main/data_privacy_agreement.php): `data_privacy_agreement.php`
- [Profile](https://github.com/drr25/agriquiz_website/blob/main/profile.php): `profile.php`

### Student Learning

- [Student Dashboard](https://github.com/drr25/agriquiz_website/blob/main/student_dashboard.php): `student_dashboard.php`
- [Reviewer Materials](https://github.com/drr25/agriquiz_website/blob/main/review_quiz.php): `review_quiz.php`
- [Reviewer Renderer](https://github.com/drr25/agriquiz_website/blob/main/js/reviewer-render.js): `js/reviewer-render.js`
- [Practice Quiz](https://github.com/drr25/agriquiz_website/blob/main/review_quiz.php): `review_quiz.php`

### Administration

- [Learning Content API](https://github.com/drr25/agriquiz_website/blob/main/api/api.php): `api/api.php`
- [Reviewer and Quiz Management](https://github.com/drr25/agriquiz_website/blob/main/review_quiz_adminside.php): `review_quiz_adminside.php`
- [Content Save API](https://github.com/drr25/agriquiz_website/blob/main/api/save_content.php): `api/save_content.php`
- [Student Accounts](https://github.com/drr25/agriquiz_website/blob/main/admin_student_list.php): `admin_student_list.php`
- [Admin Dashboard](https://github.com/drr25/agriquiz_website/blob/main/admin_dashboard.php): `admin_dashboard.php`
- [Pre-board Records](https://github.com/drr25/agriquiz_website/blob/main/admin_preboard_records.php): `admin_preboard_records.php`

### Performance Analytics

- [Student Analytics](https://github.com/drr25/agriquiz_website/blob/main/student_analytics.php): `student_analytics.php`
- [Admin Analytics](https://github.com/drr25/agriquiz_website/blob/main/admin_analytics.php): `admin_analytics.php`
- [Analytics API](https://github.com/drr25/agriquiz_website/blob/main/api/analytics_api.php): `api/analytics_api.php`
- [Pre-board Analytics API](https://github.com/drr25/agriquiz_website/blob/main/api/get_preboard_analytics.php): `api/get_preboard_analytics.php`
- [Passing Rate Settings](https://github.com/drr25/agriquiz_website/blob/main/api/passing_rate_api.php): `api/passing_rate_api.php`

### Other components

- **Student**
- **Administrator**
- [MySQL Database](https://github.com/drr25/agriquiz_website/blob/main/database.sql): `database.sql`

## Connections

- Student → Login: signs in (evidence: `README.md`)
- Administrator → Login: signs in (evidence: `README.md`)
- Login → Privacy Consent: opens consent (evidence: `index.php`)
- Student → Student Dashboard: accesses (evidence: `README.md`)
- Student → Reviewer Materials: studies (evidence: `README.md`)
- Reviewer Materials → Learning Content API: requests materials
- Reviewer Materials → Reviewer Renderer: renders content
- Student → Practice Quiz: takes quiz (evidence: `README.md`)
- Practice Quiz → Learning Content API: loads quiz data
- Administrator → Admin Dashboard: manages platform (evidence: `README.md`)
- Administrator → Reviewer and Quiz Management: manages learning content (evidence: `README.md`)
- Reviewer and Quiz Management → Content Save API: saves content (evidence: `review_quiz_adminside.php`)
- Reviewer and Quiz Management → Learning Content API: requests content (evidence: `review_quiz_adminside.php`)
- Learning Content API → MySQL Database: reads and writes (evidence: `api/api.php`)
- Content Save API → MySQL Database: reads and writes (evidence: `api/save_content.php`)
- Administrator → Student Accounts: manages accounts (evidence: `README.md`)
- Administrator → Pre-board Records: manages records (evidence: `README.md`)
- Student → Student Analytics: reviews progress (evidence: `README.md`)
- Administrator → Admin Analytics: views performance (evidence: `README.md`)
- Student Analytics → Analytics API: requests analytics
- Admin Analytics → Analytics API: requests analytics
- Pre-board Records → Pre-board Analytics API: requests summaries
- Administrator → Passing Rate Settings: sets passing rate (evidence: `api/passing_rate_api.php`)
- Passing Rate Settings → MySQL Database: stores setting (evidence: `api/passing_rate_api.php`)
- Administrator → Profile: manages profile (evidence: `README.md`)
- Student → Profile: manages profile (evidence: `README.md`)
