This is NOT made by me nor do I take credit, but it comes from a certain hungarian who will probably read this soon anyway. This is a (very picture heavy) guide on making a moderately powerful medieval crossbow.
First the lever for the trigger.
Now the piece from which the nut will be made - its from bone. Feel free to improvise.
After shaping the body.
Preparing the front.
Another look at the trigger, some extra holes& carving done.
Now the actual mechanism.
Now this is for a fairly low power crossbow and the design can be modded for more durability. Anyone who tries this only needs to know the mechanical principles after all. I for once would add a thumb holder for the bolts.