In Villalba, Puerto Rico, a small town on a remote mountainside in the path of Hurricane Maria, it took months for power and water to come back to some homes after the storm slammed into the island. The infrastructure is still fragile, and access to tap water still sometimes disappears for days at a time.

Now, architects plan to build a community of resilient homes in the town that can better weather future storms. The houses can work off the grid, without any municipal services, for one to three months, depending on the number of occupants, says Jonathan Marvel, founder of Marvel Architects, a firm based in both New York and Puerto Rico that designed the new houses.

The design uses solar panels and batteries to supply enough electricity to keep the home running when the grid goes down. A rainwater collection system stores and filters water, while a solar water heater keeps showers warm. Outside, a garden can provide some food. The interior can stay bright with natural light from windows, and uses cross-ventilation and insulated concrete walls to stay cool without air conditioning. (Overheating was a major challenge after Maria, when houses roasted in the humid, hot weather, and people wanted to keep windows closed to shut out the pollution from diesel generators.)

The design is “based on what we know is affordable housing in Puerto Rico for a single family,” says Hector Ralat, an architect based in the firm’s Puerto Rican office. “But the focus was to alter the DNA of that knowledge and to put in the essential components that someone would need to sustain living conditions for at least two weeks, which is the recommended time here for someone to receive aid after a disaster.” The houses will likely cost around $120,000, a number that lets homeowners access favorable interest rates on mortgages. The units can be stacked on top of each other; in Villalba, most of the community will be three stories high (the solar will serve the whole building).

HiveCube, another modular housing company, is also using shipping containers, and has targeted a much lower cost–the houses start at $39,000 for a two-bedroom home. “We believe that your safety should not be a matter of income, but a given when you are planning to buy a home for your family,” says María Velasco, cofounder of HiveCube. The homes are designed to be fully off the grid, with solar power and batteries, a rainwater collection system, and a gray and black water treatment system that uses plants and bacteria to treat wastewater instead of septic tanks.

In Villalba, Marvel Architects is still working through the final steps before construction of its prototype community can begin on a piece of land provided by the city government. As other cities and towns have learned about the project, they’ve also started talking with the architects; it’s possible, Ralat says, that another town may be able to move through the permitting process faster. The first prototype may be built in the first quarter of 2019. The architects are tailoring the design so that it can be on the ground as quickly as possible. “The more you can tool up in a controlled production environment like a factory–it doesn’t make it cheaper, necessarily, but it just makes them faster to assemble. And we know that in Puerto Rico labor is in demand,” says Marvel. The more quickly the homes can be built, the more resilient each community will be in the next major storm.