I need some good references on how to implement programmatically the hp-refinement of meshes in the Finite Element Method in two/three-dimension. I've searched the web a lot and read many articles and books without success. Most of the references in this regard have only concisely discussed the details of the hp-refinement in 2D/3D, which is not enough for someone to be able to implement this method as a code. The open-source FEM codes on the Internet that can do hp-refinement are too complex and involved to read, and in their manuals the details of the implementation are generally not explained.
So please introduce some books, articles, tutorials, webpages, lecture notes, etc. that practically and in detail discuss implementational aspects of the hp-refinement in FEM in 2D/3D and possibly have a complete code in this regard.
(it is to be noted that I have read books and articles by Dr. Demkowicz, but the presented ideas there are too complex for me to follow and implement as a code)