This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
HAL Foundation is the codebase for the next major version of the HAL management console for WildFly/JBoss. It produces two editions:
- halOP (HAL On Premise) — successor to the current HAL console, ships with WildFly or runs standalone
- halOS (HAL On OpenShift) — not yet implemented
Java source is compiled to JavaScript via J2CL, bundled with Parcel, and optionally packaged in a Quarkus HTTP server for standalone deployment.
# Full build with tests and checks
mvn clean verify
# Build halOP (most common during development)
mvn clean verify -P op
# Production build
mvn install -P op,prod
# Quick build (skip tests and checks)
mvn install -P quick-build
# Native binary (requires GraalVM)
mvn install -P op,prod,native -Dquarkus.native.container-build=false
# Build Galleon feature pack
mvn install -P prod,op,feature-pack
# Run a single test class
mvn test -pl <module> -Dtest=<TestClassName>
# Run a single test method
mvn test -pl <module> -Dtest=<TestClassName>#<methodName>After building the feature pack, provision a WildFly server with the HAL console using the Galleon CLI:
galleon.sh provision op/feature-pack/target/provision.xml --dir=/path/to/wildflyThe provision.xml in op/feature-pack/ uses ${project.version} for the feature pack version. During the build, Maven resource filtering produces target/provision.xml with the resolved version. It provisions a full default WildFly standalone server and adds the halop layer on top.
Start the provisioned server with --stability=experimental.
Two processes are needed simultaneously:
- J2CL watch (Java → JS compilation):
mvn j2cl:watch -P opWait forBuild Complete: ready for browser refresh - Parcel watch (HTML/CSS bundling):
cd op/console && npm run watchOpens browser at http://localhost:1234
Java changes require manual browser refresh. HTML/CSS changes auto-reload via Parcel.
./format.sh # Auto-format (license headers, editorconfig, imports)
./validate.sh # Check formatting without modifyingEnforced by: Checkstyle (WildFly ruleset), license-maven-plugin (Apache 2.0 headers), impsort-maven-plugin (import ordering).
Style: 4-space indent, UTF-8, max line length 128, LF line endings.
All code modules live under code-parent for shared dependency management:
| Module | Purpose |
|---|---|
core |
Notifications, CRUD operations, label building |
db |
Local database (PouchDB-based) |
dmr |
DMR protocol communication with WildFly domain controller |
environment |
Environment info and configuration |
event |
Event system base classes |
meta |
Metadata registry, statement context, resource address resolution |
model |
Domain-driven model classes |
resources |
Constants, string IDs, resource definitions |
task |
Task interface and repository |
ui |
UI formatters, model browser, filters |
Application modules:
op/console— J2CL-compiled SPA (Parcel bundler, PatternFly 6)op/standalone— Quarkus HTTP server wrapping the SPAop/subsystem— WildFly subsystem extension for the HAL consoleop/feature-pack— Galleon feature pack to provision HAL into WildFly
Supporting modules: bom (dependency versions), build-config (checkstyle/license rules).
Dependency Injection: Crysknife CDI (Jakarta CDI-compatible, works with J2CL). Uses @ApplicationScoped, @Inject annotations.
Bootstrap Flow (op/console): Sequential initialization via Elemento Flow — SetLogLevel → SelectEndpoint → SingleSignOnSupport → ReadEnvironment → ReadHostNames → FindDomainController → ReadStability → LoadSettings → SetTitle.
UI Framework: PatternFly Java bindings over PatternFly 6 components, with Elemento for DOM abstraction.
Data Layer: DMR operations for WildFly management API communication. PouchDB-based local database for caching. Async/Promise-based API pattern throughout.
Key Services:
Dispatcher— executes DMR operations against WildFlyMetadataRepository— stores WildFly management model metadataStatementContext— resolves placeholders in resource addressesCrudOperations— abstract CRUD layer over DMRNotifications— event-driven notification system
- Java 21, Maven 3.9.9+ (use
./mvnwwrapper) - J2CL v0.23 (Java → JavaScript transpilation)
- Crysknife CDI, Elemento, PatternFly Java
- Parcel, Node.js, pnpm (frontend tooling)
- Quarkus (standalone server)
- JUnit 6 + Mockito (testing)
Issues are tracked in JIRA: https://issues.redhat.com/projects/HAL