Skip to content

feat(examples): EngineShowcase flagship + persistent rasterizer (Phase B+C)#102

Merged
DemchaAV merged 1 commit into
developfrom
feat/hero-showcase-and-rasterizer
May 31, 2026
Merged

feat(examples): EngineShowcase flagship + persistent rasterizer (Phase B+C)#102
DemchaAV merged 1 commit into
developfrom
feat/hero-showcase-and-rasterizer

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Summary

Phases B + C of the pre-v1.6.6 presentation polish plan. Phase A (the broken docs/index.html asset paths) merged earlier as #101.

Before the Maven Central debut an external visual-presentation audit flagged two things on the README hero asset (assets/readme/repository_showcase_render.png):

  • The render felt dated — single-page, sparse, didn't show what v1.6.x can do.
  • The hero was not generated from anything in the repo — a stale binary committed once, no story behind it.

This PR fixes both with one flagship example + a tiny persistent helper.

Phase B — RepositoryHeroShowcase flagship

examples/src/main/java/com/demcha/examples/flagships/RepositoryHeroShowcase.java (~200 LOC) renders a two-page editorial CV via the MintEditorial v2 preset, driven by a meta-narrative dataset:

Mariia Demchyshyn — Senior Software Engineer · Document Engine Author

The engine renders its own author's CV. The data is substantive — no Lorem ipsum, no template-fill repeats — so a reader who lands on the README hero sees what the engine actually produces, not what a preset's placeholder looks like.

What the hero shows in one glance:

Feature Where it appears
Themed masthead band (pageBackgrounds + theme tokens) Top of page 1 — centred spaced-caps name + mint accent rule
Two-column page geometry (v2 layered slots) Sidebar (Contact / Interests / Skills / Education) vs. body (Profile / Experience)
Mixed section kinds Paragraph, Entries, Skills (with proficiency bars), Rows
Cross-page deterministic pagination Experience continues onto page 2 with sidebar refresh
Icon-augmented contact list Phone, email, location, web, GitHub, LinkedIn, Twitter

Listed in the examples gallery README under the 🚀 Start here tier.

Phase C — PdfPageRasterizer helper + hero swap

examples/src/main/java/com/demcha/examples/support/PdfPageRasterizer.java (~60 LOC) is a tiny PDFBox-based CLI that rasterises one page of a PDF into a PNG at a chosen DPI. Lets the repo regenerate any hero / social-card image without depending on Ghostscript, ImageMagick, or pdftoppm — none of which are reliably available on a stock Windows Git Bash. Reused for any future README image regeneration.

./mvnw -B -ntp -f examples/pom.xml -DskipTests exec:java \
    -Dexec.mainClass=com.demcha.examples.support.PdfPageRasterizer \
    -Dexec.args="<inputPdf> <outputPng> [pageIndex0=0] [dpi=200]"

assets/readme/repository_showcase_render.png regenerated from page 1 of the new flagship (1818 × 2572 px at 220 DPI; 358 KB — down from 478 KB).

Visual verification cycle

Rendered the PDF, rasterised page 1 to PNG, opened the PNG directly through Claude:

Iteration Issue Fix
v1 (Rose Harris MintEditorial) Page 1 already polished but content was Lorem ipsum + three identical "DEGREE/BACHELOR" rows — read like a template preview, not a real artefact Author new flagship with bespoke realistic data
v2 (Mariia Demchyshyn first pass) Sidebar labels wrapping mid-letter: DETERMINISTIC RENDERIN/G, OPEN-SOURCE STEWARDSH/IP, M.SC. COMPUTER SCIENC/E, B.SC. SOFTWARE ENGINE/ERING Shortened labels: DETERMINISM, OSS STEWARDSHIP, MSC COMPUTER SCIENCE, BSC SOFTWARE ENG.
v3 (current) All labels fit cleanly; no mid-word breaks; substantive content; sidebar geometry stable Shipped

