# sumitkumar-0/projectquizly architecture

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

- Interactive diagram: https://gitdiagram.com/sumitkumar-0/projectquizly
- Repository: https://github.com/sumitkumar-0/projectquizly

## Overview

Quizly is a full-stack quiz management system for students, teachers, and administrators. Students register or sign in, browse and filter quizzes, take timed exams, and review graded results and leaderboard standings. Teachers create quizzes and questions, then monitor submissions and analytics; admins manage users, quizzes, and system activity. The Express server owns API handling and database queries, using a MySQL connection pool. Several capabilities and admin interactions are documented but their implementation files were not sampled, so those links rely on README evidence.

Main entry points: [`db.js`](https://github.com/sumitkumar-0/projectquizly/blob/main/db.js) (MySQL connection pool), [`public/dashboard/dashboard.js`](https://github.com/sumitkumar-0/projectquizly/blob/main/public/dashboard/dashboard.js) (Student dashboard), [`public/quiz/quiz.js`](https://github.com/sumitkumar-0/projectquizly/blob/main/public/quiz/quiz.js) (Quiz attempt engine), [`server.js`](https://github.com/sumitkumar-0/projectquizly/blob/main/server.js) (Submission and grading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learner["Student experience"]
  node_student["Student dashboard<br/>[dashboard.js]"]
  node_quiz["Quiz attempt engine<br/>[quiz.js]"]
  node_results["Quiz results<br/>[quiz-result.html]"]
  node_leaderboard["Leaderboard<br/>[dashboard.js]"]
  node_student_api["Student quiz API<br/>[server.js]"]
  node_grading["Submission and grading<br/>[server.js]"]
end

subgraph group_author["Teacher experience"]
  node_teacher["Teacher panel<br/>[teacher.js]"]
  node_teacher_api["Teacher quiz and analytics API<br/>[server.js]"]
end

subgraph group_platform["Platform services"]
  node_auth["Sign in and register<br/>[auth.js]"]
  node_auth_api["Authentication API<br/>[server.js]"]
  node_pool["MySQL connection pool<br/>[db.js]"]
  node_data[("Quizly data<br/>[database.sql]")]
end

subgraph group_operations["Administration"]
  node_admin["Admin panel<br/>[admin.html]"]
  node_admin_api["Admin management API<br/>[server.js]"]
end

node_browser(("User"))
node_mysql[("MySQL")]

node_browser -->|"uses"| node_auth
node_auth -->|"calls auth APIs"| node_auth_api
node_browser -->|"uses"| node_student
node_student -->|"requests quizzes"| node_student_api
node_student -->|"views"| node_leaderboard
node_student -->|"opens attempt"| node_quiz
node_quiz -->|"loads questions"| node_student_api
node_quiz -->|"submits answers"| node_grading
node_grading -->|"returns result"| node_results
node_browser -->|"uses"| node_teacher
node_teacher -->|"calls teacher APIs"| node_teacher_api
node_browser -->|"uses"| node_admin
node_admin -.->|"calls admin APIs"| node_admin_api
node_auth_api -->|"queries users"| node_pool
node_student_api -->|"queries quiz data"| node_pool
node_grading -->|"reads and writes"| node_pool
node_teacher_api -->|"queries quiz data"| node_pool
node_admin_api -.->|"queries platform data"| node_pool
node_pool -->|"connects"| node_mysql
node_mysql -.->|"stores schema data"| node_data

click node_auth "https://github.com/sumitkumar-0/projectquizly/blob/main/public/auth/auth.js"
click node_student "https://github.com/sumitkumar-0/projectquizly/blob/main/public/dashboard/dashboard.js"
click node_quiz "https://github.com/sumitkumar-0/projectquizly/blob/main/public/quiz/quiz.js"
click node_results "https://github.com/sumitkumar-0/projectquizly/blob/main/public/quiz/quiz-result.html"
click node_leaderboard "https://github.com/sumitkumar-0/projectquizly/blob/main/public/dashboard/dashboard.js"
click node_teacher "https://github.com/sumitkumar-0/projectquizly/blob/main/public/dashboard/teacher.js"
click node_admin "https://github.com/sumitkumar-0/projectquizly/blob/main/public/admin/admin.html"
click node_auth_api "https://github.com/sumitkumar-0/projectquizly/blob/main/server.js"
click node_student_api "https://github.com/sumitkumar-0/projectquizly/blob/main/server.js"
click node_grading "https://github.com/sumitkumar-0/projectquizly/blob/main/server.js"
click node_teacher_api "https://github.com/sumitkumar-0/projectquizly/blob/main/server.js"
click node_admin_api "https://github.com/sumitkumar-0/projectquizly/blob/main/server.js"
click node_pool "https://github.com/sumitkumar-0/projectquizly/blob/main/db.js"
click node_data "https://github.com/sumitkumar-0/projectquizly/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_student,node_quiz,node_results,node_leaderboard,node_student_api,node_grading,node_browser toneBlue
class node_teacher,node_teacher_api,node_mysql toneAmber
class node_auth,node_auth_api,node_pool,node_data toneMint
class node_admin,node_admin_api toneRose
```

## Components

### Student experience

- [Student dashboard](https://github.com/sumitkumar-0/projectquizly/blob/main/public/dashboard/dashboard.js): `public/dashboard/dashboard.js`
- [Quiz attempt engine](https://github.com/sumitkumar-0/projectquizly/blob/main/public/quiz/quiz.js): `public/quiz/quiz.js`
- [Quiz results](https://github.com/sumitkumar-0/projectquizly/blob/main/public/quiz/quiz-result.html): `public/quiz/quiz-result.html`
- [Leaderboard](https://github.com/sumitkumar-0/projectquizly/blob/main/public/dashboard/dashboard.js): `public/dashboard/dashboard.js`
- [Student quiz API](https://github.com/sumitkumar-0/projectquizly/blob/main/server.js): `server.js`
- [Submission and grading](https://github.com/sumitkumar-0/projectquizly/blob/main/server.js): `server.js`

### Teacher experience

- [Teacher panel](https://github.com/sumitkumar-0/projectquizly/blob/main/public/dashboard/teacher.js): `public/dashboard/teacher.js`
- [Teacher quiz and analytics API](https://github.com/sumitkumar-0/projectquizly/blob/main/server.js): `server.js`

### Platform services

- [Sign in and register](https://github.com/sumitkumar-0/projectquizly/blob/main/public/auth/auth.js): `public/auth/auth.js`
- [Authentication API](https://github.com/sumitkumar-0/projectquizly/blob/main/server.js): `server.js`
- [MySQL connection pool](https://github.com/sumitkumar-0/projectquizly/blob/main/db.js): `db.js`
- [Quizly data](https://github.com/sumitkumar-0/projectquizly/blob/main/database.sql): `database.sql`

### Administration

- [Admin panel](https://github.com/sumitkumar-0/projectquizly/blob/main/public/admin/admin.html): `public/admin/admin.html`
- [Admin management API](https://github.com/sumitkumar-0/projectquizly/blob/main/server.js): `server.js`

### Other components

- **User**
- **MySQL**

## Connections

- User → Sign in and register: uses (evidence: `README.md`)
- Sign in and register → Authentication API: calls auth APIs (evidence: `public/auth/auth.js`)
- User → Student dashboard: uses (evidence: `README.md`)
- Student dashboard → Student quiz API: requests quizzes (evidence: `public/dashboard/dashboard.js`)
- Student dashboard → Leaderboard: views (evidence: `public/dashboard/dashboard.js`)
- Student dashboard → Quiz attempt engine: opens attempt (evidence: `public/dashboard/dashboard.js`)
- Quiz attempt engine → Student quiz API: loads questions (evidence: `public/quiz/quiz.js`)
- Quiz attempt engine → Submission and grading: submits answers (evidence: `public/quiz/quiz.js`)
- Submission and grading → Quiz results: returns result (evidence: `README.md`)
- User → Teacher panel: uses (evidence: `README.md`)
- Teacher panel → Teacher quiz and analytics API: calls teacher APIs (evidence: `public/dashboard/teacher.js`)
- User → Admin panel: uses (evidence: `README.md`)
- Admin panel → Admin management API: calls admin APIs (evidence: `README.md`)
- Authentication API → MySQL connection pool: queries users (evidence: `server.js`)
- Student quiz API → MySQL connection pool: queries quiz data (evidence: `server.js`)
- Submission and grading → MySQL connection pool: reads and writes (evidence: `server.js`)
- Teacher quiz and analytics API → MySQL connection pool: queries quiz data (evidence: `server.js`)
- Admin management API → MySQL connection pool: queries platform data (evidence: `README.md`)
- MySQL connection pool → MySQL: connects (evidence: `db.js`)
- MySQL → Quizly data: stores schema data (evidence: `README.md`)
