Skip to content

docs(book): a consistent, designed diagram system (replaces ASCII art)#35

Merged
ancongui merged 1 commit into
mainfrom
docs/book-diagrams
Jun 16, 2026
Merged

docs(book): a consistent, designed diagram system (replaces ASCII art)#35
ancongui merged 1 commit into
mainfrom
docs/book-diagrams

Conversation

@ancongui

Copy link
Copy Markdown
Contributor

Replaces the book's inconsistent figures (a few hand-built SVGs, mostly ASCII art) with a shared diagram system so every figure reads as family.

  • build/gen_diagrams.py: a WeasyPrint-safe SVG toolkit (solid fills, polygon arrowheads, computed-layout primitives) in the book's cream-card + rust-arrow palette.
  • 14 diagrams, labels verified against the crates (dual-port topology, request lifecycle, DI graph, CQRS, Mono/Flux, event sourcing, saga/TCC, workflow DAG, layered crate stack, four-tier, OpenAPI, config precedence, macro→codegen).
  • Embedded across 12 chapters — replacing ASCII art + the older marker-based SVGs (zero markers/gradients remain). PDF now 796 pp / 4.4 MB.

Reviewed the rendered pages (dual-port, CQRS flow, four-tier) — clean, consistent, professional. Docs-only; diagrams are language-neutral so the Spanish edition inherits them.

The book's figures were inconsistent — a few hand-built SVGs, but most
concepts shown as ASCII art or not at all. This adds a shared diagram
system and applies it across the book, so every figure reads as family.

- build/gen_diagrams.py: a WeasyPrint-safe SVG toolkit (solid fills, polygon
  arrowheads, viewBox'd, self-contained) with computed-layout primitives
  (card/chip/arrow/lane + flow_row/stack/grid/lanes) so figures never overlap
  and share one visual language (the cream-card + rust-arrow palette).
- 14 diagrams, labels verified against the crates: dual-port topology,
  request lifecycle, DI bean graph, CQRS dispatch, Mono/Flux, event sourcing,
  saga compensation, TCC, workflow DAG, layered crate stack, four-tier
  architecture, OpenAPI generation, config precedence, macro → generated code.
- Embedded across 12 chapters — replacing the ASCII four-tier and inward-
  dependency art, restyling the older marker-based SVGs (zero <marker>/
  gradients remain), and inserting figures where a concept warranted one.
- dist regenerated: PDF now 796 pp / 4.4 MB.

Docs-only. Diagrams are language-neutral; the Spanish edition inherits them.
@ancongui ancongui merged commit 1ec377f into main Jun 16, 2026
@ancongui ancongui deleted the docs/book-diagrams branch June 16, 2026 20:13
ancongui added a commit that referenced this pull request Jun 16, 2026
…mplos" (#36)

A full Spanish translation of the book, built from the same source tree and
sharing the openers + the new designed diagrams. English remains canonical;
the ES edition tracks it.

- book-es.yaml: the Spanish manifest (src_dir: src-es, language es, localized
  labels Capítulo/Apéndice/Contenido, output names *-es.{pdf,epub}, Spanish
  part/chapter/front titles). Build: `BOOK_CONFIG=book-es.yaml docs/book/build-book.sh`.
- src-es/: all 34 files translated to professional es-ES (28 chapters/appendix/
  glossary + 6 front-matter). Code blocks, inline SVG figures, and intra-book
  links preserved verbatim (only figcaptions + prose translated); the build
  localizes callout labels (Note→Nota, Tip→Consejo, Warning→Advertencia).
  Audited for fidelity: code byte-identical, figures intact, links consistent.
- dist: firefly-rust-by-example-es.{pdf,epub} (PDF ~4.5 MB).
- CI: the Release workflow now verifies + attaches BOTH editions on a tag, so
  every release ships the English and Spanish books.

Built on the i18n-capable book pipeline (#34); inherits the guided-tutorial
content (#33) and the designed diagram system (#35).

Co-authored-by: Andrés Contreras Guillén <ancongui@Andress-MacBook-Pro-2.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant