The solution to homelessness is free mental health services, better safety nets (easy to get, unconditional unemployment benefits) and a public health system that doesn't bankrupt people.
In the bay area "there are no homes" is a real problem, but the systematic reasons for homelessness are even more important to solve.
Homelessness is generally not caused by a lack of homes. Providing homes works well for those who are homeless for economic reasons. It works very poorly for those who are homeless for reasons of drugs/alcohol or mental illness.