Building a preamp DIY is going to be no easy task.
Building the amp circuitry is simple enough, but then you have to convert your guitar(analog) to something the computer understands(Digital). The A/D converters can get very complex and expensive.
If you have a newer computer or laptop it most likely has a preamp built in for an 1/8 mic input. It possibly has a line out as well. You can utilize this to a certain extent.
Create 2 -1/8 to 1/4" cables. Easy enough to solder up, schemos all over google.
This should work relatively alright, these are both line level signals as long as you dont convert to mic line level, dont set line out level all the way as this will distort the already poor quality signal going to your amp/mixer ect.
First response, hope this helps a bit