Are barrier terminal blocks or bus bars inside a junction or weather-proof box up to NEC code?
Looks good.

Well thought out and well designed.

I can't think of anything that would be a code violation. Make sure the terminal strips are identified for use with the system voltage and identified for the current of the circuit. Is the Photon board identified for the voltage?

If it is in a garage you don't need a weatherproof enclosure. A simple screw cover junction box will do but would have to be bonded to the equipment ground conductor. If you like the plastic enclosure though then that works too.

Good luck!