Scaffold a react controller app that delivers gamepad input events over a websocket connection to any secure host on a local network.
joystick: https://github.com/elmarti/react-joystick-component?tab=readme-ov-file buttons: vanilla jsx ? need lightest load possible. likely only need button tags with basic CSS, shouldn't need a full styled component library for this
- RxJS - handle event emissions ? is this needed ? vs pure WS
- use RxJS to emit WS events asynchronously with thread safety
- WebSocket - built in to JS env
NX for mono repo management
- upstream libs:
- Auth
- WS event emission with Rx
- Common Components - buttons, joysticks + presentation level event handlers + styling, other UX components
- APIs for reading inputs, mapping them to controller actions, and sending them to the input event loop
- features (controlled by routing)
- login flows
- controller configurations
- connect to a game
- app
- handles main routing using routing framework
- perfectionist for sorting keys and imports
- Client <-> server stream options: https://grok.com/chat/b1e068fc-2f81-4b73-ba00-e62c5c99128a
- WebRTC and gaming: https://grok.com/chat/a6b0a1f8-72d2-44be-a993-0493f2164e37
- Fire joystick input events manually: https://grok.com/chat/3b6b40a1-5d4b-4be8-a83c-166545307e99
- use webrtc if you need peer to peer connection. use case for gamepad isn't this
- gamepad should support multiple clients connected to a single server
- once handshake is established, gamepad client sends data to server -> data flows in one direction (initial spec)
- C# concurrency can be used to handle multiple websocket connections
- for the gamepad usecase, WS may be the better choice