Target Architecture
```mermaid flowchart TD subgraph Site["Customer Site / Microgrid"] MG["Microgrid"] GW1["Gateway A\nOpenEMS Edge"] GW2["Gateway B\nOpenEMS Edge"] DEV["Devices\nMeters / ESS / Inverters / BMS"] MG --> GW1 MG --> GW2 GW1 --> DEV GW2 --> DEV end
subgraph OpenEMS["OpenEMS Platform"] OEB["OpenEMS Backend"] META["Metadata\nEdge + user identity\nauthorization + state"] OTD["Backend Timedata\nInfluxDB"] OUI["OpenEMS UI\nOps / engineering"] OEB --> META OEB --> OTD OUI --> OEB end
subgraph NFE["NFE Product Platform"] API["NFE App Backend / API"] PG["Postgres\nCustomers / tenants / tariffs /\ninvoices / permissions"] JOBS["Usage + billing jobs"] DERIVED["Derived usage tables /\ncustomer summaries / billing outputs"] WEB["Customer Web App"] ADMIN["NFE Admin App"] WEB --> API ADMIN --> API API --> PG API --> DERIVED JOBS --> PG JOBS --> DERIVED end
GW1 --> OEB GW2 --> OEB API --> OEB API --> OTD JOBS --> OTD
```