# zahinaizat/jlpt_grammar_app architecture

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

- Interactive diagram: https://gitdiagram.com/zahinaizat/jlpt_grammar_app
- Repository: https://github.com/zahinaizat/jlpt_grammar_app

## Overview

This repository is a JLPT Japanese-grammar study app with a Flask web interface and separate desktop and terminal clients. The main workflow is selecting a learner and quiz filters, answering a question, receiving feedback, and reviewing recorded progress. The web product also documents grammar search, answer history, statistics, notes, mastery guidance, and progress reset. The excerpts show the web app and database relationship, but do not expose its route-level calls; those internal feature connections are therefore represented within the web-app component rather than as guessed edges.

Main entry points: [`database.py`](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/database.py) (Study database access), [`web_app.py`](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/web_app.py) (Web app and study features), [`gui.py`](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/gui.py) (Desktop client), [`main.py`](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/main.py) (Terminal client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web study app"]
  node_webapp["Web app and study features<br/>[web_app.py]"]
  node_templates["Page templates"]
end

subgraph group_clients["Other study clients"]
  node_desktop["Desktop client<br/>[gui.py]"]
  node_terminal["Terminal client<br/>[main.py]"]
  node_terminal25["Terminal client variant"]
  node_terminal28["Terminal client variant"]
end

subgraph group_storage["Study data"]
  node_database["Study database access<br/>[database.py]"]
  node_sqlite[("SQLite study data")]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_webapp
node_webapp -->|"renders pages"| node_templates
node_webapp -->|"uses data helpers"| node_database
node_desktop -->|"uses data helpers"| node_database
node_terminal -->|"uses data helpers"| node_database
node_terminal25 -->|"uses data helpers"| node_database
node_terminal28 -->|"uses data helpers"| node_database
node_learner -.->|"uses"| node_desktop
node_learner -.->|"uses"| node_terminal
node_database -.->|"reads and writes"| node_sqlite

click node_webapp "https://github.com/zahinaizat/jlpt_grammar_app/blob/main/web_app.py"
click node_templates "https://github.com/zahinaizat/jlpt_grammar_app/tree/main/templates"
click node_database "https://github.com/zahinaizat/jlpt_grammar_app/blob/main/database.py"
click node_sqlite "https://github.com/zahinaizat/jlpt_grammar_app/tree/main/data"
click node_desktop "https://github.com/zahinaizat/jlpt_grammar_app/blob/main/gui.py"
click node_terminal "https://github.com/zahinaizat/jlpt_grammar_app/blob/main/main.py"
click node_terminal25 "https://github.com/zahinaizat/jlpt_grammar_app/blob/main/main_backup_step25.py"
click node_terminal28 "https://github.com/zahinaizat/jlpt_grammar_app/blob/main/main_backup_step28.py"

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_webapp,node_templates toneBlue
class node_desktop,node_terminal,node_terminal25,node_terminal28 toneAmber
class node_database,node_sqlite toneMint
class node_learner toneIndigo
```

## Components

### Web study app

- [Web app and study features](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/web_app.py): `web_app.py`
- [Page templates](https://github.com/zahinaizat/jlpt_grammar_app/tree/main/templates): `templates`

### Other study clients

- [Desktop client](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/gui.py): `gui.py`
- [Terminal client](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/main.py): `main.py`
- [Terminal client variant](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/main_backup_step25.py): `main_backup_step25.py`
- [Terminal client variant](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/main_backup_step28.py): `main_backup_step28.py`

### Study data

- [Study database access](https://github.com/zahinaizat/jlpt_grammar_app/blob/main/database.py): `database.py`
- [SQLite study data](https://github.com/zahinaizat/jlpt_grammar_app/tree/main/data): `data`

### Other components

- **Learner**

## Connections

- Learner → Web app and study features: uses (evidence: `README.md`)
- Web app and study features → Page templates: renders pages (evidence: `README.md`)
- Web app and study features → Study database access: uses data helpers (evidence: `web_app.py`)
- Desktop client → Study database access: uses data helpers (evidence: `gui.py`)
- Terminal client → Study database access: uses data helpers (evidence: `main.py`)
- Terminal client variant → Study database access: uses data helpers (evidence: `main_backup_step25.py`)
- Terminal client variant → Study database access: uses data helpers (evidence: `main_backup_step28.py`)
- Learner → Desktop client: uses
- Learner → Terminal client: uses
- Study database access → SQLite study data: reads and writes
