← work
system dossier

OpenIt

IoT parking flow built around confirmed payment before gate release.

System Brief

OpenIt coordinates hardware events, payment confirmation, and gate release in one flow. The gate opens only after the backend persists webhook-confirmed payment state.

System Signals
01

Node-RED keeps hardware orchestration out of backend application code.

02

Payment context owns webhook persistence and the terminal status stream.

03

Gate release depends on stored payment state instead of optimistic client state.

signal

Hardware state advances only after webhook-confirmed payment, not after optimistic UI feedback.

Delivery Model3

team of three across firmware, backend, and interface

Domain Split2

access and payment contexts with separate rules and storage

Status FeedSSE

server-pushed payment confirmation without polling

Signal Path
esp32 eventsmqtt bridgepayment webhookconfirmed gate release
Architecture Board

Device events travel through MQTT and Node-RED, the backend separates access from payment state, and gate release happens only after webhook-confirmed payment.

01esp32 events
02mqtt bridge
03payment webhook
04confirmed gate release
constraint

Hardware cannot trust optimistic UI state because payment truth lives in backend state.

result

The gate opens only after confirmed payment becomes persisted application state.

Architecture

ESP32 devices publish events through MQTT, Node-RED translates them into backend actions, and the backend keeps access and payment in separate contexts. Mercado Pago confirmation persists first, SSE updates the terminal, and only then does the open-gate command leave the system.

Key Decisions
01

Confirmed webhook state over optimistic gate release

Opening the gate when the UI says payment started lets hardware behavior drift away from persisted business state. OpenIt waits for the Mercado Pago webhook to persist confirmation before releasing the exit flow.

02

Node-RED orchestration over backend-to-device coupling

Talking to ESP32 devices directly from the backend mixes hardware protocol concerns into the application service layer. Node-RED handles MQTT orchestration so the backend stays focused on access and payment rules.

03

SSE updates over client polling

Client polling adds repeated reads, slower feedback, and more edge cases when payment status changes quickly. SSE lets the backend push confirmation as soon as the webhook lands.

04

Bounded contexts over one merged parking module

One merged parking module blends gate rules with payment rules and makes every change touch the same service logic. OpenIt keeps access and payment separate so each flow can evolve around its own state transitions.