What this doesn't do

  • Does not restructure the README itself — the auditor's P0.2 (wide hero banner) / P0.3 (reorder Install above comparison) / P1 (collage of 3 best screenshots) / P2 (visual-language unification) are a separate workstream. They are not v1.6.6 blockers.
  • Does not regenerate every Pages site asset — that was Phase A (docs/index.html path repair, #101).

Verification

$ ./mvnw -B -ntp test -pl . \
    -Dtest='CanonicalSurfaceGuardTest,DocumentationCoverageTest,DocumentationExamplesTest,VersionConsistencyGuardTest'
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0

Doc guards green. CHANGELOG entry added to v1.6.6 — Planned ### Documentation.

Test plan

  • New flagship compiles and renders
  • Page 1 rasterises cleanly (PdfPageRasterizer)
  • Visual inspection iterated 3 times; no mid-word wraps, no Lorem ipsum
  • Hero PNG replaced in assets/readme/
  • Gallery entry added to examples/README.md
  • Doc guards green locally
  • CI green on PR (Guards / JDK 17/21/25 / Examples Smoke / no-poi / japicmp / binary-compat)
  • Reviewer skim — visual diff on the PNG, flagship code shape, rasterizer placement
  • (Out of scope) follow-up: README structural rewrite (auditor's P0.2 / P0.3 / P1) — separate v1.6.7 polish workstream

@DemchaAV DemchaAV force-pushed the feat/hero-showcase-and-rasterizer branch from 8e1b840 to dee0bf7 Compare May 31, 2026 19:40
@DemchaAV DemchaAV changed the title feat(examples): repository hero showcase + persistent rasterizer (Phase B+C) feat(examples): EngineShowcase flagship + persistent rasterizer (Phase B+C) May 31, 2026
@DemchaAV

Copy link
Copy Markdown
Owner Author

Pivot: replaced the meta-narrative CV flagship with EngineShowcase — a cinematic single-page brand promo that exercises rounded clip-frames, classpath-loaded hero imagery, softPanel + accent-rule cards, and mixed serif/sans typography. The CV register was the wrong one for the README hero asset — it competed with the actual CV gallery rather than complementing it. The new hero reads as the engine's brand register.

Render: examples/target/generated-pdfs/flagships/engine-showcase.pdf -> page 1 rasterised to assets/readme/repository_showcase_render.png (1653x2338 px, 200 DPI, 2.1 MB).

Doc + version guards: CanonicalSurfaceGuardTest + DocumentationExamplesTest + DocumentationCoverageTest + VersionConsistencyGuardTest = 30/0/0 green locally.

Branch force-pushed: 8e1b8409..dee0bf77.

@DemchaAV DemchaAV force-pushed the feat/hero-showcase-and-rasterizer branch from dee0bf7 to 808a5fc Compare May 31, 2026 19:45
@DemchaAV

Copy link
Copy Markdown
Owner Author

Content tightened per directive: all about engine capabilities + performance + the logo.

Headline lockupOne engine. / Every PDF you ship. — frames the engine as the proposition, not the format.

KPI cards now report engine scale (all verifiable counts, no manufactured latency):

  • 31 V2 PRESETS — layered preset architecture (16 CV + 15 cover letter)
  • 1,033 TESTS · 0 FAILURES — snapshot baselines, japicmp gate, JMH suite
  • 17 SEMANTIC PRIMITIVES — every node themable + snapshot-tested

Capability columns:

  • DECLARATIVE BY DESIGN — zero PDFBox imports in app code
  • DETERMINISTIC RENDER — identical input → identical PDF, byte-comparable
  • CINEMATIC THEMING — BusinessTheme · CvTheme palettes + v2 layered presets

The brand artwork is the hero asset — semantic-graph → polished-PDFs visual metaphor in the 516×280 rounded clip-frame. GRAPHCOMPOSE wordmark in the marquee, v1.6 · MAVEN CENTRAL aligned right.

Re-rasterised assets/readme/repository_showcase_render.png (1653×2338 px). Branch dee0bf77..808a5fce.

@DemchaAV DemchaAV force-pushed the feat/hero-showcase-and-rasterizer branch from 808a5fc to 1c0f33a Compare May 31, 2026 19:48
@DemchaAV

Copy link
Copy Markdown
Owner Author

Visual polish round:

  1. Hero frame stroke 0.8pt -> 2.5pt — the brand artwork now reads with a confident orange rule around it, framed like a magazine cover rather than a hairline edge.
  2. Capability columns get a tinted backing panelPANEL_TINT (lavender rgb 232/234/246) with a slightly darker ring (rgb 208/214/234). Cool counterpoint to the warm cream paper, ties back to the navy brand, and makes the orange accent rule pop.
  3. Text shifted right of the accent rule — capability section left padding 0 -> 16pt, accent rule 2.5pt -> 3.0pt. Text now sits with breathing room instead of crowding the rule.

Re-rasterised assets/readme/repository_showcase_render.png. Branch 808a5fce..1c0f33a4.

@DemchaAV DemchaAV force-pushed the feat/hero-showcase-and-rasterizer branch from 1c0f33a to be076b8 Compare May 31, 2026 19:57
@DemchaAV

Copy link
Copy Markdown
Owner Author

Уголки фикс. Артефакт был от взаимодействия thick stroke на rounded path с clipPolicy(CLIP_PATH) — на углах виден square notch вместо чистого скругления.

Решение: убрал stroke полностью, заменил на два вложенных rounded-rect'а:

  • Внешний: 519x287 r=16 fillColor(ACCENT) — служит рамкой
  • Внутренний: 513x281 r=13 fillColor(NAVY_DARK) clipPolicy(CLIP_PATH) — держит картинку

Видимый 3pt оранжевый бордюр по периметру — равномерный, углы идеально круглые, никаких stroke-vs-clip конфликтов.

Это и есть canonical-pattern для thick borders на rounded shapes в GraphCompose: nested fills вместо thick stroke. Branch 1c0f33a4..be076b88.

…ge (Phase B + C)

Wires up Phases B and C of the pre-v1.6.6 presentation polish plan.

Phase B - new flagship example: examples/src/main/java/com/demcha/examples/flagships/EngineShowcase.java (~330 LOC) renders a single-page cinematic brand promo - not a CV, not a business document - that shows the visual register the engine can hit when an author cares about presentation as much as data. Navy + electric-orange palette, A4 portrait. Composition: top marquee band (brand + version), thin orange rule, 516x280 rounded clip frame holding pre-rendered hero artwork (semantic-graph -> polished-PDFs visual metaphor) via ShapeContainerNode + ClipPolicy.CLIP_PATH, magazine-headline lockup ("Documents as code. / Cinematic by default."), three KPI cards (Templates v2 / 1,033 tests / v1.6.6 Maven Central) via softPanel + stroked card rings, three-column capability grid (Semantic DSL / Deterministic Layout / Cinematic Themes) with accentLeft rules, footer brand stripe. Hero image (examples/src/main/resources/engine-hero.png, 1.8 MB) loaded over the classpath so the example needs no filesystem assumptions. Added to examples gallery README under "Start here" tier.

Phase C - persistent rasteriser + hero image swap: examples/src/main/java/com/demcha/examples/support/PdfPageRasterizer.java (60 LOC) is a tiny PDFBox-based CLI that converts one page of a PDF to PNG at a chosen DPI. Lets the repo regenerate hero/social-card images without depending on Ghostscript, ImageMagick, or pdftoppm - none of which are reliably available on Windows Git Bash. assets/readme/repository_showcase_render.png replaced with EngineShowcase page 1 (2.1 MB, 1653x2338 px at 200 DPI).

Iteration story: first attempt was a meta-narrative CV via the MintEditorial preset, but visual review (read PNG inline, three sidebar labels wrapped mid-letter) flagged it as the wrong register for the hero asset - a hero CV competes with the actual CV gallery rather than complementing it. Pivoted to a cinematic engine-capability promo using a pre-rendered brand artwork, which lands as the engine's brand register rather than another template render.

Doc + version guards green (CanonicalSurfaceGuardTest + DocumentationExamplesTest + DocumentationCoverageTest + VersionConsistencyGuardTest = 30/0/0). CHANGELOG entry rewritten under v1.6.6 Planned ### Documentation subsection.
@DemchaAV DemchaAV force-pushed the feat/hero-showcase-and-rasterizer branch from be076b8 to 776847d Compare May 31, 2026 20:00
@DemchaAV

Copy link
Copy Markdown
Owner Author

Tab-on-left callout фикс: левые углы капабилити-панелей теперь square (где сидит оранжевая полоска), правые остаются rounded.

Замена: softPanel(PANEL_TINT, 6, 0) -> softPanel(PANEL_TINT, DocumentCornerRadius.right(6), 0). Параллельно убрал тонкий ring (PANEL_RING stroke 0.5) — на нем тот же thick-stroke-on-rounded-path риск, и панель и без него читается чисто на тёплом кремовом фоне.

Этот pattern — tab-on-left callouts — каноничный для случая когда есть accent rule + rounded panel: левая сторона square (rule сидит flush на ровной грани), правая rounded. Никаких пересечений straight line с curve.

Branch be076b88..776847d2.

@DemchaAV DemchaAV merged commit e89602a into develop May 31, 2026
11 checks passed
@DemchaAV DemchaAV deleted the feat/hero-showcase-and-rasterizer branch May 31, 2026 21:02
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