If you lie on a bed inside one of these new micro-apartments, your head is next to the kitchen counter, and if you sit up, you can reach out and touch the desk on the other side of the room. The entire apartment, at 8 feet by 20 feet, could squeeze into a long parking space.

But nine-foot ceilings, large windows, and clever design–inspired by capsule hotels–make the space feel comfortable, not cramped. And for the target residents, the homeless in San Francisco, the clean, high-end design bears no resemblance to the city’s dilapidated SRO hotels or a bed in a shelter.

It’s also remarkably affordable to build. San Francisco-based developer Panoramic Interests, which designed the new Micropad unit, hopes that the apartments could help the city solve its homelessness crisis. Roughly 7,000 people (or, by some counts, nearly 10,000) are homeless in San Francisco now.

Like many cities, San Francisco believes in a “housing first” approach to homelessness. Evidence suggests that if someone is struggling with chronic homelessness, the best way to help is the obvious: Start by giving them a place to live. But the city’s incredibly high cost of construction limits how many units can be built.

“Conventional construction is really expensive, especially when you do density, mid-rise stuff like a concrete building going up seven or eight floors,” says Patrick Kennedy, owner of Panoramic Interests.

By building the Micropad in a factory, at a size that easily fits on a standard truck (and can be quickly assembled, Lego-like, when it arrives), each unit can be 40% to 50% cheaper than a typical “supportive housing” unit built by the city now.

“Our whole plan is predicated on no subsidies,” says Kennedy. “And no dependence whatsoever on low-income housing money. It would be entirely privately financed.”