# devsidd2006/quiz-master-enhanced architecture

> Architecture diagram of the GitHub repository devsidd2006/quiz-master-enhanced, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devsidd2006/quiz-master-enhanced
- Repository: https://github.com/devsidd2006/quiz-master-enhanced

## Overview

##### Project type and purpose
- Quiz Master is a client-side, multi-page quiz application (index.html, daily-challenges.html, profile.html) that runs entirely in the browser.
- Its purpose is to present interactive quizzes, track user progress (streaks, achievements, badges, statistics), and store data locally via LocalStorage.

##### File structure
- Top-level HTML pages:
- index.html (landing & quiz engine)
- daily-challenges.html (day-specific quiz)
- profile.html (user profile & statistics)
- JavaScript modules (in clear, single‐responsibility files):
- script.js (app bootstrap, routing between pages)
- questions.js (question data + quiz logic)
- streak.js (streak calculation & display)
- achievements.js (achievement rules + UI)
- badges.js (badge assignment + UI)
- profile.js (profile data management + summary)
- Styles and assets:
- styles.css & streak.css (layout, responsive design, dark mode toggle)
- images/ & opening-144757.mp3 (media assets)
- Configuration: none (static files served from any web server or CDN).

##### README for additional insights
- UI is enhanced with animations, transitions, gradient backgrounds, and mobile‐first design.
- Data persistence via LocalStorage (scores, settings, theme choice, streaks).
- Hosted as a static site (e.g., Vercel).

##### Elements
- Server → Browser (file delivery)
- Browser UI → JS Modules (user actions)
- JS Modules ↔ LocalStorage (read/write)
- Blue rectangles for front-end components (HTML/CSS, JS modules)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Server["Static Web Server/CDN"]:::server
    ExternalCDN["External CDNs: Font Awesome & Google Fonts"]:::external
    Browser["Web Browser"]:::browser

    Server -->|GET HTML, CSS, JS, assets| Browser
    Browser -->|load fonts & icons| ExternalCDN

    subgraph "Browser Environment"
        subgraph "Presentation Layer"
            Page1["Landing & Quiz Engine Page"]:::frontend
            Page2["Daily Challenges Page"]:::frontend
            Page3["Profile & Statistics Page"]:::frontend
            Styles["Core Stylesheet (styles.css)"]:::frontend
            SStyles["Streak Stylesheet (streak.css)"]:::frontend
            Media["Media Assets (images/, opening audio)"]:::frontend
        end

        subgraph "Application Logic"
            Script["App Bootstrap & Routing (script.js)"]:::frontend
            subgraph "Quiz Engine Modules"
                QMod["Quiz Data & Logic (questions.js)"]:::frontend
                StMod["Streak Calculation & Display (streak.js)"]:::frontend
                AchMod["Achievement Rules & UI (achievements.js)"]:::frontend
                BadgMod["Badge Assignment & UI (badges.js)"]:::frontend
            end
            ProfMod["Profile Data Management & Summary (profile.js)"]:::frontend
        end

        Storage["LocalStorage"]:::storage
    end

    Page1 -->|user triggers| Script
    Page2 -->|user triggers| Script
    Page3 -->|user triggers| Script
    Styles -->|applies styles| Page1
    Styles -->|applies styles| Page2
    Styles -->|applies styles| Page3
    SStyles -->|applies styles| Page1
    Media -->|loaded by| Browser

    Script -->|routes to| QMod
    Script -->|routes to| ProfMod

    QMod -->|read/write score & questions| Storage
    StMod -->|read/write streak data| Storage
    AchMod -->|read/write achievement data| Storage
    BadgMod -->|read/write badge data| Storage
    ProfMod -->|read/write profile stats| Storage

    classDef server fill:#dddddd,stroke:#999,stroke-width:1px
    classDef browser fill:#f0f8ff,stroke:#6699cc,stroke-width:1px
    classDef frontend fill:#bbdefb,stroke:#1e88e5,stroke-width:1px
    classDef storage fill:#c8e6c9,stroke:#388e3c,stroke-width:1px
    classDef external fill:#ffe0b2,stroke:#fb8c00,stroke-width:1px

    click Page1 "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/index.html"
    click Page2 "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/daily-challenges.html"
    click Page3 "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/profile.html"
    click Script "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/script.js"
    click QMod "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/questions.js"
    click StMod "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/streak.js"
    click SStyles "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/streak.css"
    click AchMod "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/achievements.js"
    click BadgMod "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/badges.js"
    click ProfMod "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/profile.js"
    click Styles "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/styles.css"
    click Media "https://github.com/devsidd2006/quiz-master-enhanced/tree/main/images/"
    click Media "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/images/opening-144757.mp3"
    click Server "https://github.com/devsidd2006/quiz-master-enhanced/blob/main/README.md"
```
