# Ideology Sorter

A single flowchart quiz containing 172 distinct ideology outcomes, 152 reachable questions and 172 complete routes: one placement for every ideology.

## Editorial rules

- Casing, punctuation, and spelling-only differences are deduplicated.
- Clear equivalents are represented once with transparent aliases, including Bordigism/Programma, Damenism/Battaglia, and Orwellianism/English Socialism.
- Genuine subcurrents remain separate. Examples include the two council-communist organizational models, four communization currents, distinct Maoist lines, and multiple Trotskyist currents.
- Jacobinism and Marxism-Leninism-MZT are the canonical display names; Montagnardism and Dengism remain searchable source aliases.
- Questions are compact and neutral, distinguish positions without naming the result in advance, and make both acceptance and rejection ideologically meaningful.

The complete decision graph and ideology metadata live in `app/quiz-data.json`. Route paths are derived at runtime to avoid shipping duplicate data. Static HTML/CSS/JavaScript paints first, then fetches minified quiz data asynchronously. The Tree uses a dense alternating question/arrow grid with two fixed maps, so builds never randomly repack the branches.

Image-heavy indexes and the Tree use generated 360×240 WebP thumbnails. Result pages use generated 960×640 WebP display images instead of loading potentially multi-megabyte source SVGs.

## Local development

Requires Node.js 22.13 or newer.

```sh
npm ci
npm run dev
```

Build and validate:

```sh
npm test
```

Regenerate optimized flag images and the compact public quiz/Tree payloads after changing ideology art or metadata:

```sh
npm run generate:thumbnails
npm run generate:static
```

## License and attribution

This work is distributed under the GNU General Public License v3. See `LICENSE` and the preserved source licenses under `public/source/`.
