I started with a steel rear bicycle hub with freewheel off one of the donor bikes (I think it was a Magna).
I cut the hub in half and inserted a length of steel tube cut from one of the bike rack parts that formed the front fork or rear swingarm.
I had done some basic calculating and prealignment to figure out roughly how wide the overall width had to be.
I welded a 17 tooth cog from a donor freewheel onto the side opposite the freewheel.
I also ground flats on the freewheel side of the hub flange in order to grip the hub in a vice to remove the freewheel, since it is nearly impossible to remove the freewheel from the hub after you remove it from the spoked wheel (I found that out too late, but this was my solution)
I made a jig for keeping things aligned (as much as possible with my crude techniques. Things are not perfect, but good enough for a prototype.