# khairate89/luhn-isbn-validator architecture

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

- Interactive diagram: https://gitdiagram.com/khairate89/luhn-isbn-validator
- Repository: https://github.com/khairate89/luhn-isbn-validator

## Overview

##### Project type and purpose
- This is a full-stack Django web application (“Luhn & ISBN Validator”) whose purpose is to let users enter credit card numbers or ISBNs, see Luhn checksum calculations, get ISBN validation and correction suggestions, run an error-detection experiment (with graphs), and fetch book data via the Google Books API.

##### File structure
- Top‐level:
- manage.py, check.py (a standalone script or health‐check)
- luhn_project/ – Django project settings, URL conf and WSGI entrypoint
- validator/ – a Django app containing:
· views.py (request handlers)
· forms.py (input validation)
· utils.py (Luhn & ISBN logic)
· templatetags/myfilters.py (custom template filters)
· templates/validator/*.html (UI pages)
- No explicit models or migrations, so likely uses no persistent database or relies on Django’s default.
- No Docker or CI files – deployment probably targets a Python-capable host.

##### README for additional insights
- Confirms Luhn algorithm, ISBN-10/13, correction suggestions, error-detection experiment with graphs, and Google Books API integration.
- Mentions a “fancy animated digital background” (likely frontend CSS/JS).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    Browser["Web Browser\n(CSS/JS/Charts)"]:::frontend

    %% Entry Points
    subgraph "Entry Points"
        Manage["manage.py"]:::backend
        Check["check.py"]:::backend
    end

    %% Web Server Layer
    WSGI["WSGI Host\n(Gunicorn/Django runserver)"]:::backend

    %% Django Project Configuration
    subgraph "Django Project"
        ProjectInit["__init__.py"]:::backend
        Settings["settings.py"]:::backend
        URLConfProject["luhn_project/urls.py"]:::backend
        WSGIEntrypoint["wsgi.py"]:::backend
    end

    %% Validator App
    subgraph "Validator App"
        AppConfig["apps.py"]:::backend
        URLConfApp["validator/urls.py"]:::backend
        Views["views.py"]:::backend
        Forms["forms.py"]:::backend
        Utils["utils.py"]:::backend
        Filters["templatetags/myfilters.py"]:::backend
        subgraph "Templates"
            IndexTemplate["index.html"]:::backend
            ResultTemplate["result.html"]:::backend
        end
    end

    %% External Service
    Google["Google Books API\n(JSON"]:::external

    %% Flow Connections
    Browser -->|"HTTP Request"| WSGI
    WSGI -->|"invoke manage.py or check.py"| Manage
    WSGI -->|"invoke health-check"| Check
    WSGI -->|"dispatch"| URLConfProject
    URLConfProject -->|"include"| URLConfApp
    URLConfApp -->|"route to"| Views
    Views -->|"validate input"| Forms
    Views -->|"compute checksum / experiments"| Utils
    Views -->|"use filters"| Filters
    Views -->|"render"| IndexTemplate
    Views -->|"render"| ResultTemplate
    Views -->|"fetch book data"| Google
    Google -->|"JSON Response"| Views
    IndexTemplate -->|"HTML Response"| Browser
    ResultTemplate -->|"HTML + Chart Config"| Browser

    %% Click Events
    click Manage "https://github.com/khairate89/luhn-isbn-validator/blob/main/manage.py"
    click Check "https://github.com/khairate89/luhn-isbn-validator/blob/main/check.py"
    click Settings "https://github.com/khairate89/luhn-isbn-validator/blob/main/luhn_project/settings.py"
    click URLConfProject "https://github.com/khairate89/luhn-isbn-validator/blob/main/luhn_project/urls.py"
    click WSGIEntrypoint "https://github.com/khairate89/luhn-isbn-validator/blob/main/luhn_project/wsgi.py"
    click ProjectInit "https://github.com/khairate89/luhn-isbn-validator/blob/main/luhn_project/__init__.py"
    click AppConfig "https://github.com/khairate89/luhn-isbn-validator/blob/main/validator/apps.py"
    click URLConfApp "https://github.com/khairate89/luhn-isbn-validator/blob/main/validator/urls.py"
    click Views "https://github.com/khairate89/luhn-isbn-validator/blob/main/validator/views.py"
    click Forms "https://github.com/khairate89/luhn-isbn-validator/blob/main/validator/forms.py"
    click Utils "https://github.com/khairate89/luhn-isbn-validator/blob/main/validator/utils.py"
    click Filters "https://github.com/khairate89/luhn-isbn-validator/blob/main/validator/templatetags/myfilters.py"
    click IndexTemplate "https://github.com/khairate89/luhn-isbn-validator/blob/main/validator/templates/validator/index.html"
    click ResultTemplate "https://github.com/khairate89/luhn-isbn-validator/blob/main/validator/templates/validator/result.html"

    %% Styles
    classDef frontend fill:#D0E6FF,stroke:#0366d6,color:#0366d6,stroke-width:1px;
    classDef backend fill:#E6FFEA,stroke:#22863A,color:#22863A,stroke-width:1px;
    classDef external fill:#FFF5E6,stroke:#D97706,color:#D97706,stroke-width:1px;
```
