A few years ago, Sarah was living in a drafty garage belonging to one of her friends. Despite being a smart, highly qualified teacher to sixth- and seventh-graders at a public middle school not far from San Francisco’s international airport, she simply could not afford to live anywhere else in the city.

San Francisco is facing an unprecedented housing affordability crisis. That was the conclusion of an analysis published in July by the city’s planning department documenting the huge challenge facing the city and the wider Bay Area. Rapidly rising rents and soaring property values, combined with high construction costs and prohibitive zoning policies, have stymied the “missing middle” housing options needed for public sector employees like Sarah, who earn too much to qualify for low-income housing, but not enough to afford the Bay Area’s often outlandish market rates.

While teachers may be invaluable to society, their pay and working conditions are deteriorating as housing costs rise. On Monday, Los Angeles public school teachers began their first strike in 30 years after more than a year of failed negotiations over issues that include pay.

“It’s so important for our public servants to be able to live in their communities,” says Kristy Wang, community planning policy director at the nonprofit San Francisco Bay Area Planning and Urban Research Association, or SPUR. “But we live in such a high-cost housing market that it’s really difficult for them to do that because they just don’t make enough.”

ROBYN BECK via Getty Images Striking teachers and their supporters rally in downtown Los Angeles on Jan. 15, 2019, the second day of the teachers strike.

Sarah (who asked that her real name not be published to protect her privacy) is a 32-year-old originally from the East Coast who moved to the Bay Area after gaining her master’s degree and teaching credential in Southern California. In 2011, she was living with her boyfriend and their young daughter on the outskirts of San Francisco in a one-bedroom apartment that cost around $1,500 a month. When she and her boyfriend split up four years later, the market rate for a similar apartment was at least $2,400. As a newly qualified teacher earning $2,700 a month, she just couldn’t make her budget stretch that much.

“Basically, we had nowhere to live,” she says. Then her best friend, also a single mom and struggling to afford her duplex rent, suggested that Sarah move in. “My daughter shared a room with my friend’s son — they’re the same age, went to preschool together and know each other well,” Sarah says. “And I lived in her garage for a year.”

Listening to Sarah’s matter-of-fact account of how she bought carpet and space heaters to make her new sleeping quarters more comfortable, the rationale is compelling. Her rent was now $1,300 a month, and sharing grocery shopping with her friend also cut costs.

But, she says, the situation was ridiculous. The poorly insulated garage was stifling hot in summer, uncomfortably cold in winter, and lacked direct access to the duplex, which meant going outside at night to reach the bathroom. The move added up to 40 minutes each way to her daily commute. And she had to buy a baby monitor so that her daughter could hear her mom’s voice before she fell asleep.

These are the people that the city needs to survive. Sonja Trauss, founder of the San Francisco Bay Area Renters’ Federation

“It’s really upsetting to be a working adult who can’t even afford a one-bedroom apartment by myself,” she says. “That makes me very angry.”

She criticizes tech companies — whose presence in the Bay Area has been blamed for rocketing rents and house prices — for not helping to manage the problems they’ve created.

The Bay Area’s affordable housing crisis has made stories like Sarah’s shockingly common. Assuming a household spends no more than 30 percent of income on rent, it would need to earn $180,000 a year to be able to afford the median rent in the city, according to the planning department’s analysis published last summer. In San Francisco, the starting salary for a credentialed teacher is $55,461.

Two-thirds of teachers spend more than 30 percent of their income on rent, according to a 2018 survey by Stanford University for San Francisco Unified School District. Of those, 14.7 percent say rent accounts for more than half their income. Annual teacher turnover is around 12 percent, which translates to the district having to fill an average of 400 classroom vacancies each school year.

Andia via Getty Images The Victorian houses known as the Painted Ladies in San Francisco. Assuming a household spends no more than 30 percent of its income on rent, it would need to make $180,000 a year to afford the median rent in the city.

Housing affordability is the biggest reason given for teachers leaving, according to Daniel Menezes, SFUSD’s chief human resources officer.

“Educator turnover hurts a school because children need to experience safety and stability,” says Elaine Merriweather, executive vice president of the United Educators of San Francisco union. “Educators develop relationships with students that really help to support their growth and learning.”

