BlockDupo is a tool for turning parts of a web page into AEM Edge Delivery Services blocks. Give it a URL; it reads the rendered page, detects components like headers, heroes, cards, nav, and footers, then writes block folders with CSS, optional JavaScript, and xwalk component model JSON.
The first version was selector-first. It looked good when the page matched the happy path, but it overmatched aggressively. A selector that finds twelve things is not useful if six of them are the same DOM node seen through different wrappers.
The current version is built around a registry-driven matcher: candidates, rules, weighted scoring, field coverage, reasoning traces, and a small evaluation corpus with annotated ground truth. It is heavier than a pile of selectors, but easier to test. The tool can explain why it called something a hero, and the harness can show when a change made detection worse.
Current state
The CLI can detect components, generate all blocks, generate one block, or write directly into an AEM project. There is also a small FastAPI picker UI for selecting blocks and downloading a ZIP. Current work: deduplicating candidates, preserving landmarks, tuning section boundaries, and making debug reports easier to trust.
Notes
Generated files are easy. Useful generated blocks are harder. I need to check whether the block is authorable, whether the model compiles, whether the CSS keeps the design without hardcoding everything, and whether the next run is actually better.