# priyanka-ochaney13/quizz architecture

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

- Interactive diagram: https://gitdiagram.com/priyanka-ochaney13/quizz
- Repository: https://github.com/priyanka-ochaney13/quizz

## Overview

##### Project type and purpose
- This is a monolithic, full-stack Django web application (“Quizz”) that provides online quizzes.
- The README link indicates a quiz platform with user accounts, quiz creation and taking functionality, and leaderboards.

##### File structure
- Top-level:
- manage.py – Django management CLI
- django_quiz/ – project configuration (settings.py, urls.py, wsgi.py, asgi.py)
- account/, base/, quiz/ – three Django “apps” each with models.py, views.py, urls.py, admin.py, tests.py, and migrations.
- templates/ – HTML templates organized with a components subfolder.
- static/ – CSS and images for UI styling.
- media/ – uploaded profile images and Excel question banks.
- requirements.txt – dependencies list.

- Architectural choice: classic Django MTV (Model-Template-View) pattern, single codebase. No microservices or external API layers beyond the browser and database.

##### Key insights from README
- While the README only shows a GitHub-assets link, the repository name and file structure confirm a Django-based quiz engine supporting user registration, admin interfaces, dynamic templating, and media uploads.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        direction TB
        Browser["Web Client (Browser)"]:::frontend
        Templates["Templates"]:::frontend
        Navbar["navbar.html"]:::frontend
        Footer["footer.html"]:::frontend
        CSS["style.css"]:::frontend
        Images["Images"]:::frontend
    end

    %% Application Layer
    subgraph "Application Layer"
        direction TB
        DjangoServer["Django Web Server"]:::backend
        subgraph "URL Routing & Handlers"
            direction TB
            URLRouter["URL Dispatcher"]:::backend
            StaticHandler["Static File Handler"]:::backend
            MediaHandler["Media File Handler"]:::backend
            TemplateEngine["Template Engine"]:::backend
        end
        subgraph "Django Apps"
            direction TB
            subgraph "Account App"
                AccountViews["account/views.py"]:::backend
                AccountModels["account/models.py"]:::backend
                AccountAdmin["account/admin.py"]:::backend
                AccountURLs["account/urls.py"]:::backend
            end
            subgraph "Base App"
                BaseViews["base/views.py"]:::backend
                BaseModels["base/models.py"]:::backend
                BaseAdmin["base/admin.py"]:::backend
                BaseURLs["base/urls.py"]:::backend
            end
            subgraph "Quiz App"
                QuizViews["quiz/views.py"]:::backend
                QuizModels["quiz/models.py"]:::backend
                QuizAdmin["quiz/admin.py"]:::backend
                QuizURLs["quiz/urls.py"]:::backend
            end
        end
        ORM["Django ORM"]:::backend
        AdminInterface["Admin Interface (/admin)"]:::backend
        CoreConfig["Core Config & Entry"]:::backend
    end

    %% Data Layer
    subgraph "Data Layer"
        direction TB
        Database["Database"]:::datastore
        MediaStorage["Media Storage"]:::datastore
        Migrations["Migrations"]:::datastore
        Requirements["requirements.txt"]:::datastore
    end

    %% Core Config Files
    manage["manage.py"]:::backend
    Settings["settings.py"]:::backend
    ASGI["asgi.py"]:::backend
    WSGI["wsgi.py"]:::backend

    %% Connections Presentation -> Application
    Browser -->|"HTTP Request"| URLRouter
    URLRouter -->|routes to| AccountURLs
    URLRouter -->|routes to| BaseURLs
    URLRouter -->|routes to| QuizURLs

    %% URLs to Views
    AccountURLs -->|calls| AccountViews
    BaseURLs -->|calls| BaseViews
    QuizURLs -->|calls| QuizViews

    %% Views -> ORM & Templates
    AccountViews -->|ORM Query/Save| ORM
    BaseViews -->|ORM Query/Save| ORM
    QuizViews -->|ORM Query/Save| ORM
    AccountViews -->|render| TemplateEngine
    BaseViews -->|render| TemplateEngine
    QuizViews -->|render| TemplateEngine

    %% Template & Static Serving
    TemplateEngine -->|HTML Response| Browser
    Browser -->|GET CSS/Images| StaticHandler
    StaticHandler -->|serve| CSS
    StaticHandler -->|serve| Images
    Browser -->|GET Templates| Templates

    Browser -->|GET Media| MediaHandler
    MediaHandler -->|serve| MediaStorage

    %% Admin Interface
    AdminInterface -->|uses| AccountModels
    AdminInterface -->|uses| BaseModels
    AdminInterface -->|uses| QuizModels
    AdminInterface -->|via| URLRouter

    %% Core Config & ORM
    CoreConfig -->|loads| Settings
    CoreConfig -->|starts| ASGI
    CoreConfig -->|starts| WSGI
    Settings -->|configures| ORM
    ORM -->|connects| Database
    Migrations -->|manage| Database

    %% Media Storage and Migrations
    Migrations -->|folder| Migrations
    MediaStorage -->|"profile_images & quiz excels"| MediaStorage

    %% Excel Imports
    MediaStorage -->|import .xlsx| QuizModels

    %% Click Events
    click Templates "https://github.com/priyanka-ochaney13/quizz/tree/main/templates/"
    click Navbar "https://github.com/priyanka-ochaney13/quizz/blob/main/templates/components/navbar.html"
    click Footer "https://github.com/priyanka-ochaney13/quizz/blob/main/templates/components/footer.html"
    click CSS "https://github.com/priyanka-ochaney13/quizz/blob/main/static/css/style.css"
    click Images "https://github.com/priyanka-ochaney13/quizz/tree/main/static/images/"
    click URLRouter "https://github.com/priyanka-ochaney13/quizz/blob/main/django_quiz/urls.py"
    click AccountURLs "https://github.com/priyanka-ochaney13/quizz/blob/main/account/urls.py"
    click BaseURLs "https://github.com/priyanka-ochaney13/quizz/blob/main/base/urls.py"
    click QuizURLs "https://github.com/priyanka-ochaney13/quizz/blob/main/quiz/urls.py"
    click AccountViews "https://github.com/priyanka-ochaney13/quizz/blob/main/account/views.py"
    click BaseViews "https://github.com/priyanka-ochaney13/quizz/blob/main/base/views.py"
    click QuizViews "https://github.com/priyanka-ochaney13/quizz/blob/main/quiz/views.py"
    click AccountModels "https://github.com/priyanka-ochaney13/quizz/blob/main/account/models.py"
    click BaseModels "https://github.com/priyanka-ochaney13/quizz/blob/main/base/models.py"
    click QuizModels "https://github.com/priyanka-ochaney13/quizz/blob/main/quiz/models.py"
    click AccountAdmin "https://github.com/priyanka-ochaney13/quizz/blob/main/account/admin.py"
    click BaseAdmin "https://github.com/priyanka-ochaney13/quizz/blob/main/base/admin.py"
    click QuizAdmin "https://github.com/priyanka-ochaney13/quizz/blob/main/quiz/admin.py"
    click manage "https://github.com/priyanka-ochaney13/quizz/blob/main/manage.py"
    click Settings "https://github.com/priyanka-ochaney13/quizz/blob/main/django_quiz/settings.py"
    click ASGI "https://github.com/priyanka-ochaney13/quizz/blob/main/django_quiz/asgi.py"
    click WSGI "https://github.com/priyanka-ochaney13/quizz/blob/main/django_quiz/wsgi.py"
    click Requirements "https://github.com/priyanka-ochaney13/quizz/blob/main/requirements.txt"
    click Migrations "https://github.com/priyanka-ochaney13/quizz/tree/main/account/migrations/"
    click Migrations "https://github.com/priyanka-ochaney13/quizz/tree/main/base/migrations/"
    click Migrations "https://github.com/priyanka-ochaney13/quizz/tree/main/quiz/migrations/"
    click MediaStorage "https://github.com/priyanka-ochaney13/quizz/tree/main/media/profile_images/"
    click MediaStorage "https://github.com/priyanka-ochaney13/quizz/blob/main/media/quiz/dsa_questions.xlsx"
    click MediaStorage "https://github.com/priyanka-ochaney13/quizz/blob/main/media/quiz/math_questions.xlsx"
    click MediaStorage "https://github.com/priyanka-ochaney13/quizz/blob/main/media/quiz/ml-basics_questions.xlsx"

    %% Styles
    classDef frontend fill:#E3F2FD,stroke:#2196F3,stroke-width:2px
    classDef backend fill:#E8F5E9,stroke:#4CAF50,stroke-width:2px
    classDef datastore fill:#FFF3E0,stroke:#FB8C00,stroke-width:2px
```
