Node-RED is incredibly good at letting people prototype their ideas without a great deal of programming knowledge. However, the dashboard, whilst great connecting service A -> C via. B, it doesn't lend itself especially well to being hooked up to a custom application running on said server in quite the same way.
I believe Web Components could allow for more web apps to be built and integrated with Node-RED nodes as seemlessly as creating a flow is now, but with a greater ability to customise that JS/CSS/HTML afford up-and-coming developers.
- A developer would drop a node onto the canvas, just as they always have (say, for a camera), and give it a unique name.
- The developer would include a <script> tag in a web page they are delivering from the same Node-RED instance
- The developer would then add a node (in markup) that corresponds to the node that they dropped onto their canvas
<!-- Something like... -->
<node-red-camera data--nr-name="Unique name from step 1." data--nr-flags="video"></node-red-camera>
- These two nodes are now connected, and messages can pass between them.
- Each node has a GUI which will be rendered (with the shadow-DOM where possible) which corresponds to the actions of this node - and . For instance, the camera will have a capture still button, or start/stop video recording button.
- Once these buttons have been pressed, the captured data/media will be sent to the node on the Node-RED side, where it can be handled by any flow there
- More polished prototype apps can be built by those new to programming, but still have a basic command of HTML and CSS.
- Complex things like handling Blob objects through a multipart form never have to be thought about again.
- People can delight in seeing their application work in real-time in a web page they've partially built/designed.
- An image node for capturing still images, and snippets of video.
- A file selector
- An audio capture node for recording sound
- An output node for the server to send data to a client from within a Node-RED flow