Skip to content

Latest commit

Β 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

README.MD

GuicedEE

License Maven Central

Java 25+ Guice 7 Vert.X 5 JPMS

A modular, Guice-first application platform for building reactive Java services on Vert.x 5.

GuicedEE wires together Google Guice, Vert.x 5, and the MicroProfile specification ecosystem into a cohesive, JPMS-native platform. Every module is designed around SPI discovery, annotation-driven configuration, and environment variable overrides β€” so you get production-ready defaults with zero boilerplate.

Website: https://guicedee.com Organization: https://github.com/GuicedEE


✨ Why GuicedEE?

  • Guice-first DI β€” All lifecycle, routing, persistence, messaging, and telemetry are wired through a single Guice injector. @Inject works everywhere.
  • Vert.x 5 reactive core β€” Non-blocking HTTP, WebSockets, event bus, SQL clients, and RabbitMQ β€” all on the Vert.x event loop with Mutiny Uni/Multi support.
  • MicroProfile standards β€” Config, Health, Metrics, OpenAPI, Fault Tolerance, and Telemetry follow Eclipse MicroProfile specifications.
  • JPMS Level 3 β€” Every module ships a proper module-info.java with explicit exports, requires, provides, and uses directives.
  • SPI + ClassGraph discovery β€” Modules, lifecycle hooks, consumers, REST resources, health checks, and more are discovered automatically at startup.
  • Annotation-driven, environment-overridable β€” Configure everything with annotations; override anything with environment variables or system properties at deploy time.

πŸ“¦ Quick Start

1. Import the BOM

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.guicedee</groupId>
            <artifactId>guicedee-bom</artifactId>
            <version>2.0.2-SNAPSHOT</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

2. Add modules you need

<dependencies>
    <dependency>
        <groupId>com.guicedee</groupId>
        <artifactId>inject</artifactId>
    </dependency>
    <dependency>
        <groupId>com.guicedee</groupId>
        <artifactId>web</artifactId>
    </dependency>
    <dependency>
        <groupId>com.guicedee</groupId>
        <artifactId>rest</artifactId>
    </dependency>
</dependencies>

3. Bootstrap

IGuiceContext.registerModuleForScanning.add("my.app");
IGuiceContext.instance();
// HTTP server is listening on :8080, REST routes are registered, DI is live

4. Write a REST endpoint

@Path("/hello")
public class HelloResource {

    @Inject
    private GreetingService greeter;

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public String hello(@QueryParam("name") String name) {
        return greeter.greet(name);
    }
}

5. Declare your JPMS module

module my.app {
    requires com.guicedee.guicedinjection;
    requires com.guicedee.vertx.web;
    requires com.guicedee.rest;

    provides com.guicedee.client.services.lifecycle.IGuiceModule
        with my.app.AppModule;
}

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Your Application                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   REST   β”‚WebSocketsβ”‚Persistenceβ”‚ RabbitMQ β”‚Telemetry β”‚  OpenAPI     β”‚
β”‚  (JAX-RS)β”‚ (RFC6455)β”‚(Hibernate)β”‚  (AMQP)  β”‚  (OTLP)  β”‚ (Swagger)   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    Vert.x Web Β· HTTP/HTTPS Β· Router                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              Guiced Vert.x Β· EventBus Β· Verticles Β· Codecs          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Health  β”‚ Metrics  β”‚  Config  β”‚         Fault Tolerance             β”‚
β”‚(MP Health)β”‚(Dropwiz.)β”‚(SmallRye)β”‚           (MP FT)                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚        GuicedEE Inject Β· Guice Injector Β· ClassGraph Β· SPI          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚     Client SPI Β· Lifecycle Hooks Β· CallScope Β· Representations      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚             BOM Β· Parent POM Β· Services (JPMS wrappers)             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‚ Module Catalog

Foundation

Module Artifact Description
Client com.guicedee:client Client SPI β€” lifecycle hooks, scoping primitives, and contracts that all modules program against
Inject com.guicedee:inject Runtime engine β€” classpath scanning via ClassGraph, Guice injector creation, startup/shutdown lifecycle
Config com.guicedee.microprofile:config MicroProfile Config via SmallRye β€” @ConfigProperty injection from env vars, system props, and properties files

Reactive Core

