A lot. My sister and her boyfriend wanted to do that too. But in the end it is cheaper and more functional if you just buy one.
But it depends how much you want to do?
if there should only be mattress it is relatively simple. But if you want to put equipment (gas stove, toilet, seat, walls, etc.) in there, then it is cheaper and easier if you buy one.
The work you put in and the material you have to buy costs. You also have to build everything so that it works in the end and does not let you down in 1 week of vacation. When building yourself, a little something breaks quickly and you are ONLY tinkering.
If you buy a small caravan you can do a lot of improvements there, but you already have a solid framework that you don't have to rip and change again and again.