hamzi/portflow
PortFlow connects serial hardware (thermal printers, barcode/RFID scanners, scales, IoT boards) to Laravel via a driver-based architecture. Parse raw bytes into typed events, queue routes, and printing workflows, with Web Serial API support for browser integration.
SerialDriver interface) allows TPMs to extend functionality without modifying core logic, making it ideal for IoT/physical hardware use cases.POST /portflow/ingest) to untrusted users? Rate-limiting or authentication may be needed.IoTFrameBuffer) and queue tuning are critical.PortFlow facade and IngestController provide a drop-in endpoint for hardware data.PortFlowConnector) is ideal for dashboards but adds client-side dependencies.serialport) if needed.hamzi/portflow and publish assets/config.raw-json for ESP32) with a mock hardware device.ProductScanned) in Laravel logs.escpos for printers, rs232 for scales).file_get_contents('/dev/ttyUSB0')) with PortFlow::encode().<livewire:portflow-connector> in dashboards for real-time status.esp32-browser-frame) to sync UI with hardware state.exec() calls) must be replaced with PortFlow methods.portflow:make-driver) or manual implementation.serialport library to proxy serial data to Laravel via API.portflow-config) and register drivers.ProductScanned).portflow-serial.js to layouts.PortFlowBridge with device filters (e.g., usbVendorId).RouteSerialFrameJob) process data reliably.SerialFrame events to track hardware interactions.make:driver command simplifies this, but TPMs must document driver behavior.config/portflow.php reduces duplication but requires careful version control for environment-specific settings (e.g., baud rates).PortFlow::logRawBytes() to inspect raw serial data.SerialFrame payloads for parsing errors.PortFlowConnector).IoTFrameBuffer size (max_bytes) to balance memory usage and latency.context in SerialFrame).PortFlow singleton for distributed setups).| Scenario | Impact | Mitigation |
|---|---|---|
| Browser Permission Denied | Hardware data loss | Implement fallback (e.g., cached data or manual entry). |
| Serial Port Disconnected | Incomplete transactions | Use auto-reconnect in PortFlowBridge and queue pending frames. |
| Malformed Hardware Data | Event routing failures | Validate SerialFrame payloads in listeners; log raw bytes for debugging. |
| Queue Backlog | Delayed processing | Monitor queue length; scale workers or increase max_bytes. |
| Driver Crashes | Silent data loss | Wrap driver calls in try-catch; log exceptions to PortFlowException. |
config/portflow.php for common use cases.lsusb on Linux).How can I help you explore Laravel packages today?