San Francisco—In a housing market staggered by the credit crisis, The Potrero condominium development has some heavy reinforcement on its side—the largest Whole Foods Market in the city.

The 42,000-square-foot store, featuring the company’s first mini-spa and streetside Market Bistro, opened its doors in September. Above, there are 165 new residences, including 20 that were sold at below-market rates.

Consider it the ultimate in urban living. The hip grocer sits at the doorstep of the development’s new residents. Shoppers from around the neighborhood will also be drawn to the building in the pursuit of goat cheese and organic vegetables.

Whole Foods identified The Potrero, which has a fitness center complete with a yoga and Pilates studio, as a complementary development that appeals to like-minded audiences and demographics, said Henry Lambert, founder of New York Citybased Lambert Development, the privately owned real estate firm that is behind the approximately $100 million project. The financing was a mix of construction and mezzanine loans and equity participation.

Although the fast-growing retail chain has traditionally preferred stand-alone stores, it is becoming a significant feature at new high-end multifamily developments. In Miami, the splashy 74-story Met 3 condo tower will soon boast a Whole Foods on the ground floor. And there are others, including a previous apartment complex in San Francisco.

At The Potrero, the unit mix includes studios, one- and two-bedroom flats, and two- and three-bedroom townhomes. Prices range from about $459,000 to $965,000. About 65 percent of the units had been sold as of early September, according to Alan Mark, president of The Mark Co., the marketing and sales consultant.

The affordable units, which drew more than 300 applicants, sold at prices between $179,000 and $255,000. Although home sales have plunged this summer in the San Francisco Bay Area and elsewhere, developers of The Potrero are upbeat.

They say that the Whole Foods store is the development’s most noteworthy feature but is not the only one that separates the project from its competitors.

The Potrero, which stands three and four stories tall, replaces an auto dealership repair yard in a relatively quiet neighborhood that hasn’t had a lot of condo development. The project features courtyards and high-end finishes in the units. Its low density makes it feel more airy and relaxed than many other larger condo developments.

“The Potrero fills an untapped market niche of new home construction on Potrero Hill,” said Lambert.

In another move, the development team reached out to real estate brokers before marketing to the general public, according to Mark. This was important because the brokers appreciated being the first to see the project, and they helped spread the word about the development.