The proper forum here is :
https://electricbikereview.com/forums/forum/diy/
I've made several complete posts down there.
All you have to know how do is make proper crimp connections, and match the colors. I use a klein or ideal crimp tool and t&b, ideal, panduit, 3m, t e connectivity (amp) or dorman terminals. Pull test after making connection. 12 ga wire supports 30 amps. Solder connections (XT90) require more skill, a $80 iron, and still don't last very long in my experience. Those connectors melt out and warp too, at the proper heat. Factory xt90 connections are fine, but mine aren't.
Knowing how fast and far you want to go, how steep and how far the grades you intend to climb, and how heavy your load is, matters. I selected geared hub motors because my total climb is <1000' in 3.5 hours and I need the exercise of pedaling myself when the headwind is mild. Mid drives are required for 2000' in an hour climbs. They also cost more, drag like a boat anchor unpowered (most of them) and eat up chains 2 to 20 times as often as hub drives. If you don't like quarterly chain replacement don't use 9,10,11 or more speed derailleurs. I use 8 speed & get 2.5 years per chain (5000 miles).
Motors can profitably be bought on the cheap on amazon/ebay, but batteries from there tend to be trash IMHO. I've found luna and ebikeling batteries okay, TJ is associated with some reputable california agency I don't know the name or URL of. Lots of people like grin tech in vancouver, but not the way customs treats their shipments.
If you hill climb enough to need a mid-drive, the best are bosch & yamaha. Those are best bought already installed on a bike. Bafang mid-drive conversion is doable with some machine work, but not as refined IMHO.
Have fun.