# vanshika-270/online_quiz_ architecture

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

- Interactive diagram: https://gitdiagram.com/vanshika-270/online_quiz_
- Repository: https://github.com/vanshika-270/online_quiz_

## Overview

Online Quiz System is a PHP/MySQL examination portal for students, teachers, and administrators. Users register or log in, then role-specific workflows let teachers create quizzes, questions, and practice material; students take quizzes or study material and record practice results; and users can review results and performance. The quiz submission code calculates scores and stores attempt details. The README also documents administration, history, reporting, and analysis capabilities. Connections below are limited to relationships visible in excerpts or documented in the README; unsampled page wiring is not inferred.

Main entry points: [`schema.sql`](https://github.com/vanshika-270/online_quiz_/blob/main/schema.sql) (Quiz Database), [`login.php`](https://github.com/vanshika-270/online_quiz_/blob/main/login.php) (Login), [`register.php`](https://github.com/vanshika-270/online_quiz_/blob/main/register.php) (Registration), [`index.php`](https://github.com/vanshika-270/online_quiz_/blob/main/index.php) (Home Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Access"]
  node_login["Login<br/>[login.php]"]
  node_register["Registration<br/>[register.php]"]
  node_admin["Admin Management"]
  node_home["Home Page<br/>[index.php]"]
end

subgraph group_authoring["Teacher Authoring"]
  node_teacher["Teacher Dashboard"]
  node_quiz_authoring["Quiz Authoring"]
  node_question_authoring["Question Authoring"]
  node_quiz_management["Quiz Management"]
  node_practice_authoring["Practice Material"]
end

subgraph group_student["Student Learning"]
  node_quiz_catalog["Available Quizzes"]
  node_quiz_attempt["Quiz Attempt"]
  node_study_attempt["Practice Study and Record"]
end

subgraph group_insights["Results and Insights"]
  node_quiz_result["Quiz Results"]
  node_quiz_history["Quiz History"]
  node_performance["Performance Tracking"]
  node_practice_history["Practice History and Analysis"]
  node_teacher_reports["Teacher Reports"]
end

subgraph group_core["Shared Runtime"]
  node_database[("Quiz Database<br/>[schema.sql]")]
  node_runtime["Session and DB Runtime<br/>[db.php]"]
end

node_visitor(("Visitor"))

node_visitor -->|"visits"| node_home
node_home -->|"links to"| node_login
node_home -->|"links to"| node_register
node_login -->|"uses"| node_runtime
node_register -->|"uses"| node_runtime
node_login -.->|"authenticates against"| node_database
node_register -->|"creates account"| node_database
node_login -->|"routes role"| node_teacher
node_teacher -->|"reads counts"| node_database
node_quiz_authoring -->|"creates quiz"| node_database
node_question_authoring -->|"saves questions"| node_database
node_quiz_management -->|"reads quizzes"| node_database
node_practice_authoring -->|"stores material"| node_database
node_quiz_catalog -->|"reads quizzes"| node_database
node_quiz_catalog -->|"starts quiz"| node_quiz_attempt
node_quiz_attempt -->|"reads questions and stores attempt"| node_database
node_quiz_attempt -->|"redirects to"| node_quiz_result
node_study_attempt -->|"stores practice result"| node_database
node_study_attempt -->|"redirects to analysis"| node_practice_history
node_quiz_history -.->|"reads attempt records"| node_database
node_performance -.->|"reads performance data"| node_database
node_teacher_reports -.->|"reads report data"| node_database
node_admin -.->|"manages records"| node_database

click node_login "https://github.com/vanshika-270/online_quiz_/blob/main/login.php"
click node_register "https://github.com/vanshika-270/online_quiz_/blob/main/register.php"
click node_database "https://github.com/vanshika-270/online_quiz_/blob/main/schema.sql"
click node_runtime "https://github.com/vanshika-270/online_quiz_/blob/main/db.php"
click node_home "https://github.com/vanshika-270/online_quiz_/blob/main/index.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_register,node_admin,node_home toneBlue
class node_teacher,node_quiz_authoring,node_question_authoring,node_quiz_management,node_practice_authoring toneAmber
class node_quiz_catalog,node_quiz_attempt,node_study_attempt toneMint
class node_quiz_result,node_quiz_history,node_performance,node_practice_history,node_teacher_reports toneRose
class node_database,node_runtime,node_visitor toneIndigo
```

## Components

### Access

- [Login](https://github.com/vanshika-270/online_quiz_/blob/main/login.php): `login.php`
- [Registration](https://github.com/vanshika-270/online_quiz_/blob/main/register.php): `register.php`
- **Admin Management**
- [Home Page](https://github.com/vanshika-270/online_quiz_/blob/main/index.php): `index.php`

### Teacher Authoring

- **Teacher Dashboard**
- **Quiz Authoring**
- **Question Authoring**
- **Quiz Management**
- **Practice Material**

### Student Learning

- **Available Quizzes**
- **Quiz Attempt**
- **Practice Study and Record**

### Results and Insights

- **Quiz Results**
- **Quiz History**
- **Performance Tracking**
- **Practice History and Analysis**
- **Teacher Reports**

### Shared Runtime

- [Quiz Database](https://github.com/vanshika-270/online_quiz_/blob/main/schema.sql): `schema.sql`
- [Session and DB Runtime](https://github.com/vanshika-270/online_quiz_/blob/main/db.php): `db.php`

### Other components

- **Visitor**

## Connections

- Visitor → Home Page: visits (evidence: `index.php`)
- Home Page → Login: links to (evidence: `index.php`)
- Home Page → Registration: links to (evidence: `index.php`)
- Login → Session and DB Runtime: uses (evidence: `login.php`)
- Registration → Session and DB Runtime: uses (evidence: `register.php`)
- Login → Quiz Database: authenticates against
- Registration → Quiz Database: creates account (evidence: `register.php`)
- Login → Teacher Dashboard: routes role
- Teacher Dashboard → Quiz Database: reads counts
- Quiz Authoring → Quiz Database: creates quiz
- Question Authoring → Quiz Database: saves questions
- Quiz Management → Quiz Database: reads quizzes
- Practice Material → Quiz Database: stores material
- Available Quizzes → Quiz Database: reads quizzes
- Available Quizzes → Quiz Attempt: starts quiz
- Quiz Attempt → Quiz Database: reads questions and stores attempt
- Quiz Attempt → Quiz Results: redirects to
- Practice Study and Record → Quiz Database: stores practice result
- Practice Study and Record → Practice History and Analysis: redirects to analysis
- Quiz History → Quiz Database: reads attempt records
- Performance Tracking → Quiz Database: reads performance data
- Teacher Reports → Quiz Database: reads report data
- Admin Management → Quiz Database: manages records
