In a canal in North Amsterdam, a new neighborhood is taking shape–out on the water. The goal: to “make a really circular, resilient, floating neighborhood,” says Sascha Glasl, cofounder of Space&Matter , the architecture firm that designed the project .

In part, it’s a way to build new housing with limited space left in the city. “Cities are growing, and everyone is going into high-rises and trying to put more buildings on land, but there’s a lot of water in cities, and it’s smart to make use of that too,” he says. But the development is also a demonstration of how to build houses with little environmental footprint, and shows how neighborhoods in other cities could be rebuilt to deal with rising sea levels.

Each home has solar panels on the roof and a battery in the basement, and the houses are connected in a network so neighbors can trade energy when one household needs electricity and another has extra. This type of network, tracked on the blockchain, has been tested in other cities, though it’s new for Amsterdam. (The microgrid between the homes also connects to the city grid, so extra power produced by the homes can also be used elsewhere.) “There’s around 110 people living in this community, plus kids, and that is a nice scale for the government to see if it’s a solution to bigger challenges in the future,” Glasl says.

The homes have green roofs that residents can use to grow food or other plants. They also collect rainwater, used for flushing thee ultra-efficient toilets. A solar hot water collector connects to fixtures like a recirculating shower, which cleans water in a loop to save both the water and energy. Wastewater from the showers and toilets is treated at a biorefinery that uses it to produce more energy. Heat comes from a system that works like a geothermal pump and extracts heat from the canal.

It’s a model that could be used in coastal cities that already struggle with flooding. In theory–because the houses are built offsite and then quickly towed into place–some version of the design could also be used in disasters. “If you have a catastrophe somewhere and you have these houses in stock, from one day to the other, a neighborhood can appear,” he says.

The houses range in cost from roughly €300,000 to €800,000 (around $340,000 to $907,000). While building floating houses can be more expensive because of the engineering involved, Glasl says that it’s also possible to create affordable housing this way. On coastlines where rising sea levels threaten current homes, this type of floating home–or a hybrid that can float only in a flood–could help waterfronts adapt by embracing the water rather than trying to keep it out. “When the water comes, they float,” he says. “When the water goes away, then they can stand again.”