If you feel up to the tasks yourself, iFixit is one good site to visit first. Since it began in 2003, iFixit has grown into a large resource hub that provides free illustrated tutorials for all kinds of gadget repairs along with discussion forums and a store for buying tools and replacement parts for many devices. The iFixit store sells replacement batteries and other parts for just about every iPhone model ever released, and parts for different Android phones made by HTC, LG, Motorola, Samsung, and other manufacturers. Parts and guides for some Windows Phone models are also available.
Although you may just get brief installation instructions, the web has plenty of other sites selling smartphone replacement parts like front and rear cameras, speakers, iPhone Home buttons and more. Repair Universe and Global Direct Parts are two such sites. Amazon also sells smartphone parts and repair kits.