How to do that?
Well, this is what I use. Here's my list of components that are needed for building a bike (note that some of them may not be required for a particular type of machine):
FRAME & MAIN BEARINGS
Frame
Forks
Headset
Cable hanger for front brake,steerer-mounted or fork mounted up-hanger
Bottom Bracket
Protective sleeve for lining BB frame shell
Chainstay protector
Chainstay protector
STEERING
Stem
Shim for stem
Spacers
Star nut or expanding bolt for carbon steerer
Stem top cap and bolt
Handlebars
Gel cushioning for bars
Handlebar tape or hand grips and finishing tape
Handlebar end plugs
TT extensions, clips and all bolts
SITTING
Seatpost
Saddle clamp
Seatpost frame clamp or bolt
Seatpost shim
Saddle
DRIVETRAIN & GEARS
Front mech
Front mech mounting bracket
Rear mech
Rear mech hanger
Chain catcher or dog fang
Chainset
Chain
Chain connecting link
Pedals
Cassette or freewheel
Rear hub spacers
Gear shifters
Gear cables inner
Gear cables outer sleeves
Inline cable barrel adjusters
Downtube cable barrel adjusters / stops
Bottom bracket mounted cable guide and bolt, washer(s)
BRAKES
Brake levers
Brake cables inner
Brake cables outer sleeve
Front brake mechanism
Front brake shoes and pads
Rear brake mechanism
Rear brake shoes and pads
Barrel adjusters
Rear brake cable hanger, seat tube clamp mounted
CABLE RELATED
Cable end caps, crimp on
End ferrules for cable outer sleeve
Cable grommets (anti-scratch)
Tape for fixing outer sleeves to bars, etc
WHEELS
Wheels
Rim tape
Inner tubes
Valve extenders (for deep rims)
Valve extenders (for deep rims)
Tyres
QR skewers or axle & track nuts or anti-theft bolted skewers
ACCESSORIES
Bottle cages and bolts
Computer, sensors and mountings
Light fittings
Mudguards
Luggage mountings
So what I do is list these in a spreadsheet, e.g. on Google Drive so as to be able to access it from anywhere. Then I note details next to each, such as cost, supplier, brand and model/type, frame number, and anything notable, etc. As I said, total geek-out, but well worth it when three years later, you're trying to remember the specs of something or where you bought a part from. The spreadsheet can also be used calculate how much the bike cost to put it together, and more importantly, whether resources are being spent wisely on important stuff, or not!