The SPDs should be mounted beyond the inverter and in a NEMA style- 3R enclosure or bigger whether it is an outside application.
The junction box is frequently an disregarded bit of the solar panel. typically https://prestonvcnb475119.yomoblog.com/36572943/an-unbiased-view-of-how-does-a-box-junction-work