San Francisco's Valencia Street (with its immediate offshoots) supports hundreds of interesting businesses. Many of them are cafes. Only two of those cafes are any good: Ritual Roasters, and Four Barrel. Four Barrel was founded last year by a disgruntled co-founder of Ritual.
While the rest of Valencia's cafes are grimy, poorly lit, deathly quiet, or all of the above, RR and FB are sunny, friendly, and loud. That noise is all the foot traffic (and some David Bowie). The people sitting in Ritual for five hours on a laptop aren't paying the (staggeringly high) rent. It's the constant in-and-out of to-go cups. Mercifully, Four Barrel has no wifi and thus a more talkative, flowing crowd.
Ironically, because RR and FB have coffee that makes people come and go quickly, they can afford to make a pleasant space for people who stick around. Their solution to cafe economics was to make their own high-markup product.
Of course there are other solutions. Cafe du Soleil in the Lower Haight offers an extensive sandwich menu and gets its baked goods as part of a chain of boutique cafes and restaurants called the Bay Bread Group, which also sells bread to bigger clients like the Ritz Carlton. For all I know, Soleil is riding on the profits of the Bay Bread Group as an indulgent loss leader.
But I suppose there's a lesson there for any startup with a boutique aspect: Make your own supplies, and you might have a business plan to support your dream. In a way, wasn't that the model for Reddit and Justin.tv?