Tcmcec,
Others have better recommendations if you really want to go 40 mph. If you do, stop reading now and ignore everything below except the vendor recommendations.
Might check with "Mad Rhino", he has a good bit of Direct Drive experience and is very helpful...I didn't see him post on this thread yet. Direct Drive is definitely the way to go if you want to go 40 mph.
How are you going to use this bike...on pavement, off road, or both?
The reason I ask is I would highly recommend a mid drive BBSHD if you are going to mainly ride off road.
If you plan on riding hilly terrain and off road, a MAC geared hub motor (12T is my favorite) would be my recommendation.
And lastly if you are going to ride fairly flat pavement and/or basically commute, Direct Drive hub motor.
Don't know if this will work for you but I took Mongoose Hitch fat tire bike (steel frame) I bought at Walmart and put a Suntour Raidon fork on it, Maxxis DHF 27.5x2.8" front tire by changing front wheels and used a Maxxis FBR 26x4.00 rear tire. Went with a 14s6p battery with HG2 cells (allows extra amperage if you upgrade controllers), and the BBSHD motor. Geared it with a 30t front and a 22t White Industries 72 engagement point freewheel in the rear. That is my off road set up and it works great with a top speed of about 20 mph.
I am an old MX racer too so excuse me if I missed the boat on your intentions

. We race through the single track trails now and it hurts when you crash at 20 mph but not as bad as faster speeds...it just takes a loooong time for me to heal up now :lol: .
EM3ev for batteries is the way to go.
Grin Tech has good everything.
California ebike carries more of the little pieces and parts you'll need.
All have awesome customer service...of course I like to support Grin Tech since they make this forum possible and I use the heck out of the Motor Simulator they provide.