--- license: agpl-3.0 --- # MobileForge **Looks Right, Works Right: A Project-Level Benchmark for Multi-Screen Mobile App Generation** [中文](README.zh-CN.md) | **English** This repository releases the **annotation tools** and **five-axis evaluation framework** from our paper. The full benchmark comprises 29 apps, 309 screens, and 701 navigation test specifications (see paper). > **Data release (preview).** The **dataset** (`input/mobileforge/`) and **experimental run artifacts** (`output/`, `experiments/`) are provided ~as **partial samples only**~, so you can inspect the format and try the evaluation pipeline. ~The **full release** (all 29 apps, annotations, and 174 paper runs) will be published **after the paper is accepted**. Watch this repository for updates.~(Datasets and experimental results: https://huggingface.co/datasets/unhappyNN/agentic_forge/) --- ## Overview Most design-to-code benchmarks focus on **single pages** and cannot assess multi-screen mobile products. MobileForge defines the task as: > Given **multiple design screenshots** of a real mobile app plus a **page-relationship description**, evaluate the generated frontend project on build success, navigation correctness, visual fidelity, code maintainability, and efficiency. | Gap | MobileForge response | | ------------------------------- | ------------------------------------------------------------------ | | Single-page granularity | **Project-level**: each instance is a folder of screens | | No interactive navigation eval | **701** navigation specs + **state-isolated** Playwright execution | | No project-wide maintainability | LoC, component reuse, dead components, design-token consistency | --- ## Benchmark statistics | Metric | Value | | ------------------------------ | ------------------------------------------------------- | | Real consumer apps | **29** (14 category buckets) | | Human-reviewed screens | **309** (mean 10.7 / app, range 5–21) | | Navigation test specs | **701** (mean 24.2 / app, range 11–41) | | Page-relationship descriptions | One natural-language spec per app (tabs + parent–child) | Test types: **120** page-existence, **392** tab-navigation, **189** parent–child navigation. The paper reports **174** end-to-end runs (6 models × 29 apps). Only a **subset of example runs** is included in this preview; the complete run bundle will be released upon acceptance. --- ## Five-axis evaluation | Axis | Metrics | Module | | ------------------------ | ------------------------------------------------- | ------------------------------- | | **Build** | `tsc` + `vite build`; route count, page coverage | `evaluator` → `build` | | **Navigation** | `NavPassRate` over 701 specs (state-isolated) | `testgen` → `navigation_test` | | **Visual fidelity** | Anchor-reference **list-wise** Borda (primary) | `testgen` → `navigation_visual` | | **Code maintainability** | LoC, ReuseRate, DeadCompRate, ColorConsistency, … | `evaluator` → `project_quality` | | **Efficiency** | Tokens, call count, wall time, cost | `evaluator` → `efficiency` | **State-isolated navigation testing.** Each case starts from a **fixed source route** (e.g. `/search`), not a chained walk from home, so early routing bugs do not cascade into later failures. **Anchor-reference list-wise visual judging.** The reference screenshot is inserted as a hidden anchor; rankings that do not place the anchor first are discarded. The paper uses **Gemini 2.5 Pro** as the fixed judge. --- ## Repository layout ``` MobileForge/ ├── input/mobileforge/ # Partial sample apps (full set after acceptance) ├── output/ # Partial sample runs (reference only) ├── experiments/ # Partial sample experiment dirs (reference only) ├── annotator/ # Annotation pipeline + check-tool/ review UI ├── testgen/ # Navigation tests + visual judging ├── evaluator/ # Five-axis evaluation + reports ├── experiment.yaml ├── models.yaml ├── env.sh.example └── requirements.txt ``` Module docs: - `[annotator/README.md](annotator/README.md)` - `[annotator/check-tool/README.md](annotator/check-tool/README.md)` - `[testgen/README.md](testgen/README.md)` - `[evaluator/README.md](evaluator/README.md)` --- ## Quick start ```bash pip install -r requirements.txt python -m playwright install chromium nvm use 20 cp env.sh.example env.sh && source env.sh # Edit experiment.yaml (see experiment.yaml.copy) ``` Use the **sample apps** under `input/mobileforge/` (partial preview). Each sample app needs `metadata.json` and `test_cases.json`. You may also point the evaluator at your own generated projects. **Evaluate one generated project** (must be a buildable React + TypeScript + Tailwind tree): ```bash python -m evaluator eval \ --dir \ --input ./input/mobileforge/airbnb ``` **Batch evaluation:** ```bash python -m evaluator eval --dir ./output/mobileforge \ --input ./input/mobileforge --batch python -m evaluator report --experiment-dir experiments/_ ``` --- ## Pipeline ```mermaid flowchart LR A[Screenshots] --> B[Annotator] B --> C[metadata + test_cases] C --> D[Generated project] D --> E[Evaluator / TestGen] C --> E ``` ### Annotation ```bash python -m annotator --input ./input/mobileforge/airbnb cd annotator/check-tool && python server.py --input-dir ../../input/mobileforge ``` - `metadata.json` — page relationships and per-screen annotations (ground truth) - `test_cases.json` — navigation test specifications (ground truth) ### Evaluation ```bash python -m evaluator eval --dir --input ./input/mobileforge/ python -m evaluator eval --dir --input ./input/mobileforge/ \ --only navigation_test,navigation_visual python -m evaluator eval --dir --input ./input/mobileforge/ \ --skip navigation_visual ``` Standalone testgen: ```bash python -m testgen run --cases input/mobileforge//test_cases.json \ --run-dir --input-dir input/mobileforge/ python -m testgen eval --report /eval/test_report.json \ --cases input/mobileforge//test_cases.json \ --input-dir input/mobileforge/ ``` Evaluation order: `build` → `navigation_test` → `navigation_visual`; other modules are independent. --- ## Data format ``` input/mobileforge// ├── *.png / *.jpg ├── desc.txt # optional ├── metadata.json └── test_cases.json ``` Results are written under `/eval/` (`build_result.json`, `test_report.json`, `summary.json`, …). --- ## Comparison to prior benchmarks | Benchmark | Unit | Build | Nav. | Visual | Maint. | Eff. | | ------------------------ | ------------------------- | ----- | ----- | ------ | ------ | ----- | | Design2Code, WebSight, … | Single page | — | — | ✓ | — | — | | Figma2Code | Figma files | — | — | ✓ | ✓ | — | | **MobileForge** | **29 apps / 309 screens** | **✓** | **✓** | **✓** | **✓** | **✓** | Inputs are **screenshots only** (no Figma structural prior). Evaluation targets **runnable multi-page web projects** (React + TypeScript + Tailwind in the paper). --- ## Ethics Screenshots are captured from publicly distributed apps with no real-user PII. The benchmark is for **research evaluation only**; the release license prohibits commercial reuse or re-skinning of screenshot assets. --- ## Citation ```bibtex @inproceedings{mobileforge2026, title = {Looks Right, Works Right: A Project-Level Benchmark for Multi-Screen Mobile App Generation}, author = {Anonymous}, booktitle = {Proceedings of EMNLP}, year = {2026} } ``` --- ## FAQ **Where is the full benchmark?** Not in this preview. Only partial samples are shipped for format reference and pipeline testing. All 29 apps, ground-truth annotations, and 174 paper runs will be released after acceptance. **Missing `input/mobileforge/` or sample apps?** The preview may include only a few apps; large assets may be gitignored. Check the repository release notes. Full data will follow acceptance. **Navigation tests skipped?** Ensure the project builds, pass `--input`, confirm `test_cases.json` exists, and install Playwright (`playwright install chromium`). **Reproduce the paper’s 174 runs?** Not possible with the preview bundle alone. After the full release, run `evaluator eval --batch` on the published `runs/` directory, then `evaluator report`. **High visual-judge API cost?** Use `--skip navigation_visual`; see `testgen/visual_judge_listwise.py` for list-wise details.