Your web browser can probably communicate with a serial port. That is, if you're using Chrome or a derivative of Chromium (Firefox and Safari are rather opposed to the idea of giving access to USB/serial ports). Yes, that 1980s technology is still alive!
TL;DR - console.zacharyschneider.ca
While I was researching the
Permissions-Policy header, I was curious about the
usb API permission and what kind capabilities that might give a web page. Turns out that feature also includes the Web Serial API proposal. I thought it would be neat to use a web browser as a serial console for various devices that communicate over RS-232. Right away, I envisioned connecting to an Arduino, a Raspberry Pi, or Netgate pfSense firewall appliances with only a web browser (bye-bye PuTTY). Only caveat is that you need a working internet connection is required... or do you?
This was also a great opportunity to try creating my first real Vue application. I settled on Vite for the TypeScript and VS Code integration. Tailwind CSS to make things look pretty. Xterm.js to power the terminal (also used by VS Code's integrated terminal). All settings are saved to local storage and everything happens in the browser – no tracking, fingerprinting, analytics, or data sent back to a server. The app is served by Cloudflare Pages too, without cross-domain dependencies like Google Fonts or third-party libraries. In fact, it should be trivial to make it an installable PWA which would enable offline access.