Module Artifact Description
Vert.x com.guicedee:vertx Guice-first Vert.x 5 integration β€” annotation-driven event bus consumers/publishers, verticle management, codecs
Web com.guicedee:web HTTP/HTTPS server bootstrap β€” auto-start Vert.x Web with Router, BodyHandler, TLS, and SPI extension points

Application Layer

Module Artifact Description
REST com.guicedee:rest Jakarta REST (JAX-RS) adapter β€” @Path/@GET/@POST routes auto-registered on Vert.x Router via ClassGraph
REST Client com.guicedee:rest-client Annotation-driven REST client β€” @Endpoint + @Named fields, typed RestClient<Send, Receive>, reactive Uni responses
WebSockets com.guicedee:websockets RFC 6455 WebSocket support β€” call-scoped connections, action-based message routing, group broadcasting
Persistence com.guicedee:persistence Reactive JPA β€” Hibernate Reactive 7, Mutiny.SessionFactory, multi-database support, @EntityManager scoping
RabbitMQ com.guicedee:rabbitmq Annotation-driven RabbitMQ β€” connections, exchanges, queues, consumers, and publishers with Vert.x RabbitMQ client
Web Services com.guicedee:guiced-webservices SOAP/JAX-WS with Apache CXF conventions β€” @WebService endpoints, WS-Security, WSDL-first or code-first

Observability

Module Artifact Description
Health com.guicedee:health MicroProfile Health β€” @Liveness, @Readiness, @Startup checks exposed as /health JSON endpoints
Metrics com.guicedee:metrics Dropwizard + MicroProfile Metrics β€” @Counted, @Timed, Prometheus scrape endpoint, Graphite reporting
Telemetry com.guicedee:guiced-telemetry OpenTelemetry distributed tracing β€” @Trace, @SpanAttribute, OTLP export, Log4j2 correlation
OpenAPI com.guicedee:openapi OpenAPI 3.1 spec generation β€” scans JAX-RS resources, serves /openapi.json and /openapi.yaml
Swagger UI com.guicedee:guiced-swagger-ui Browsable Swagger UI β€” auto-mounted at /swagger/, reads from /openapi.json with zero code

Hardware & IoT

Module Artifact Description
Cerial com.guicedee:cerial Serial port connectivity β€” @Named port injection, auto-reconnect, idle monitoring, health reporting

AI & Integration

Module Artifact Description
MCP MCP Server Model Context Protocol server β€” tools, resources, prompts, and completion for AI agent integration

Migration & Compatibility

These modules are not part of the GuicedEE foundation. They exist to assist projects migrating from other DI frameworks (Jakarta CDI, Spring, etc.) to the native Guice-first model. New projects should use Guice annotations and APIs directly.

Module Artifact Description
CDI com.guicedee:cdi Jakarta CDI compatibility bridge β€” maps @Inject, @Named, @ApplicationScoped to Guice equivalents with BeanManager adapter. Intended for migration assistance, not as a foundation layer.

Infrastructure

Module Artifact Description
BOM com.guicedee:guicedee-bom Bill of Materials β€” centralized version management for all GuicedEE artifacts
Parent com.guicedee:guicedee-parent Parent POM β€” shared plugin management, Java toolchain, encoding, and build configuration
Services Various JPMS wrappers β€” third-party libraries repackaged with module-info.java (Hibernate, Guice, Jackson, Vert.x, etc.)
Representations com.guicedee:guiced-representations DDD value objects and representation interfaces shared across modules
Fault Tolerance com.guicedee:fault-tolerance MicroProfile Fault Tolerance implementation (retry, circuit breaker, timeout, bulkhead, fallback)

Web & Docs

Module Artifact Description
Website β€” Public website at guicedee.com β€” module catalog, app builder, documentation

πŸ”„ Lifecycle

GuicedEE manages a deterministic startup/shutdown lifecycle through SPI hooks:

