skills/.system/jwebmp-vertx/SKILL.md
Portable connector between JWebMP and Vert.x 5 powered by GuicedEE. Provides automatic page routing, AJAX event pipeline, data component servlet, CSS endpoint, site-loader script, WebSocket broadcasting via event bus, user-agent detection, and call-scope integration. Use when working with JWebMP Vert.x integration, HTTP routing, AJAX handling, WebSocket communication, or building reactive web applications with JWebMP.
npx skillsauth add guicedee/ai-rules jwebmp-vertxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Portable connector between JWebMP and Vert.x 5, powered by GuicedEE.
@PageConfiguration classes auto-registeredIDataComponent as JSONCallScope@PageConfiguration(url = "/")
public class HomePage extends Page<HomePage> { }
IGuiceContext.instance().inject();
// Routes registered automatically
GET / — serves HomePageGET /jwscr — site-loader scriptPOST /jwajax — AJAX event receiverGET /jwdata — data component endpointGET /jwcss — CSS endpoint| Route | Method | Handler | Purpose |
|---|---|---|---|
| @PageConfiguration.url() | GET | configurePageServlet | Renders annotated IPage as HTML |
| /jwajax | POST | configureAjaxReceiveServlet | Processes AJAX event calls |
| /jwdata | GET | configureDataServlet | Serves IDataComponent JSON |
| /jwcss | GET | configureCSSServlet | Renders page-level CSS |
| /jwscr | GET | configureInternalDataServlet | Serves site-loader JS |
HTTP Request
└─ Vert.x Router
└─ Route handler
└─ CallScope enter
├─ CallScopeProperties populated
│ ├─ RoutingContext
│ ├─ HttpServerRequest
│ ├─ HttpServerResponse
│ └─ Stream ID
├─ Handler logic (render/AJAX/data/CSS/script)
└─ CallScope exit
POST /jwajax
└─ bodyHandler (event loop)
├─ Deserialize AjaxCall from JSON
├─ Resolve event class → IEvent
├─ Run AjaxCallInterceptors
└─ triggerEvent.fireEvent(call, response) → Uni
├─ onItem → write JSON response
└─ onFailure → structured error JSON
public class ButtonClickEvent extends OnClickAdapter {
@Override
public void onClick(AjaxCall<?> call, AjaxResponse<?> response) {
// Process event
String param = call.getParameters().get("key");
// Update DOM
response.addComponent(new Div<>().setText("Result: " + param));
}
}
Two IGuicedWebSocket implementations:
public class VertXEventBusBridgeIWebSocket implements IGuicedWebSocket {
@Override
public void broadcastMessage(String groupName, Object message) {
vertx.eventBus().publish(groupName, message);
}
}
public class VertXStompEventBusBridgeIWebSocket implements IGuicedWebSocket {
@Override
public void broadcastMessage(String groupName, Object message) {
vertx.eventBus().publish("/toStomp/" + groupName, message);
}
}
Bound by default in JWebMPVertxBinder.
Call-scoped ReadableUserAgent:
@Inject
private ReadableUserAgent userAgent;
public void process() {
String browser = userAgent.getName();
String version = userAgent.getVersionNumber().toVersionString();
String os = userAgent.getOperatingSystem().getName();
}
Serve dynamic data as JSON:
public class UserDataComponent implements IDataComponent {
@Override
public Object renderData() {
return userRepository.findAll();
}
}
Access via: GET /jwdata?component=UserDataComponent
Render page-level CSS on demand:
@PageConfiguration(url = "/dashboard")
public class DashboardPage extends Page<DashboardPage> {
public DashboardPage() {
Div<?, ?, ?> container = new Div<>();
container.getCss()
.getBackground().setBackgroundColor$(ColourNames.AliceBlue);
getBody().add(container);
}
}
Access via: GET /jwcss?page=DashboardPage
Template-driven JS bootstrap at /jwscr:
var JW_SERVER_ADDRESS = '${serverAddress}';
var JW_PAGE_CLASS = '${pageClass}';
var JW_USER_AGENT = '${userAgent}';
var JW_REFERRER = '${referrer}';
| Environment Variable | Default | Purpose |
|---|---|---|
| BIND_JW_PAGES | true | Enable/disable automatic page routing |
Disable page binding:
export BIND_JW_PAGES=false
Every HTTP handler populates:
@Inject
private CallScopeProperties properties;
public void process() {
RoutingContext ctx = properties.getRoutingContext();
HttpServerRequest req = properties.getRequest();
HttpServerResponse res = properties.getResponse();
String streamId = properties.getStreamId();
}
Vert.x DatabindCodec mapper aligned with GuicedEE:
JWebMPVertx — Main module + VertxHttpServerConfiguratorJWebMPVertxBinder — Binds ReadableUserAgent, IGuicedWebSocket, Jackson configReadableUserAgentProvider — Call-scoped UA parserVertXEventBusBridgeIWebSocket — Direct event bus broadcastingVertXStompEventBusBridgeIWebSocket — STOMP-prefixed broadcastingmodule com.jwebmp.vertx {
requires transitive com.jwebmp.client;
requires transitive com.jwebmp.core;
requires transitive com.guicedee.vertx.web;
requires transitive com.guicedee.guicedinjection;
requires transitive com.guicedee.jsonrepresentation;
provides IGuiceModule with JWebMPVertx, JWebMPVertxBinder;
provides VertxHttpServerConfigurator with JWebMPVertx;
}
<dependency>
<groupId>com.jwebmp</groupId>
<artifactId>jwebmp-vertx</artifactId>
</dependency>
Structured error for invalid AJAX requests:
{
"error": "Invalid request",
"message": "Component not found",
"code": 400
}
{
"error": "Internal error",
"message": "Exception details",
"code": 500
}
public class CustomConfigurator implements VertxRouterConfigurator {
@Override
public void configureVertxRouter(Router router) {
router.get("/api/custom").handler(ctx -> {
ctx.response()
.putHeader("Content-Type", "application/json")
.end("{\"status\":\"ok\"}");
});
}
}
Register via module-info.java:
provides VertxRouterConfigurator with CustomConfigurator;
@Inject
private IGuicedWebSocket webSocket;
public void notifyUsers(String message) {
webSocket.broadcastMessage("notifications", message);
}
@Inject
private ReadableUserAgent userAgent;
public IPage<?> getPage() {
if (userAgent.getDeviceCategory() == DeviceCategory.SMARTPHONE) {
return new MobilePage();
}
return new DesktopPage();
}
com.jwebmp.vertx
├── com.jwebmp.client
├── com.jwebmp.core
├── com.guicedee.vertx.web
├── com.guicedee.guicedinjection
├── com.guicedee.jsonrepresentation
├── io.vertx.core
├── io.vertx.web
└── net.sf.uadetector.core
com.jwebmp.vertxdevelopment
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
development
WebAwesome icon integration for JWebMP — modern, open-source icon library. Provides 1,500+ icons with solid/regular styles, sizing, rotation, animation, and CSS utilities. Drop-in FontAwesome alternative with fresh designs. Use when working with WebAwesome icons, modern icon designs, or as FontAwesome alternative in JWebMP applications.
development
WebAwesome Pro integration for JWebMP with premium icons and features. Extends jwebmp-webawesome with additional styles, premium icons, and advanced features. Use when working with WebAwesome Pro icons or premium WebAwesome features in JWebMP applications.