As more than two million refugees have flooded Europe over the past three years, cities have scrambled to figure out where to put them. In Germany, local officials have commandeered defunct hotels, out-of-season Oktoberfest tents, abandoned Soviet-era apartment buildings, an old airport—even parts of the former concentration camps at Dachau and Buchenwald. Inside these hastily converted spaces, humanitarian groups and volunteers have rushed to assemble bunk beds and erect cubicle walls to provide a modicum of privacy. Makeshift villages of shipping containers stacked into two-story buildings have popped up wherever there’s room—on sports fields and patches of industrial land, far from shops, schools, and public transportation. Kitchens are scarce. Toilets and showers are often outside.

Doug Saunders, a Canadian journalist who reported on the vast movement of migrants for his book Arrival City, calls this the “warehousing” stage. The priority is simply to give refugees a roof over their heads—no matter how slapdash or shoddy. But shipping containers are hardly intended for long-term living: Newly built accommodations provide as little as 48 square feet per person—the size of a prison cell—and are difficult to heat and cool. “Shipping containers are not meant to be housing,” says Manuel Herz, a Swiss architect who wrote From Camp to City, a study of the architecture of refugee camps. “They are not meant for people.”

As the refugee crisis unfolds, however, architects and designers have begun to take up the challenge of providing more suitable accommodations for Europe’s newest migrants. “Until two years ago, architects weren’t even talking about this problem unless they worked for an international aid organization,” says Herz. Now, the sudden arrival of millions of people has created a real-world testing ground, spurring architects to develop a host of innovative approaches to erecting flexible, low-cost housing.

Germany has received the most refugees of any European nation, with more than 600,000 asylum applications, and has led the way in finding new and better ways to house them. The simplest designs rely on readily available materials—chipboard, corrugated metal, plastic tarp—that can be cobbled together into housing complexes, some complete with courtyards, playgrounds, and community gardens. Others envision facilities that are better insulated and longer lasting. For an emergency shelter in Schwäbisch Gmünd, a small town in southwestern Germany, architects erected a sturdy timber frame with attractive wooden slats on a concrete base, allocating as much as 200 square feet per person. For refugee housing in Kassel, designers sought to avoid temporary shelters entirely, and instead created a classic, concrete facility that can be converted into low-income housing or student dormitories.

Some designers are testing more creative strategies. This year, in a longtime immigrant neighborhood in Berlin, the architecture firm Praeger Richter built 24 apartments to house recently arrived refugees alongside students, families, and retirees. The units are designed with flexible layouts in a variety of finishes, so residents can move in quickly and affordably, then change or upgrade their homes as time and money permit.

Others are thinking in even broader terms. In Munich, a local restaurant owner, Wolfgang Nöth, is creating a “place of arrival” that includes studios, a concert hall, workshops, social services, and living accommodations. In Berlin, a group of artists, architects, and activists wants to transform a former government building in the city center into apartments, studio spaces, and classrooms offering informal language lessons for new arrivals. The facility would also provide low-cost housing and work space for students, retirees, and artists.

The refugee crisis, in fact, has underscored the dire need for more affordable housing for citizens and noncitizens alike. Barbara Hendricks, Germany’s minister of housing and the environment, announced last year that the country would build up to 400,000 new low-income housing units every year for the foreseeable future—for German residents as well as refugees. Whether by improvisation or design, the refugee crisis will reshape the urban landscape in Europe. After World War II, the desperate need for housing in Germany led to large, soulless apartment blocks that created ethnic and economic ghettos. Today, it’s container blocks and chipboard apartment houses. This time around, however, architects understand that the decisions they make now will have long-term consequences—for better or worse. In an essay for this year’s Venice Architecture Biennale, Saunders warns that Europe’s arrival cities are “where the new creative and commercial class will be born, or where the next wave of tension and violence will erupt.”