# quitlightfe/word-generator architecture

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

- Interactive diagram: https://gitdiagram.com/quitlightfe/word-generator
- Repository: https://github.com/quitlightfe/word-generator

## Overview

This is a browser-based generator for Russian student-notice documents. A user enters recipient and student details, previews the populated HTML notice, then downloads it as DOCX. The React app owns the form state, date formatting, template substitution, and export flow; the static notice content lives separately. Source excerpts show the app’s calls and bootstrap wiring, but not the internals of the DOCX library.

Main entry points: [`src/App.tsx`](https://github.com/quitlightfe/word-generator/blob/master/src/App.tsx) (Notice form), [`src/main.tsx`](https://github.com/quitlightfe/word-generator/blob/master/src/main.tsx) (React bootstrap), [`src/data/template.ts`](https://github.com/quitlightfe/word-generator/blob/master/src/data/template.ts) (Notice template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_form["Notice form<br/>[App.tsx]"]
end

subgraph group_generation["Document generation"]
  node_template["Notice template<br/>[template.ts]"]
  node_fill["HTML preview<br/>[App.tsx]"]
  node_export["DOCX export<br/>[App.tsx]"]
end

subgraph group_runtime["Browser runtime"]
  node_bootstrap["React bootstrap<br/>[main.tsx]"]
  node_converter["HTML-to-DOCX library"]
  node_browser["Browser download APIs"]
end

node_user(("User"))

node_bootstrap -->|"renders"| node_form
node_user -->|"enters details"| node_form
node_form -->|"reads"| node_template
node_form -->|"fills fields"| node_fill
node_fill -->|"renders preview"| node_form
node_user -->|"requests download"| node_export
node_export -->|"converts HTML"| node_converter
node_export -->|"downloads DOCX"| node_browser

click node_bootstrap "https://github.com/quitlightfe/word-generator/blob/master/src/main.tsx"
click node_form "https://github.com/quitlightfe/word-generator/blob/master/src/App.tsx"
click node_template "https://github.com/quitlightfe/word-generator/blob/master/src/data/template.ts"
click node_fill "https://github.com/quitlightfe/word-generator/blob/master/src/App.tsx"
click node_export "https://github.com/quitlightfe/word-generator/blob/master/src/App.tsx"

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_form,node_user toneBlue
class node_template,node_fill,node_export toneAmber
class node_bootstrap,node_converter,node_browser toneMint
```

## Components

### User interface

- [Notice form](https://github.com/quitlightfe/word-generator/blob/master/src/App.tsx): `src/App.tsx`

### Document generation

- [Notice template](https://github.com/quitlightfe/word-generator/blob/master/src/data/template.ts): `src/data/template.ts`
- [HTML preview](https://github.com/quitlightfe/word-generator/blob/master/src/App.tsx): `src/App.tsx`
- [DOCX export](https://github.com/quitlightfe/word-generator/blob/master/src/App.tsx): `src/App.tsx`

### Browser runtime

- [React bootstrap](https://github.com/quitlightfe/word-generator/blob/master/src/main.tsx): `src/main.tsx`
- **HTML-to-DOCX library**
- **Browser download APIs**

### Other components

- **User**

## Connections

- React bootstrap → Notice form: renders (evidence: `src/main.tsx`)
- User → Notice form: enters details (evidence: `src/App.tsx`)
- Notice form → Notice template: reads (evidence: `src/App.tsx`)
- Notice form → HTML preview: fills fields (evidence: `src/App.tsx`)
- HTML preview → Notice form: renders preview (evidence: `src/App.tsx`)
- User → DOCX export: requests download (evidence: `src/App.tsx`)
- DOCX export → HTML-to-DOCX library: converts HTML (evidence: `src/App.tsx`)
- DOCX export → Browser download APIs: downloads DOCX (evidence: `src/App.tsx`)
