Are you familiar with the ODrive?
odriverobotics.com/
It probably isn't what you want, but take a look. I have just about finished replacing the spindle motor of my Taig mill with a BLDC and an ODrive. I am using it as a VFD/Inverter, but it was primarily developed as a way to use BLDC motors as servos, to replace steppers. The hardware and firmware are open source.