Collective bargaining and the parcel tax approved last June ― which will provide teachers with a 7 percent wage rise over the next two decades funded by a $298 annual tax on San Francisco property owners ― have increased basic teacher salaries by over a third since 2014, according to SFUSD’s Menezes. But, he says, the costly housing market means these pay increases aren’t enough to attract and retain educators, particularly those just starting out or who have a family.

“Every year, it is getting harder and harder to go out to national universities and convince a teacher to come to San Francisco because of the affordability issue,” Menezes says.

To address the crisis, SFUSD has partnered with the city and the teachers union to build its first teacher housing complex, with occupancy expected in 2022. The Francis Scott Key development in San Francisco’s Outer Sunset neighborhood in the west of the city will convert a surplus school district site into 130 apartments, costing from around $1,600 for a studio to $2,300 for a three-bedroom.

BAR Architects for MidPen Housing An artist's impression of the Francis Scott Key development in the Outer Sunset neighborhood of San Francisco.

“We’ll have teachers at the higher end of that scale and we’ll have para-educators — special needs teachers and assistants in the classroom — who earn less,” says Kate Hartley, director of the Mayor’s Office of Housing and Community Development. “We’re really excited about being able to serve that wide range of school employees.”

While Sarah welcomes the idea of dedicated housing for teachers, she says she wouldn’t be able to save any money or afford a house if she stayed in the Bay Area and had to pay those kind of rents.

To genuinely address the teacher housing crisis, the Bay Area needs protections for existing tenants and a deluge of new housing units, says Sonja Trauss, founder of the San Francisco Bay Area Renters’ Federation.

Trauss, who was a high school math teacher in the East Bay, quit her job a few years back when housing and commuting costs became too much for her to afford. Since then, she has campaigned for higher-density zoning.

“Too much of the city is zoned for low-density housing in a place that is incredibly in demand,” Trauss told HuffPost. “It’s not just San Francisco, but all over the Bay Area.”

Trauss has also fought against homeowners who block development to preserve neighborhood character. “The situation we have now is that people who already have their homes really don’t care if there’s a [housing] shortage”, she says. “Their feeling is that allowing the city to grow would change neighborhood character ... But these are the people that the city needs to survive.”

In a recent example of the kind of Bay Area nimbyism Trauss has called out, more than 6,500 people signed a petition against proposals to build low-cost teacher housing in the wealthy Almaden Valley neighborhood of San Jose. San Jose Unified, the largest school district in the South Bay and a good one-hour drive from San Francisco, is considering converting eight schools with aging buildings or declining enrollment into affordable teacher housing. The plans, however, have attracted criticism from residents.

Meanwhile, Jefferson Union High School District just outside San Francisco plans to use a $33 million voter-approved bond to fund 116 low-cost apartments for teachers and other staff, due to break ground this year. Teacher pay in the district is reportedly among the lowest in the county — $49,500 to $87,300 a year.

“The plan will definitely be a game changer for a lot of people and would really help me out because housing will be low market rate, which would allow me to have more of a long-term outlook in the district,” says Mike Rodriguez, a 12th-grade math and economics teacher at Jefferson Union’s Thornton High School.

Rodriguez, 30, has a master’s degree and has been teaching for four years. He makes $50,000 a year and has $100,000 of student debt. He drives for Uber for at least two hours each day to boost his income, lives with three others and looks forward to the day when he might not need to rent a room in a shared apartment.

Rafael_Wiedenmeier via Getty Images Alt-Erlaa municipal housing in Vienna. The Austrian capital's affordable social housing model could provide San Francisco with one potential solution for teacher housing.

The region’s teacher housing crisis needs both investment and political will, says Wang from SPUR. While there is no magic bullet, she adds, European models such as Germany’s baugruppen co-housing communities and Vienna’s affordable social housing, which offer city-based, lower-cost accommodation with shared facilities, could provide solutions for middle-income earners such as teachers and other public-sector workers.

For Sarah, change isn’t coming quickly enough. For the last two years, she has been living with her parents and her daughter in Redwood City, a 30-minute commute to her current school. Once the school year ends, she plans to move to a more affordable city like Sacramento.

“It would have been nice if there had been rent control and better salaries,” she says. “I do love teaching here, but I am being driven out.”

For more content and to be part of the “This New World” community, follow our Facebook page.

HuffPost’s “This New World” series is funded by Partners for a New Economy and the Kendeda Fund. All content is editorially independent, with no influence or input from the foundations. If you have an idea or tip for the editorial series, send an email to thisnewworld@huffpost.com