Architecture
Deq has one source of truth, the shape spec in spec/. Everything else is built from it, and tests check that every generated file is up to date.
spec/ (shapes, grid, flag, Leet tables, CLI interface) │ ├─ scripts/deq-spec ── lint, metrics, contact sheets, brand SVGs │ └─ packages/core ───── reference renderer, golden fixtures in spec/fixtures/ │ ├─ packages/icons ── react, vue, svelte, elements ├─ packages/exporters (23 formats) ├─ packages/generator (Deq Leet, patterns) ├─ packages/cli (deq for Node.js) ├─ scripts/deq-fonts (icon and Leet fonts) ├─ python/deq-shapes, rust/deq-shapes, rust/deq-cli (ports, matched against the fixtures) └─ apps/site (website and Studio)The parts
| Folder | What it holds | Decision |
|---|---|---|
spec/ |
One JSON file per shape, the grid, the flag, the catalog, the Leet tables, cli.json, JSON Schemas and fixtures |
ADR 0007 |
scripts/deq-spec |
The Python tool that lints and formats the spec and draws the contact sheets | ADR 0007 |
packages/core |
The reference renderer: option validation, expansion, SVG; writes the golden fixtures | ADR 0008 |
packages/exporters |
PDF, EPS, AI, PSD, rasters, components and more, built on core’s prepare |
ADR 0009 |
packages/icons, react, vue, svelte, elements |
Icon data and generated components; default output equals core’s render |
ADR 0010 |
scripts/deq-fonts |
Static, variable and colour icon fonts, and the Deq Leet font | ADR 0010, ADR 0016 |
python/deq-shapes, rust/ |
Ports of core and the generator, and the deq CLI in each language |
ADR 0011 |
packages/generator |
Deq Leet, decoding and seeded patterns | ADR 0015 |
apps/site |
The Astro and Starlight website, the Studio, the story, the showcase and these docs | ADR 0012, ADR 0014 |
Rules that hold everywhere
- Core is the reference. Python and Rust re-implement it and must write the same SVG and PDF byte for byte. A change to rendering lands in all three in the same pull request.
- Generated files are never edited. They carry a “generated, do not edit” header, and a test or lint fails when one is stale. The codegen pipeline lists them.
- Every outside input is validated against a schema before use, and errors are typed
DeqErrors with stable codes. See security. - One version is shared by every package, crate, font and asset.
The tooling is split by language: pnpm workspaces and Turborepo for TypeScript, a uv workspace for Python, a Cargo workspace for Rust, and just recipes that run all three (ADR 0002).
A new version of this site is available.