How mcollovati/quarkus-hilla works
Project type and purpose
• This is an open-source Quarkus extension (“quarkus-hilla”) that integrates the Hilla full-stack framework into the Quarkus ecosystem.
• It’s not a standalone application; it’s a tool/library providing build-time processors and runtime components for Hilla features (Endpoints, Reactive Endpoints, Security, Live Reload, codestarts).
Top-level module structure
• commons/
• deployment/ — build-time Quarkus extension code (processors, ASM visitors, BuildItems)
• runtime/ — runtime support (recorders, servlets, endpoint controllers, security, hot-reload)
• lit/ and react/
• deployment/ — framework-specific build-time integration for Lit or React frontends
• runtime/ — codestarts and runtime metadata for starter projects
• integration-tests/ — dozens of end-to-end Quarkus + frontend sample apps exercising features
• etc/, .github/, pom.xml — meta/configuration, CI, release scripts
Key architectural patterns
• Quarkus extension model: separation of *deployment* (build-time code-generation, registration) vs *runtime* (injection, recorder logic).
• Maven multi-module: each module produces one Quarkus artifact (extension or codestart templates).
• Codestarts: template projects under lit/runtime/src/main/codestarts and react/runtime/src/main/codestarts generate user starter apps.
• Integration tests: dynamic sample applications spun up by Selenide, verifying plugin functionality end-to-end.
Main components
A. Maven Reactor (top-level pom)
B. Modules
1. commons-deployment
2. commons-runtime
3. lit-deployment
4. lit-runtime (codestarts)
5. react-deployment
6. react-runtime (codestarts)
7. integration-tests (many child modules)
C. Quarkus Build Pipeline
• Quarkus Maven plugin → invokes deployment modules → emits BuildItems, generates Typescript client code → packages extension jar
D. Quarkus Runtime
• Extension jar loaded → CDI startup → recorders configure servlets, endpoints, security, hot-reload watchers
E. Frontend codestarts
• lit/runtime and react/runtime codestart templates → user “quarkus create app” → generates starter project structure (frontend + backend)
Relationships and data flow
1. Developer builds: mvn install on top-level → phases:
• compile & process commons-deployment → register build-time processors
• compile & process lit-deployment / react-deployment → framework-specific code gen
• compile commons/runtime → runtime classes
• compile lit-runtime / react-runtime → codestart artifacts
2. Application creation: Quarkus codestart generator uses codestart templates → produces starter app with Application.java, TS frontend, connect-client.ts, themes, views.
3. Runtime launch: Quarkus bootstrap loads extension → deployment build items already processed → runtime recorders spin up HTTP endpoints, security filters, Atmosphere-based push, live-reload watchers.
4. Integration tests: each sample under integration-tests is built and run; Selenide opens browser → verifies generated frontend connects to Quarkus endpoints, security flows, push, CRUD, signals.