Gate hinge position/location
The long side of the hinge needs to be fixed to your cabinet door, align the hinge pin flush with the end of the door like the picture below



Make sure hinge faces the side you want the door to open to.