I rode Boulder, CO - Astoria, OR a few years back. Distance: approx. 1600 miles/ 16 days
CO: Boulder, Ft Collins, CO 14 to Walden, CO14 and US40 to Craig
UT: US40 to Vernal
WY: US 191, UT 44, WY 593 to Green River; US30 to Kemmerer; US30 and WY 89 to Thayne
ID: WY89 and US26 to Idaho Falls; US20 Craters of the Moon, Fairfield, and Boise
OR: US20 plus county roads to Vale, OR then US26 to Dayville and Prineville; OR126 and OR 22 to Detroit and Grande Ronde; US101 to Astoria
I did this route in late October-early November.
It was a nice route: great scenery, low vehicle traffic for the most part but that is due in part on the time of year I rode this route. US30 can be busy in the summer. One could avoid US30 by taking WY372 and US189 from Green River to Kemmerer.
For a summer ride I'd suggest riding through the Sawtooths (Sun Valley, Stanley) rather than Fairfield and Boise.
One can camp for free in the Walden, CO city park. $5/night at the city/county park in Kemmerer, WY. Dayville, OR has a biker hostel at the Presbyterian Church - quite nice. More than half the nights someone offered me a place to stay otherwise I generally camped - combination of public and private campgrounds or 'in the woods'.