RCWeb API
TargetR RCWeb hosts browser apps over HTTP and HTTPS and relays JavaScript commands between connected browsers over WebSockets. This API documentation covers the Java server.
Server overview
Communication model
Browsers join a room using a room code and a client ID. Apps in the same room can send commands to selected clients or app names, allowing different pages, such as a phone controller and a shared display, to work together. The server routes commands; the receiving browser executes the JavaScript.
App logic and application state normally live in the browsers. The server retains room membership, connections, queued commands, caches and pending operations in memory. Commands can update a page without reloading it, but sending a command does not confirm its receipt or execution.
Server architecture
net.targetr.rc: Application startup and routing, with subpackages for rooms, browser connections, file transfers, MCP tools and monitoring.net.targetr.wtm3: Web Traffic Manager 3, the transport layer providing HTTP handling on virtual threads, TLS and ACME certificates, WebSockets, resource caching and outbound HTTP proxies.net.targetr.tncaptcha: Experimental animated CAPTCHA image generation; it does not manage challenge sessions or verify answers.
Start with Main for server initialization and
RootResponder for HTTP routing.
Room management and
browser connections implement command delivery.
The MCP endpoint lists connected clients in a supplied
room and executes JavaScript in a selected browser with a correlated reply.
Requirements
The project targets Java 21 and builds with Maven. Direct runtime dependencies are CommonMark for rendering Markdown and acme4j for certificate acquisition. Transitive dependencies include Bouncy Castle for certificate generation and jose4j for JSON support. Tests use JUnit Jupiter.