Setup Java Spring Boot Hilla
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffolds a Hilla (Vaadin) React frontend into the module of a Spring Boot hexagonal reactor that runs the web
server: the Vaadin BOM and starter dependencies, the vaadin-maven-plugin build-frontend execution, a file-based
router with a sample view and test, a vitest/@vitest/coverage-v8 toolchain, ESLint flat config plus Prettier,
a Playwright component-testing setup and a root .ui-quality.yml (the catalog’s UI contract),
the .gitignore additions the frontend needs, and — only when Sonar analysis is enabled — the sonar.sources/
sonar.tests/lcov properties on the root pom (Gradle: the boot project’s sonar {} block). It reads the
manifest’s project.language (java/kotlin) and project.buildTool (maven/gradle) and adapts the build wiring
accordingly; the frontend files are identical in every combination.
Purpose
iru-setup-java-springboot-hilla fills in the one part of a Spring Boot reactor that iru-setup-java-springboot-pom
and iru-setup-java-springboot-modules don’t cover on their own: an actual Hilla React frontend, wired end to end
and verified against a real build rather than assumed to work. Two findings behind it were confirmed empirically by
building and running a real Spring Boot 4 + Hilla project: hilla-spring-boot-starter alone does not build, because
the auto-generated Flow compatibility shim under src/main/frontend/generated/flow/ always references a Flow
client resource that only vaadin-spring-boot-starter provides — both starters are always added, regardless of
whether hand-written Flow @Route views are wanted; and routes.tsx/generated/file-routes.ts are derived by
Hilla’s file-based router on every prepare-frontend/build-frontend run, so this skill writes views/@index.tsx
and views/@layout.tsx only and never touches anything under src/main/frontend/generated/.
Kotlin and Gradle. project.language (absent means java) and project.buildTool (absent means maven; gradle
only with kotlin) change only the build wiring and the server-side service code, never the frontend files. On Maven
the pom fragment is unchanged for Kotlin (vaadin-maven-plugin runs after kotlin-maven-plugin). On Gradle the
com.vaadin plugin is applied to the :boot project, with the Vaadin BOM (also added to developmentOnly), starters
and plugin alias resolved from gradle/libs.versions.toml, and vaadinPrepareFrontend run explicitly because it is
not part of the build graph. Kotlin @BrowserCallable services rely on Kotlin’s own nullability (String required,
String? optional) — no @Nonnull/JSpecify annotations are added. A manifest pairing gradle with java is a stop.
The skill announces whether it is scaffolding the frontend from scratch or updating an existing one. When frontend
files or pom wiring it owns already exist, it warns and asks Update (fill gaps only, recommended) / Keep as
is / Replace (regenerate everything) / Stop, unless on-existing pre-answers; regenerating the sample
view and test is asked as a follow-up rather than assumed.
Plugin
Shipped by the iru-springboot plugin of the ai-catalog marketplace (install with /plugin install iru-springboot@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
|
|
No (manifest fields) |
|
|
|
No |
|
None |
|
No |
|
|
|
Yes (manifest field) |
Must be |
None — read from the manifest |
|
No |
|
|
|
Yes (manifest field) |
When not |
None — read from the manifest |
Outputs
-
<web-module>/pom.xml(Maven) —vaadin-spring-boot-starter,hilla-spring-boot-starter, and optionalvaadin-devdependencies, plus thevaadin-maven-pluginexecution (prepare-frontend,build-frontend). -
boot/build.gradle.kts(Gradle, Kotlin) — thecom.vaadinplugin alias,javaParameters, the BOMplatform, both starters anddevelopmentOnlyvaadin-dev. -
Root
pom.xml— the<vaadin.version>property,vaadin-bomdependencyManagementimport,vaadin-maven-pluginpluginManagemententry, andproductionprofile, only when they aren’t already there (normally owned by Setup Java Spring Boot Poms). On Gradle the equivalent is the version catalog’svaadinversion,vaadin-bomlibrary andcom.vaadinplugin alias. -
<web-module>/src/main/frontend/views/@index.tsx,views/@layout.tsx, andindex.html— never anything undersrc/main/frontend/generated/. -
<web-module>/vitest.config.ts(extending Vaadin’s generated Vite config),src/main/frontend/test/setup.ts, and a colocated sample testviews/@index.test.tsx. -
<web-module>/package.jsontest/test:watch/coverage/lint/formatscripts and devDependencies (vitest,@vitest/coverage-v8, Testing Library, ESLint, Prettier and their plugins). -
<web-module>/eslint.config.js(flat config),.prettierrc.json,.prettierignore. -
UI contract files (Step 4b; see Building user interfaces):
.ui-quality.ymlat the repository root (accessibility,directions,themes); in the web module a standalone Vite component gallery (playwright/vite.config.ts,playwright/gallery/index.htmlandmain.tsx, since Vaadin’s own Vite config needsprepare-frontend),playwright.config.ts,e2e/support/ui-screenshots.ts(copied from the skill’sreference/ui-screenshots.ts), astories/HomeView.story.tsxstory ande2e/components/HomeView.spec.ts, which captures.ui-screenshots/screen/HomeView/across left-to-right/right-to-left × light/dark with an@axe-core/playwrightcheck; atest:uiscript and the@playwright/test/@axe-core/playwrightdevDependencies. -
.gitignoreadditions for<web-module>/node_modules/,src/main/frontend/generated/,vite.generated.ts, the Playwrighttest-results/andplaywright-report/directories and.ui-screenshots/— shown as a diff and confirmed before writing. -
Kotlin
@BrowserCallableconventions (Step 2a) — no sample service is scaffolded. -
Root pom
sonar.sources/sonar.tests/sonar.test.inclusions/sonar.javascript.lcov.reportPathsmerged in, andsonar.exclusionsextended with/frontend/generated/, only whensonar.modeisn’tnone. Kotlin + Maven usessrc/main/kotlinroots; Gradle adds asonar {}block toboot/build.gradle.ktsinstead. -
Optional example Flow
@RouteJava class and component starter, only if Step 1’s Flow-views question was answered Yes.
Execution flow
Dependencies
Invokes
None — it reads springboot-stack.yml and writes pom, frontend, and configuration files directly.
Invoked by
-
Setup Java Spring Boot — Step 8, Hilla frontend, only when frontend is hilla, via the
iru-isolated-skill-executoragent.
Also runs standalone (/iru-setup-java-springboot-hilla) against any reactor already built by
Setup Java Spring Boot Modules.
Related agents
-
iru-gate-runner— Step 8’smvn vaadin:prepare-frontendgate (Gradle:./gradlew :boot:vaadinPrepareFrontend), thennpm ci+npx vitest run --coveragein the web module, thenCI=1 npx playwright testwithUI_SCREENSHOTS_DIRset (a missing Chromium is reported as unverified, never downloaded), and an optional-Pproductionpackage build.
Source
SKILL.md on GitHub — the file this page was generated from.