RCWeb Apps

RCWeb Apps are mini-applications that are run within the RCWeb ecosystem. They function by connecting and controlling web pages through the real-time sharing of JavaScript between web browsers.

Most apps in this ecosystem are AI Generated and implemented without modifying any server-side code. Since all logic lives on the client-side, incorporating a new app is as easy as serving static web files.


App Categories & Patterns

RCWeb apps are versatile and utilize different communication patterns depending on the desired functionality.

Remote Control & Broadcasting (Asymmetric Pattern)

One web browser controls or streams to a remote web browser.

  • Viewer & Controls (/v/, /c/): Send colors, images, videos, websites, and custom JavaScript instantly from a smartphone to a large display.
  • Camera & Screen Casting: Apps like /camera-control/ and /screen-control/ provide peer-to-peer WebRTC streaming directly from one broadcaster device to any viewers within the room.
  • Digital Art: Use /graffiti/ to collaboratively paint on a shared screen using mobile devices as "spray cans," or use /3dviewer/ to remotely inspect and rotate high-fidelity 3D models using mobile gyroscope sensors.

Collaboration & Utilities (Symmetric Pattern)

Multiple users share state, forming a real-time decentralized application.

  • Communication: Zero-delay text messaging (/chat/) or full multi-user audio and video WebRTC mesh networking (/chat-rtc/).
  • Text Editing: Collaborative plain-text environments (/notepad/, /notepad-pro/) featuring real-time presence and Operational Transformation (OT) mechanics.
  • Media & Files: Secure, peer-to-peer sharing of photos (/gallery/) or large multi-gigabyte files (/files-pro/) without relying on any central server databases.
  • Creativity: Share ideas on an interactive canvas with drawing tools and embedded images (/whiteboard/), or produce music together on a shared 16-step sequencer (/drums/).

Arcade & Gaming

An excellent foundation for local multiplayer games driven by the shared-screen Asymmetric Pattern. Players drop in seamlessly by scanning a QR code with their mobile device to launch a dedicated smart-controller.

  • Fast-Paced Arenas (/bomberman/, /tankwar/, /pacman/): Dynamic engines where users navigate procedural labyrinths, plant bombs, and wage intense geometric combat.
  • Classic Revival (/tetris/, /snake-pro/, /flappy/): Scaled-up multiplayer environments where dozens of users control their own snake, or play competitive puzzle matches using dedicated touch-button remotes.
  • The Spacewar Evolution (/spacewar/, /spacewar2d/, /spacewar3d/): Demonstrating extreme system flexibility by showing a rudimentary DOM-based app evolving all the way into a fully hardware-accelerated 3D wave defense game using Three.js.
  • Hardware Sensors (/flight/, /racer/, /tilt-maze/): Advanced physics implementations where smartphones become analog steering wheels, tilt accelerators, or 6-axis flight yokes.

Architecture & Technology

Virtual Rooms & Shared JavaScript

A fundamental concept of the RCWeb architecture is the Virtual Room. Rather than each browser maintaining an isolated session with the server, browsers connect to a shared Room via a unique ID in their URL.

The server acts purely as a proxy for data. When an event occurs in one browser, it sends a WebSocket message containing executable JavaScript. The Java backend catches this and broadcasts it into the command queues of other clients in the same room. The receiving browsers execute the code immediately, allowing for real-time replication of user interfaces and state.

Ideal Setting for AI Generated Code

This design pattern presents the perfect sandbox for testing untrusted LLM-generated code due to several structural advantages:

  • Absolute Server Safety: Because the server never parses, processes, or stores application data, it operates simply as an agnostic message broker. A hallucinated or entirely broken AI-generated app cannot compromise or crash the Java backend.
  • Instant Iteration Loop: Testing AI code changes is immediate. Because all application logic relies on static HTML and Vanilla JavaScript files, deploying a new app requires zero server recompilation or build steps—you simply reload the web browser.
  • Zero Dependency Hell: The architecture bypasses complex deployment pipelines. There are no npm packages, Webpack configurations, frontend frameworks, or backend dependencies for an LLM to hallucinate or misconfigure.
  • Simplified Debugging: When an AI makes a mistake, execution errors are isolated completely to the client-side browser console. This makes it incredibly easy to capture stack traces and feed them straight back to the LLM for corrections without sifting through complex server logs.

Stateless Design

  • Radical Simplicity: The server does not maintain any application state, business logic rules, or database state.
  • Extreme Performance: By delegating application logic to the client's browser, the server's footprint is negligible. By leveraging Java Virtual Threads, the server can handle thousands of concurrent WebSocket connections while consuming very few resources.
DocumentationServer TelemetryServer StatsServer HTTP LogServer WebSocket Log