# karan95427/quiznet-django architecture

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

- Interactive diagram: https://gitdiagram.com/karan95427/quiznet-django
- Repository: https://github.com/karan95427/quiznet-django

## Overview

Quiznet-Django is a personalized quiz web app. A user submits a topic and difficulty; the quiz view requests generated questions, saves a quiz and its questions, accepts answers, records results, and uses response history to suggest future topics and difficulty. Separate views expose saved quizzes and performance charts. The README also documents multiple question formats and Allauth authentication. The excerpts show the main view-to-model and URL routing behavior; authentication, templates, and chart rendering are included at the subsystem level where implementation details were not sampled.

Main entry points: [`aiquiz/models.py`](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/models.py) (Quiz records), [`aiquiz/urls.py`](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/urls.py) (Application routes), [`aiquiz/views.py`](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py) (Quiz workflow), [`aiquiz/templates`](https://github.com/karan95427/quiznet-django/tree/main/aiquiz/templates) (Quiz interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_routing["Application routes<br/>[urls.py]"]
  node_templates["Quiz interface"]
end

subgraph group_quiz["Quiz lifecycle"]
  node_quizview["Quiz workflow<br/>[views.py]"]
  node_generator["Gemini generation<br/>[views.py]"]
  node_quizdata[("Quiz records<br/>[models.py]")]
  node_response["Answer processing<br/>[views.py]"]
end

subgraph group_insights["History and analytics"]
  node_history["Quiz history<br/>[views.py]"]
  node_analytics["Performance charts<br/>[views.py]"]
  node_chartui["Chart display<br/>[score_chart.html]"]
end

subgraph group_identity["Authentication"]
  node_auth["Account management"]
  node_allauth["Django Allauth"]
end

node_user(("Quiz taker"))
node_gemini{{"Gemini API"}}
node_database[("SQLite database")]

node_user -->|"requests pages"| node_routing
node_routing -->|"routes quiz"| node_quizview
node_quizview -->|"generates questions"| node_generator
node_generator -.->|"requests generation"| node_gemini
node_quizview -->|"creates quiz"| node_quizdata
node_response -->|"saves answers"| node_quizdata
node_quizview -->|"renders quiz"| node_templates
node_response -->|"renders results"| node_templates
node_routing -->|"routes history"| node_history
node_history -->|"reads quizzes"| node_quizdata
node_history -.->|"renders history"| node_templates
node_routing -->|"routes charts"| node_analytics
node_analytics -->|"reads results"| node_quizdata
node_analytics -.->|"renders chart"| node_chartui
node_user -->|"signs in"| node_auth
node_auth -->|"uses authentication"| node_allauth
node_quizdata -->|"persists records"| node_database

click node_routing "https://github.com/karan95427/quiznet-django/blob/main/aiquiz/urls.py"
click node_quizview "https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py"
click node_generator "https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py"
click node_quizdata "https://github.com/karan95427/quiznet-django/blob/main/aiquiz/models.py"
click node_response "https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py"
click node_templates "https://github.com/karan95427/quiznet-django/tree/main/aiquiz/templates"
click node_history "https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py"
click node_analytics "https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py"
click node_chartui "https://github.com/karan95427/quiznet-django/blob/main/aiquiz/templates/aiquiz/score_chart.html"
click node_auth "https://github.com/karan95427/quiznet-django/tree/main/aiquiz/templates/account"

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_routing,node_templates toneBlue
class node_quizview,node_generator,node_quizdata,node_response,node_database toneAmber
class node_history,node_analytics,node_chartui,node_gemini toneMint
class node_auth,node_allauth toneRose
class node_user toneIndigo
```

## Components

### Web application

- [Application routes](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/urls.py): `aiquiz/urls.py`
- [Quiz interface](https://github.com/karan95427/quiznet-django/tree/main/aiquiz/templates): `aiquiz/templates`

### Quiz lifecycle

- [Quiz workflow](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py): `aiquiz/views.py`
- [Gemini generation](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py): `aiquiz/views.py`
- [Quiz records](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/models.py): `aiquiz/models.py`
- [Answer processing](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py): `aiquiz/views.py`

### History and analytics

- [Quiz history](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py): `aiquiz/views.py`
- [Performance charts](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/views.py): `aiquiz/views.py`
- [Chart display](https://github.com/karan95427/quiznet-django/blob/main/aiquiz/templates/aiquiz/score_chart.html): `aiquiz/templates/aiquiz/score_chart.html`

### Authentication

- [Account management](https://github.com/karan95427/quiznet-django/tree/main/aiquiz/templates/account): `aiquiz/templates/account`
- **Django Allauth**

### Other components

- **Quiz taker**
- **Gemini API**
- **SQLite database**

## Connections

- Quiz taker → Application routes: requests pages (evidence: `README.md`)
- Application routes → Quiz workflow: routes quiz (evidence: `aiquiz/urls.py`)
- Quiz workflow → Gemini generation: generates questions (evidence: `aiquiz/views.py`)
- Gemini generation → Gemini API: requests generation
- Quiz workflow → Quiz records: creates quiz (evidence: `aiquiz/views.py`)
- Answer processing → Quiz records: saves answers (evidence: `aiquiz/views.py`)
- Quiz workflow → Quiz interface: renders quiz (evidence: `aiquiz/views.py`)
- Answer processing → Quiz interface: renders results (evidence: `aiquiz/views.py`)
- Application routes → Quiz history: routes history (evidence: `aiquiz/urls.py`)
- Quiz history → Quiz records: reads quizzes (evidence: `aiquiz/views.py`)
- Quiz history → Quiz interface: renders history
- Application routes → Performance charts: routes charts (evidence: `aiquiz/urls.py`)
- Performance charts → Quiz records: reads results (evidence: `aiquiz/views.py`)
- Performance charts → Chart display: renders chart
- Quiz taker → Account management: signs in (evidence: `README.md`)
- Account management → Django Allauth: uses authentication
- Quiz records → SQLite database: persists records