β”Œβ”€ IGuiceConfigurator         Configure ClassGraph scan
β”œβ”€ IGuicePreStartup           Pre-scan initialization (health, metrics, telemetry registration)
β”œβ”€ ClassGraph Scan             Discover annotated classes, SPI providers, modules
β”œβ”€ IGuiceModule                Guice module binding (configure phase)
β”œβ”€ Injector Creation           Build the Guice injector
β”œβ”€ IGuicePostStartup           Post-injection startup (HTTP server, persistence, consumers)
β”‚   β”œβ”€ Vert.x Web server start
β”‚   β”œβ”€ REST route registration
β”‚   β”œβ”€ WebSocket handler mount
β”‚   β”œβ”€ RabbitMQ connection & consumer setup
β”‚   β”œβ”€ Persistence unit initialization
β”‚   β”œβ”€ Health check registration
β”‚   └─ Metrics endpoint registration
└─ IGuicePreDestroy            Graceful shutdown (connections, exporters, ports)

Override sortOrder() on any lifecycle hook to control execution order.


βš™οΈ Configuration Philosophy

Every GuicedEE module follows the same three-tier configuration pattern:

  1. Annotations β€” @TelemetryOptions, @MetricsOptions, @HealthOptions, @RabbitConnectionOptions, @Endpoint, etc.
  2. Environment variables / system properties β€” Override any annotation attribute at deploy time without code changes.
  3. SPI hooks β€” Implement configurator interfaces (VertxConfigurator, VertxHttpServerOptionsConfigurator, RestClientConfigurator, etc.) for programmatic customization.
// Annotation-driven
@TelemetryOptions(serviceName = "my-service", otlpEndpoint = "http://localhost:4318")

// Environment override (no code change needed)
// TELEMETRY_SERVICE_NAME=my-service
// TELEMETRY_OTLP_ENDPOINT=http://tempo:4318

πŸ§ͺ Testing

Each module includes comprehensive tests. Run everything from the root:

mvn -B -ntp test

Or test a specific module:

cd inject && mvn -B -ntp test
cd rest && mvn -B -ntp test
cd persistence && mvn -B -ntp test

Modules that require external services (databases, RabbitMQ, telemetry collectors) use Testcontainers or in-memory alternatives:

// Telemetry in-memory testing
@TelemetryOptions(useInMemoryExporters = true)

πŸ› οΈ Building from Source

# Clone with submodules
git clone --recurse-submodules https://github.com/GuicedEE/GuicedEE.git
cd GuicedEE

# Build all modules
mvn -B -ntp clean install

# Build a specific module
cd inject && mvn -B -ntp clean install

Requirements

Tool Version
JDK 25+
Maven 4+
Git 2.x+

πŸ“š Key Concepts

SPI & ServiceLoader

GuicedEE modules discover each other through JPMS provides/uses directives. Register your Guice modules, lifecycle hooks, REST resources, health checks, and message consumers via ServiceLoader:

module my.app {
    requires com.guicedee.guicedinjection;

    provides com.guicedee.client.services.lifecycle.IGuiceModule
        with my.app.AppModule;
    provides com.guicedee.client.services.lifecycle.IGuicePostStartup
        with my.app.AppStartup;
}

CallScope

GuicedEE provides a @CallScope for request-scoped injection (WebSocket connections, REST requests). Scoped properties are available via CallScopeProperties.

CRTP Fluent APIs

Configuration and builder classes use the Curiously Recurring Template Pattern for type-safe fluent chaining:

connection.setBaudRate(BaudRate.$9600)
          .setDataBits(DataBits.$8)
          .setParity(Parity.None)
          .connect();

@Verticle

Annotate packages with @Verticle to scope components to dedicated Vert.x verticles. When absent, components deploy to the default verticle managed by Guiced Vert.x.


πŸ—ΊοΈ Ecosystem

GuicedEE is part of a larger ecosystem:

Project Description
EntityAssist Reactive entity CRUD framework built on GuicedEE Persistence
JWebMP Server-side web component framework with Vert.x rendering
ActivityMaster Domain-driven application modules (profiles, tasks, payments, etc.)
AIRules AI agent rules, prompts, and workspace policies

🀝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository and create a feature branch
  2. Follow JPMS conventions β€” every module must have a proper module-info.java
  3. Write tests β€” include unit tests for new functionality
  4. Use glossary-aligned names β€” check GLOSSARY.md in each module
  5. Update documentation β€” keep READMEs and RULES.md current
  6. Submit a PR β€” include a clear description of changes

πŸ“„ License

All GuicedEE modules are licensed under the Apache License 2.0.

Copyright 2025 GuicedEE Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.