Rigging a Concealed Door hinge.

Hi, I am new to this community although I have purchased three courses. I am not sure if here is the place to ask the question. I am trying the animate a concealed door hinge but I don’t know how to make it work. I tried using different constraints but the joints are not aligning the way they should. Any help would be very much appreciated. Thank You !🙏

Concealed Door Hinge.blend