This repository contains a Design-to-Code (D2C) benchmark dataset and an agent scaffold for generating React code from visual design inputs.
d2cAnData/index.jsonlists all benchmark tasks.d2cAnData/ast/contains structured AST JSON files for each design.d2cAnData/images/contains the corresponding reference images.prompts/contains Chinese and English prompt templates for code generation, refinement, and reasoning.agent.pydefines single-task and batch agent classes for iterative React generation and visual feedback evaluation.
Each item in d2cAnData/index.json has a task id and relative paths to its AST and reference image:
{
"taskId": 9418,
"ast": "ast/9418.json",
"image": "images/9418.png"
}The repository currently includes 204 paired AST and image examples.