HyperDbg is designed based on Hypervisor From Scratch tutorial.
It's a hypervisor plus some other processor features exported to user-mode to make debugging applications and the kernel possible.
Here is the link to these parts:
You can see the source code for these series on GitHub.
Here's a diagram that shows how HyperDbg works!