# haiere/raiaminify architecture

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

- Interactive diagram: https://gitdiagram.com/haiere/raiaminify
- Repository: https://github.com/haiere/raiaminify

## Overview

RaiaMinify is a static, client-side minifier. The main workflow is selecting or dropping a file, reading it in the browser, choosing a format-specific minifier, reviewing the result and statistics, then downloading the output. The engines and interface are all in the three-file app; script.js excerpts show file handling, dispatch and download, while README documents the other formats and UI capabilities. Unexcerpted wiring is omitted where it cannot be confirmed.

Main entry points: [`script.js`](https://github.com/haiere/raiaminify/blob/main/script.js) (Format dispatch), [`index.html`](https://github.com/haiere/raiaminify/blob/main/index.html) (Minifier page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Minification workflow"]
  node_file_intake["File intake<br/>[script.js]"]
  node_file_read["File reader<br/>[script.js]"]
  node_dispatch["Format dispatch<br/>[script.js]"]
  node_result_view["Result and stats<br/>[script.js]"]
  node_download["Download output<br/>[script.js]"]
end

subgraph group_engines["Format engines"]
  node_js_engine["JavaScript minifier<br/>[script.js]"]
  node_css_engine["CSS minifier<br/>[script.js]"]
  node_html_engine["HTML minifier<br/>[script.js]"]
  node_json_engine["JSON minifier<br/>[script.js]"]
  node_generic_engine["Generic minifier<br/>[script.js]"]
end

subgraph group_interface["Interface and extras"]
  node_app["Minifier page<br/>[index.html]"]
  node_responsive_ui["Responsive interface<br/>[style.css]"]
  node_faq["FAQ content<br/>[index.html]"]
  node_donation["Donation links<br/>[index.html]"]
end

node_user(("Developer"))
node_donation_service["Buy Me a Coffee"]
node_local_storage[("Browser local storage")]

node_user -->|"opens"| node_app
node_user -->|"selects or drops"| node_file_intake
node_file_intake -->|"passes file"| node_file_read
node_file_read -->|"provides text and name"| node_dispatch
node_dispatch -->|"selects JavaScript"| node_js_engine
node_dispatch -->|"selects CSS"| node_css_engine
node_dispatch -->|"selects HTML"| node_html_engine
node_dispatch -->|"selects JSON"| node_json_engine
node_dispatch -->|"fallback"| node_generic_engine
node_result_view -->|"invokes selected engine"| node_dispatch
node_user -->|"reviews output"| node_result_view
node_user -->|"requests download"| node_download
node_download -->|"saves minified file"| node_user
node_user -->|"opens link"| node_donation
node_donation -.->|"links to"| node_donation_service
node_app -.->|"stores cookie preference"| node_local_storage

click node_app "https://github.com/haiere/raiaminify/blob/main/index.html"
click node_file_intake "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_file_read "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_dispatch "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_js_engine "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_css_engine "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_html_engine "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_json_engine "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_generic_engine "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_result_view "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_download "https://github.com/haiere/raiaminify/blob/main/script.js"
click node_responsive_ui "https://github.com/haiere/raiaminify/blob/main/style.css"
click node_faq "https://github.com/haiere/raiaminify/blob/main/index.html"
click node_donation "https://github.com/haiere/raiaminify/blob/main/index.html"

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_file_intake,node_file_read,node_dispatch,node_result_view,node_download toneBlue
class node_js_engine,node_css_engine,node_html_engine,node_json_engine,node_generic_engine,node_local_storage toneAmber
class node_app,node_responsive_ui,node_faq,node_donation toneMint
class node_user,node_donation_service toneIndigo
```

## Components

### Minification workflow

- [File intake](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`
- [File reader](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`
- [Format dispatch](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`
- [Result and stats](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`
- [Download output](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`

### Format engines

- [JavaScript minifier](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`
- [CSS minifier](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`
- [HTML minifier](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`
- [JSON minifier](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`
- [Generic minifier](https://github.com/haiere/raiaminify/blob/main/script.js): `script.js`

### Interface and extras

- [Minifier page](https://github.com/haiere/raiaminify/blob/main/index.html): `index.html`
- [Responsive interface](https://github.com/haiere/raiaminify/blob/main/style.css): `style.css`
- [FAQ content](https://github.com/haiere/raiaminify/blob/main/index.html): `index.html`
- [Donation links](https://github.com/haiere/raiaminify/blob/main/index.html): `index.html`

### Other components

- **Developer**
- **Buy Me a Coffee**
- **Browser local storage**

## Connections

- Developer → Minifier page: opens
- Developer → File intake: selects or drops
- File intake → File reader: passes file
- File reader → Format dispatch: provides text and name
- Format dispatch → JavaScript minifier: selects JavaScript
- Format dispatch → CSS minifier: selects CSS
- Format dispatch → HTML minifier: selects HTML
- Format dispatch → JSON minifier: selects JSON
- Format dispatch → Generic minifier: fallback
- Result and stats → Format dispatch: invokes selected engine
- Developer → Result and stats: reviews output
- Developer → Download output: requests download
- Download output → Developer: saves minified file
- Developer → Donation links: opens link
- Donation links → Buy Me a Coffee: links to
- Minifier page → Browser local storage: stores cookie preference
