# jlakkineni25/quizzify architecture

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

- Interactive diagram: https://gitdiagram.com/jlakkineni25/quizzify
- Repository: https://github.com/jlakkineni25/quizzify

## Overview

Quizzify is a role-based quiz platform: teachers create and manage quizzes, while students browse or join, take assessments, and view results. The React client routes these workflows through a shared API client to an Express/MongoDB backend; authentication and user profiles support both roles. The graph also preserves subject organization, quiz repository, and performance/profile capabilities. Some frontend-to-API links are dashed because the excerpts show client requests but not their matching backend endpoint calls; analytics details are documented but their implementation was not sampled.

Main entry points: [`frontend/src/App.jsx`](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/App.jsx) (Routes and pages), [`frontend/src/api/axiosConfig.js`](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/api/axiosConfig.js) (API client), [`backend/server.js`](https://github.com/jlakkineni25/quizzify/blob/main/backend/server.js) (Express server), [`frontend/src/pages/Profile.jsx`](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/Profile.jsx) (Profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["Routes and pages<br/>[App.jsx]"]
  node_api_client["API client<br/>[axiosConfig.js]"]
  node_landing["Landing page<br/>[LandingPage.jsx]"]
end

subgraph group_identity["Identity and profiles"]
  node_auth_context["Session context<br/>[AuthContext.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_register["Registration<br/>[Register.jsx]"]
  node_profile["Profile<br/>[Profile.jsx]"]
  node_student_profile["Student profile"]
  node_teacher_profile["Teacher profile"]
end

subgraph group_quiz["Quiz workflows"]
  node_teacher_home["Teacher dashboard<br/>[TeacherHome.jsx]"]
  node_quiz_details["Quiz details"]
  node_quiz_questions["Question authoring"]
  node_quiz_edit["Quiz editing"]
  node_question_modal["Question editor"]
  node_repository["Quiz repository<br/>[Repository.jsx]"]
  node_student_join["Quiz join"]
  node_student_attempt["Quiz attempt"]
  node_student_results["Attempt results"]
  node_subjects_modal["Subject manager<br/>[SubjectsModal.jsx]"]
end

subgraph group_api["API and access"]
  node_server["Express server<br/>[server.js]"]
  node_quiz_routes["Quiz routes<br/>[quizRoutes.js]"]
  node_auth_routes["Auth routes<br/>[authRoutes.js]"]
  node_user_routes["User routes<br/>[userRoutes.js]"]
  node_attempt_routes["Attempt routes<br/>[attemptRoutes.js]"]
  node_subject_routes["Subject routes<br/>[subjectRoutes.js]"]
  node_auth_middleware["JWT protection<br/>[authMiddleware.js]"]
  node_quiz_controller["Quiz operations<br/>[quizController.js]"]
  node_auth_controller["Authentication<br/>[authController.js]"]
  node_user_controller["User profiles<br/>[userController.js]"]
  node_attempt_controller["Attempt history"]
  node_subject_controller["Subject operations"]
end

subgraph group_data["Persistent data"]
  node_quiz_model[("Quiz records<br/>[Quiz.js]")]
end

node_teacher(("Teacher"))
node_student(("Student"))

node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_teacher_home
node_app -->|"routes to"| node_quiz_details
node_app -->|"routes to"| node_quiz_questions
node_app -->|"routes to"| node_quiz_edit
node_app -->|"routes to"| node_repository
node_app -->|"routes to"| node_student_join
node_app -->|"routes to"| node_student_attempt
node_app -->|"routes to"| node_student_results
node_app -->|"routes to"| node_profile
node_teacher -.->|"uses"| node_teacher_home
node_teacher -.->|"creates"| node_quiz_details
node_teacher -.->|"authors"| node_quiz_questions
node_teacher -.->|"manages"| node_quiz_edit
node_student -.->|"browses"| node_repository
node_student -.->|"joins"| node_student_join
node_student -.->|"takes"| node_student_attempt
node_quiz_edit -->|"uses"| node_question_modal
node_teacher_home -->|"uses"| node_subjects_modal
node_repository -->|"requests repository"| node_api_client
node_quiz_details -.->|"sends quiz data"| node_api_client
node_quiz_questions -.->|"sends questions"| node_api_client
node_student_attempt -.->|"submits attempt"| node_api_client
node_login -->|"requests login"| node_api_client
node_register -->|"requests registration"| node_api_client
node_login -->|"sets session"| node_auth_context
node_profile -->|"reads session"| node_auth_context
node_profile -->|"renders role view"| node_student_profile
node_profile -->|"renders role view"| node_teacher_profile
node_student_profile -->|"requests profile data"| node_api_client
node_teacher_profile -->|"requests profile data"| node_api_client
node_api_client -.->|"sends HTTP requests"| node_server
node_server -->|"mounts"| node_quiz_routes
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_user_routes
node_server -->|"mounts"| node_attempt_routes
node_server -->|"mounts"| node_subject_routes
node_quiz_routes -->|"dispatches"| node_quiz_controller
node_auth_routes -->|"dispatches"| node_auth_controller
node_user_routes -->|"dispatches"| node_user_controller
node_attempt_routes -->|"dispatches"| node_attempt_controller
node_subject_routes -->|"dispatches"| node_subject_controller
node_quiz_routes -->|"protects routes"| node_auth_middleware
node_user_routes -->|"protects routes"| node_auth_middleware
node_subject_routes -->|"protects routes"| node_auth_middleware
node_quiz_controller -->|"reads and writes"| node_quiz_model

click node_app "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/api/axiosConfig.js"
click node_teacher_home "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/teacher/TeacherHome.jsx"
click node_quiz_details "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/teacher/CreateQuizDetails.jsx"
click node_quiz_questions "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/teacher/AddQuizQuestions.jsx"
click node_quiz_edit "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/teacher/EditQuizDetails.jsx"
click node_question_modal "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/components/EditQuestionModal.jsx"
click node_repository "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/Repository.jsx"
click node_student_join "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/student/StudentJoinQuiz.jsx"
click node_student_attempt "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/student/StudentAttemptQuiz.jsx"
click node_student_results "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/student/StudentQuizResults.jsx"
click node_landing "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/LandingPage.jsx"
click node_auth_context "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/context/AuthContext.jsx"
click node_login "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/auth/Login.jsx"
click node_register "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/auth/Register.jsx"
click node_profile "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/Profile.jsx"
click node_student_profile "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/StudentProfileView.jsx"
click node_teacher_profile "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/TeacherProfileView.jsx"
click node_subjects_modal "https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/components/SubjectsModal.jsx"
click node_server "https://github.com/jlakkineni25/quizzify/blob/main/backend/server.js"
click node_quiz_routes "https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/quizRoutes.js"
click node_auth_routes "https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/authRoutes.js"
click node_user_routes "https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/userRoutes.js"
click node_attempt_routes "https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/attemptRoutes.js"
click node_subject_routes "https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/subjectRoutes.js"
click node_auth_middleware "https://github.com/jlakkineni25/quizzify/blob/main/backend/middleware/authMiddleware.js"
click node_quiz_controller "https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/quizController.js"
click node_auth_controller "https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/authController.js"
click node_user_controller "https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/userController.js"
click node_attempt_controller "https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/attemptController.js"
click node_subject_controller "https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/subjectController.js"
click node_quiz_model "https://github.com/jlakkineni25/quizzify/blob/main/backend/models/Quiz.js"

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_app,node_api_client,node_landing toneBlue
class node_auth_context,node_login,node_register,node_profile,node_student_profile,node_teacher_profile toneAmber
class node_teacher_home,node_quiz_details,node_quiz_questions,node_quiz_edit,node_question_modal,node_repository,node_student_join,node_student_attempt,node_student_results,node_subjects_modal toneMint
class node_server,node_quiz_routes,node_auth_routes,node_user_routes,node_attempt_routes,node_subject_routes,node_auth_middleware,node_quiz_controller,node_auth_controller,node_user_controller,node_attempt_controller,node_subject_controller toneRose
class node_quiz_model,node_teacher,node_student toneIndigo
```

## Components

### React client

- [Routes and pages](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/api/axiosConfig.js): `frontend/src/api/axiosConfig.js`
- [Landing page](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/LandingPage.jsx): `frontend/src/pages/LandingPage.jsx`

### Identity and profiles

- [Session context](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Login](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/auth/Login.jsx): `frontend/src/pages/auth/Login.jsx`
- [Registration](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/auth/Register.jsx): `frontend/src/pages/auth/Register.jsx`
- [Profile](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`
- [Student profile](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/StudentProfileView.jsx): `frontend/src/pages/StudentProfileView.jsx`
- [Teacher profile](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/TeacherProfileView.jsx): `frontend/src/pages/TeacherProfileView.jsx`

### Quiz workflows

- [Teacher dashboard](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/teacher/TeacherHome.jsx): `frontend/src/pages/teacher/TeacherHome.jsx`
- [Quiz details](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/teacher/CreateQuizDetails.jsx): `frontend/src/pages/teacher/CreateQuizDetails.jsx`
- [Question authoring](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/teacher/AddQuizQuestions.jsx): `frontend/src/pages/teacher/AddQuizQuestions.jsx`
- [Quiz editing](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/teacher/EditQuizDetails.jsx): `frontend/src/pages/teacher/EditQuizDetails.jsx`
- [Question editor](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/components/EditQuestionModal.jsx): `frontend/src/components/EditQuestionModal.jsx`
- [Quiz repository](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/Repository.jsx): `frontend/src/pages/Repository.jsx`
- [Quiz join](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/student/StudentJoinQuiz.jsx): `frontend/src/pages/student/StudentJoinQuiz.jsx`
- [Quiz attempt](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/student/StudentAttemptQuiz.jsx): `frontend/src/pages/student/StudentAttemptQuiz.jsx`
- [Attempt results](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/pages/student/StudentQuizResults.jsx): `frontend/src/pages/student/StudentQuizResults.jsx`
- [Subject manager](https://github.com/jlakkineni25/quizzify/blob/main/frontend/src/components/SubjectsModal.jsx): `frontend/src/components/SubjectsModal.jsx`

### API and access

- [Express server](https://github.com/jlakkineni25/quizzify/blob/main/backend/server.js): `backend/server.js`
- [Quiz routes](https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/quizRoutes.js): `backend/routes/quizRoutes.js`
- [Auth routes](https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [User routes](https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/userRoutes.js): `backend/routes/userRoutes.js`
- [Attempt routes](https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/attemptRoutes.js): `backend/routes/attemptRoutes.js`
- [Subject routes](https://github.com/jlakkineni25/quizzify/blob/main/backend/routes/subjectRoutes.js): `backend/routes/subjectRoutes.js`
- [JWT protection](https://github.com/jlakkineni25/quizzify/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`
- [Quiz operations](https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/quizController.js): `backend/controllers/quizController.js`
- [Authentication](https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [User profiles](https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/userController.js): `backend/controllers/userController.js`
- [Attempt history](https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/attemptController.js): `backend/controllers/attemptController.js`
- [Subject operations](https://github.com/jlakkineni25/quizzify/blob/main/backend/controllers/subjectController.js): `backend/controllers/subjectController.js`

### Persistent data

- [Quiz records](https://github.com/jlakkineni25/quizzify/blob/main/backend/models/Quiz.js): `backend/models/Quiz.js`

### Other components

- **Teacher**
- **Student**

## Connections

- Routes and pages → Landing page: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Login: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Registration: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Teacher dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Quiz details: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Question authoring: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Quiz editing: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Quiz repository: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Quiz join: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Quiz attempt: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Attempt results: routes to (evidence: `frontend/src/App.jsx`)
- Routes and pages → Profile: routes to (evidence: `frontend/src/App.jsx`)
- Teacher → Teacher dashboard: uses
- Teacher → Quiz details: creates
- Teacher → Question authoring: authors
- Teacher → Quiz editing: manages
- Student → Quiz repository: browses
- Student → Quiz join: joins
- Student → Quiz attempt: takes
- Quiz editing → Question editor: uses (evidence: `frontend/src/components/EditQuestionModal.jsx`)
- Teacher dashboard → Subject manager: uses (evidence: `frontend/src/pages/teacher/TeacherHome.jsx`)
- Quiz repository → API client: requests repository (evidence: `frontend/src/pages/Repository.jsx`)
- Quiz details → API client: sends quiz data (evidence: `frontend/src/pages/teacher/CreateQuizDetails.jsx`)
- Question authoring → API client: sends questions (evidence: `frontend/src/pages/teacher/AddQuizQuestions.jsx`)
- Quiz attempt → API client: submits attempt (evidence: `frontend/src/pages/student/StudentAttemptQuiz.jsx`)
- Login → API client: requests login (evidence: `frontend/src/pages/auth/Login.jsx`)
- Registration → API client: requests registration (evidence: `frontend/src/pages/auth/Register.jsx`)
- Login → Session context: sets session (evidence: `frontend/src/pages/auth/Login.jsx`)
- Profile → Session context: reads session (evidence: `frontend/src/pages/Profile.jsx`)
- Profile → Student profile: renders role view (evidence: `frontend/src/pages/Profile.jsx`)
- Profile → Teacher profile: renders role view (evidence: `frontend/src/pages/Profile.jsx`)
- Student profile → API client: requests profile data (evidence: `frontend/src/pages/StudentProfileView.jsx`)
- Teacher profile → API client: requests profile data (evidence: `frontend/src/pages/TeacherProfileView.jsx`)
- API client → Express server: sends HTTP requests
- Express server → Quiz routes: mounts (evidence: `backend/server.js`)
- Express server → Auth routes: mounts (evidence: `backend/server.js`)
- Express server → User routes: mounts (evidence: `backend/server.js`)
- Express server → Attempt routes: mounts (evidence: `backend/server.js`)
- Express server → Subject routes: mounts (evidence: `backend/server.js`)
- Quiz routes → Quiz operations: dispatches (evidence: `backend/routes/quizRoutes.js`)
- Auth routes → Authentication: dispatches (evidence: `backend/routes/authRoutes.js`)
- User routes → User profiles: dispatches (evidence: `backend/routes/userRoutes.js`)
- Attempt routes → Attempt history: dispatches (evidence: `backend/routes/attemptRoutes.js`)
- Subject routes → Subject operations: dispatches (evidence: `backend/routes/subjectRoutes.js`)
- Quiz routes → JWT protection: protects routes (evidence: `backend/routes/quizRoutes.js`)
- User routes → JWT protection: protects routes (evidence: `backend/routes/userRoutes.js`)
- Subject routes → JWT protection: protects routes (evidence: `backend/routes/subjectRoutes.js`)
- Quiz operations → Quiz records: reads and writes (evidence: `backend/controllers/quizController.js`)
