Redouble AI Nucleo documentation
Part 13 · Inside the runtime

Inside the Quarkus host

ai.redouble.demo.quarkus · nucleo-demo-quarkus

This page is for people working on the demo's Quarkus host itself: how to run it from a checkout and the beans and configuration it wires. What the host is and how it differs from the Spring one are in The Quarkus host.

Running it

Dev mode, with live reload:

mvn -pl nucleo-demo-quarkus quarkus:dev

The packaged JVM jar:

mvn -pl nucleo-demo-quarkus package
java -jar nucleo-demo-quarkus/target/quarkus-app/quarkus-run.jar

A native image (GraalVM, mvn -Pnative):

mvn -pl nucleo-demo-quarkus -Pnative package
./nucleo-demo-quarkus/target/nucleo-demo-quarkus-runner

With no credential the process starts, GET /status reports every provider on the classpath as unconfigured, and POST /ask is refused with the runtime's message naming what to provide. Set one credential and the same question is answered, on http://localhost:8080 by default.

What Quarkus wires

Catalog

The demo's catalog file is shared behavior with the Spring host, in DemoHome in the engine: each host keeps its catalog in its own module's resources, this one in nucleo-demo-quarkus/src/main/resources/models.json, where every build carries it into the Quarkus application and the native image (quarkus.native.resources.includes lists models.json). DemoHome finds the module from where the class loader serves this module's own application.properties (under target/classes in dev mode, inside the application's jar), then DemoStartup's class file, then the native executable, by Maven's standard layout: the nearest target directory above it whose parent holds a pom.xml. The resource leads because Quarkus's dev-mode class loader serves class files under a quarkus: scheme that names no file. It names the file to the runtime through nucleo.models, set in code, so an edit reaches the running process before any rebuild; a copy running outside the module reads the build's copy, read-only. No file is written at a start: the demo runs on the providers' shipped fragments until a person's action creates the file - the Discover step writing the account's catalog into it, or a first edit in the models table materializing the shipped defaults for the edit to land in, with no provider pinged. Under quarkus:dev the same file is read and written, and a write to it triggers no live reload: dev mode watches its configuration files and the resources it is told to, and models.json is neither, so a session's pasted credentials survive an edit. The tests name a catalog of their own, src/test/resources/test-models.json, through surefire, so a test run never seeds the module's file. The catalog UI - connect a credential, run discovery, edit and pin entries, order a grade - is the shared CatalogAdmin behind the routes DemoResource maps; a refusal comes back as {"message": ...}, the shape the page reads, the same as the Spring host.

^