# abbasmuazam6-create/mcq-hub architecture

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

- Interactive diagram: https://gitdiagram.com/abbasmuazam6-create/mcq-hub
- Repository: https://github.com/abbasmuazam6-create/mcq-hub

## Overview

MCQ Hub is a static, Firebase-backed learning and question-bank application. Students authenticate, browse a hierarchical syllabus, practice or assemble tests, then review results and learning records; staff maintain syllabus and questions, import spreadsheets, and manage users and learning resources. The graph separates student learning, staff content operations, and shared browser data services. README descriptions establish several feature flows whose individual view implementations were not sampled; source-level links are included only where the excerpts or source index support them.

Main entry points: [`public/js/admin.js`](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin.js) (Admin app entry), [`public/js/core/firebase.js`](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/firebase.js) (Firebase client setup), [`public/js/views/quiz.js`](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/quiz.js) (Practice and tests), [`public/js/admin/views/bank.js`](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/bank.js) (Question bank)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Student learning"]
  node_app_entry["Student app entry<br/>[apps.js]"]
  node_home["Home and dashboard<br/>[home.js]"]
  node_browse["Syllabus browsing<br/>[browse.js]"]
  node_chapter["Chapter study<br/>[chapter.js]"]
  node_quiz["Practice and tests<br/>[quiz.js]"]
  node_custom["Custom tests<br/>[custom.js]"]
  node_results["Results review<br/>[result.js]"]
  node_learning_records["History and learning records<br/>[history.js]"]
end

subgraph group_content["Staff content operations"]
  node_admin_entry["Admin app entry<br/>[admin.js]"]
  node_admin_dashboard["Staff dashboard<br/>[dash.js]"]
  node_syllabus_admin["Syllabus management<br/>[nodes.js]"]
  node_node_dialog["Syllabus edit dialog<br/>[NodeEditDialog.js]"]
  node_question_bank["Question bank<br/>[bank.js]"]
  node_question_config["Question editing<br/>[questions.js]"]
  node_spreadsheet_import["Spreadsheet import<br/>[import.js]"]
  node_resource_admin["Materials and videos<br/>[materials.js]"]
  node_user_admin["User management<br/>[users.js]"]
  node_table["Admin data table<br/>[DataTable.js]"]
  node_picker["Syllabus picker<br/>[picker.js]"]
end

subgraph group_services["Shared browser services"]
  node_router["Hash router<br/>[router.js]"]
  node_store["Cached data store<br/>[store.js]"]
  node_counts["Question counts<br/>[counts.js]"]
  node_mcq["MCQ processing<br/>[mcq.js]"]
  node_graphs["Syllabus graph helpers<br/>[graphs.js]"]
  node_stats["Learner statistics<br/>[stats.js]"]
  node_cache["Syllabus cache version<br/>[cache.js]"]
  node_common["Authentication and shared helpers<br/>[common.js]"]
end

subgraph group_platform["Firebase platform"]
  node_firebase_client["Firebase client setup<br/>[firebase.js]"]
  node_auth_service["Firebase Authentication"]
  node_firestore[("Cloud Firestore")]
end

node_student(("Student"))
node_staff(("Teacher or admin"))
node_spreadsheet["Excel or CSV file"]

node_student -->|"opens app"| node_app_entry
node_app_entry -->|"uses home view"| node_home
node_app_entry -.->|"routes views"| node_router
node_student -->|"browses syllabus"| node_browse
node_browse -.->|"opens chapter"| node_chapter
node_student -->|"practices"| node_quiz
node_student -->|"builds test"| node_custom
node_quiz -->|"shows result"| node_results
node_results -->|"saves history"| node_learning_records
node_admin_entry -->|"routes staff"| node_admin_dashboard
node_staff -->|"opens panel"| node_admin_entry
node_admin_entry -->|"routes syllabus"| node_syllabus_admin
node_admin_entry -->|"routes bank"| node_question_bank
node_admin_entry -->|"routes users"| node_user_admin
node_staff -->|"imports questions"| node_spreadsheet_import
node_spreadsheet -->|"uploads rows"| node_spreadsheet_import
node_staff -->|"manages resources"| node_resource_admin
node_syllabus_admin -->|"uses table"| node_table
node_question_bank -->|"uses table"| node_table
node_question_bank -->|"builds config"| node_question_config
node_question_bank -->|"mounts picker"| node_picker
node_syllabus_admin -->|"opens editor"| node_node_dialog
node_question_config -->|"parses questions"| node_mcq
node_picker -->|"loads counts"| node_counts
node_picker -->|"reads nodes"| node_store
node_node_dialog -->|"bumps version"| node_cache
node_node_dialog -->|"refreshes syllabus"| node_store
node_app_entry -->|"uses helpers"| node_common
node_admin_entry -->|"uses helpers"| node_common
node_home -->|"loads statistics"| node_stats
node_quiz -->|"updates statistics"| node_stats
node_quiz -->|"loads questions"| node_store
node_store -->|"queries through"| node_firebase_client
node_counts -->|"counts through"| node_firebase_client
node_stats -->|"reads through"| node_firebase_client
node_common -->|"auth and reads"| node_firebase_client
node_firebase_client -->|"initializes"| node_auth_service
node_firebase_client -->|"initializes"| node_firestore
node_student -->|"signs in"| node_auth_service
node_question_bank -.->|"writes questions"| node_firestore
node_syllabus_admin -.->|"writes syllabus"| node_firestore
node_spreadsheet_import -->|"imports batch"| node_firestore
node_quiz -->|"saves results"| node_firestore
node_home -.->|"uses helpers"| node_graphs

