I just bought a fairly powerful daylight visible headlight at RIE for $16. It was on clearance and normally sells for just under $40. It would be hard to build this myself for $16.
But assuming you want a DIY job the ket technologies are
1) LED lights
2) efficient reflectors
3) LiPo battery and charge control from USB carger
4) heat sinking and monitoring
5) over all control
The lasts done with a tiny micro controller and software. LED brightness is control by PWM (varying the duty cycle of a square wave) LEDs are rated for a given "average" power and you can use that as a steady state "solid-on" or as a bright glass followed by a longer "off" period. Or some kind of compromise. The little computer inside also measure the LED's temperature and adjusts power to keep in under a limit.
None of this is rocket science but how many enf=ginerringhousr will you burn to save $16? I can't buy the parts for this headlight for $16.