You almost create a harder decision to make, by having a budget. But we may send you to spend more than you think. $1200-$2000 is not unusual, when getting into a truly quality creation.
But here's some advice for step one. Stop even thinking about the battery too much, till you have picked out motors and controllers. If you have picked something that will go 40 mph, then you will very likely want to go straight to lico, the RC batteries. But there are some very nice alternatives now, for 30 amps controllers.
Unfortunately, even in lico, 48v 20 ah crosses the line and is very awkward and heavy to carry on most bikes. 15 ah carries nice though. 48v 15 ah is good for 30 miles range at 18 mph, 20 miles of range at 25 mph, and 15 miles at 30 mph. It's enough for a fun fast ride, or a long slower one when you need that distance.
Think really hard, what you really want out of that bike. 40 mph can be cheap and easy for short distances, but do you really need or even want 40 mph? Have you ridden 40 mph on a bike? Not a long hill someplace open and smooth, I mean city street, potholes, stop signs, crosswalk stripes slick as ice, etc. In town, its stupid unless you have built with real motorcycle tires, and so on.
But no reason not to build a second, hooligan ride bike for 40 mph.
Like I said, you can get there on cheap motors and a 72v controller. I just think you will end up in the ER, or court, if you ride that thing daily around town. If you really want a small motorcycle, then you want this.
https://endless-sphere.com/forums/viewto ... =3&t=56313
A far more practical approach is to build for about 30 mph. Now you don't buy a new tire every month, and cops don't notice you so much. It's plenty fast for urban riding. It can be built to get to 30 mph very fast and fun.
To get this, 48v can work fine. It can be as easy as a few clicks at Grin Cyclery, or EM3ev for the whole shebang. Grin for sure, if you wanted a cargo carrying bike. You will want a cycleanalyst from Grin FOR SURE. Check out that edgerunner frame. My daily rider is a huge longtail cargo bike, but it gets to 32 mph very quick. If you will carry a lot of groceries, a longtail rocks. But it doesn't have to be stodgy and slow.
But you could hardly go wrong, with a Mac 10t rear motor, triangle battery, and bag from EM3ev. A lotta guys on ES love those Macs.
I love the EM3ev bag, for carrying 48v 15 ah of lico from Hobby King. I charge with a bulk charger from EM3ev. Since I ride a conservative discharge depth, I rarely need to break out the balancing charger. I just balanced my pack today after 6 months use. I had 2 cells that needed adjusting by .05v in a 42 cell pack. After six months of use.
I could go on and on, but will stop now since you seem to need to think a bit more about just what kind of bike you will be wanting.