click node_app_entry "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/apps.js"
click node_home "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/home.js"
click node_browse "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/browse.js"
click node_chapter "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/chapter.js"
click node_quiz "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/quiz.js"
click node_custom "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/custom.js"
click node_results "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/result.js"
click node_learning_records "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/history.js"
click node_admin_entry "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin.js"
click node_admin_dashboard "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/dash.js"
click node_syllabus_admin "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/configs/nodes.js"
click node_node_dialog "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/nodes/NodeEditDialog.js"
click node_question_bank "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/bank.js"
click node_question_config "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/configs/questions.js"
click node_spreadsheet_import "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/import.js"
click node_resource_admin "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/materials.js"
click node_user_admin "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/users.js"
click node_table "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/DataTable.js"
click node_picker "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/picker.js"
click node_router "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/router.js"
click node_store "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/store.js"
click node_counts "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/counts.js"
click node_mcq "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/mcq.js"
click node_graphs "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/graphs.js"
click node_stats "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/stats.js"
click node_cache "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/cache.js"
click node_common "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/common.js"
click node_firebase_client "https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/firebase.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_entry,node_home,node_browse,node_chapter,node_quiz,node_custom,node_results,node_learning_records toneBlue
class node_admin_entry,node_admin_dashboard,node_syllabus_admin,node_node_dialog,node_question_bank,node_question_config,node_spreadsheet_import,node_resource_admin,node_user_admin,node_table,node_picker toneAmber
class node_router,node_store,node_counts,node_mcq,node_graphs,node_stats,node_cache,node_common toneMint
class node_firebase_client,node_auth_service,node_firestore toneRose
class node_student,node_staff,node_spreadsheet toneIndigo
```

## Components

### Student learning

- [Student app entry](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/apps.js): `public/js/apps.js`
- [Home and dashboard](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/home.js): `public/js/views/home.js`
- [Syllabus browsing](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/browse.js): `public/js/views/browse.js`
- [Chapter study](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/chapter.js): `public/js/views/chapter.js`
- [Practice and tests](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/quiz.js): `public/js/views/quiz.js`
- [Custom tests](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/custom.js): `public/js/views/custom.js`
- [Results review](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/result.js): `public/js/views/result.js`
- [History and learning records](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/views/history.js): `public/js/views/history.js`

### Staff content operations

- [Admin app entry](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin.js): `public/js/admin.js`
- [Staff dashboard](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/dash.js): `public/js/admin/views/dash.js`
- [Syllabus management](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/configs/nodes.js): `public/js/admin/configs/nodes.js`
- [Syllabus edit dialog](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/nodes/NodeEditDialog.js): `public/js/admin/nodes/NodeEditDialog.js`
- [Question bank](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/bank.js): `public/js/admin/views/bank.js`
- [Question editing](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/configs/questions.js): `public/js/admin/configs/questions.js`
- [Spreadsheet import](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/import.js): `public/js/admin/views/import.js`
- [Materials and videos](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/materials.js): `public/js/admin/views/materials.js`
- [User management](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/views/users.js): `public/js/admin/views/users.js`
- [Admin data table](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/DataTable.js): `public/js/admin/DataTable.js`
- [Syllabus picker](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/admin/picker.js): `public/js/admin/picker.js`

### Shared browser services

- [Hash router](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/router.js): `public/js/core/router.js`
- [Cached data store](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/store.js): `public/js/core/store.js`
- [Question counts](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/counts.js): `public/js/core/counts.js`
- [MCQ processing](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/mcq.js): `public/js/core/mcq.js`
- [Syllabus graph helpers](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/graphs.js): `public/js/core/graphs.js`
- [Learner statistics](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/stats.js): `public/js/core/stats.js`
- [Syllabus cache version](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/cache.js): `public/js/core/cache.js`
- [Authentication and shared helpers](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/common.js): `public/js/common.js`

### Firebase platform

- [Firebase client setup](https://github.com/abbasmuazam6-create/mcq-hub/blob/main/public/js/core/firebase.js): `public/js/core/firebase.js`
- **Firebase Authentication**
- **Cloud Firestore**

### Other components

- **Student**
- **Teacher or admin**
- **Excel or CSV file**

## Connections

- Student → Student app entry: opens app (evidence: `README.md`)
- Student app entry → Home and dashboard: uses home view (evidence: `public/js/apps.js`)
- Student app entry → Hash router: routes views
- Student → Syllabus browsing: browses syllabus (evidence: `README.md`)
- Syllabus browsing → Chapter study: opens chapter
- Student → Practice and tests: practices (evidence: `README.md`)
- Student → Custom tests: builds test (evidence: `README.md`)
- Practice and tests → Results review: shows result (evidence: `README.md`)
- Results review → History and learning records: saves history (evidence: `README.md`)
- Admin app entry → Staff dashboard: routes staff (evidence: `public/js/admin.js`)
- Teacher or admin → Admin app entry: opens panel (evidence: `README.md`)
- Admin app entry → Syllabus management: routes syllabus (evidence: `public/js/admin.js`)
- Admin app entry → Question bank: routes bank (evidence: `public/js/admin.js`)
- Admin app entry → User management: routes users (evidence: `public/js/admin.js`)
- Teacher or admin → Spreadsheet import: imports questions (evidence: `README.md`)
- Excel or CSV file → Spreadsheet import: uploads rows (evidence: `README.md`)
- Teacher or admin → Materials and videos: manages resources (evidence: `README.md`)
- Syllabus management → Admin data table: uses table (evidence: `public/js/admin/views/syllabus.js`)
- Question bank → Admin data table: uses table (evidence: `public/js/admin/views/bank.js`)
- Question bank → Question editing: builds config (evidence: `public/js/admin/views/bank.js`)
- Question bank → Syllabus picker: mounts picker (evidence: `public/js/admin/views/bank.js`)
- Syllabus management → Syllabus edit dialog: opens editor (evidence: `public/js/admin/configs/nodes.js`)
- Question editing → MCQ processing: parses questions (evidence: `public/js/admin/configs/questions.js`)
- Syllabus picker → Question counts: loads counts (evidence: `public/js/admin/picker.js`)
- Syllabus picker → Cached data store: reads nodes (evidence: `public/js/admin/picker.js`)
- Syllabus edit dialog → Syllabus cache version: bumps version (evidence: `public/js/admin/nodes/NodeEditDialog.js`)
- Syllabus edit dialog → Cached data store: refreshes syllabus (evidence: `public/js/admin/nodes/NodeEditDialog.js`)
- Student app entry → Authentication and shared helpers: uses helpers (evidence: `public/js/apps.js`)
- Admin app entry → Authentication and shared helpers: uses helpers (evidence: `public/js/admin.js`)
- Home and dashboard → Learner statistics: loads statistics (evidence: `public/js/views/home.js`)
- Practice and tests → Learner statistics: updates statistics (evidence: `public/js/views/quiz.js`)
- Practice and tests → Cached data store: loads questions (evidence: `public/js/views/quiz.js`)
- Cached data store → Firebase client setup: queries through (evidence: `public/js/core/store.js`)
- Question counts → Firebase client setup: counts through (evidence: `public/js/core/counts.js`)
- Learner statistics → Firebase client setup: reads through (evidence: `public/js/core/stats.js`)
- Authentication and shared helpers → Firebase client setup: auth and reads (evidence: `public/js/common.js`)
- Firebase client setup → Firebase Authentication: initializes (evidence: `public/js/core/firebase.js`)
- Firebase client setup → Cloud Firestore: initializes (evidence: `public/js/core/firebase.js`)
- Student → Firebase Authentication: signs in (evidence: `README.md`)
- Question bank → Cloud Firestore: writes questions
- Syllabus management → Cloud Firestore: writes syllabus
- Spreadsheet import → Cloud Firestore: imports batch (evidence: `README.md`)
- Practice and tests → Cloud Firestore: saves results (evidence: `README.md`)
- Home and dashboard → Syllabus graph helpers: uses helpers
