This task can easily be done by a couple tutorials I found on the Developer Hub. Please see:
Using these three videos, you will be able to make a door open and close on a vertical hinge with the help of springs and limits. (Thanks to @InsertYourself for the catch on limits)