Heck, this is basically the modus operandi of most luxury student accommodation in London.
Find one with a restaurant on the bottom floor and you're done.
It'll cost close to 5K/mo all in for decent square footage. That's before food, which will probably run around 50/day at least. Still very achievable on a dev salary in a major market, as long as you don't make any other expensive life decisions (i.e., children). Not what I would spend my money on, but certainly an option if it's what you want
That's 50% of your salary(after taxes) if you're making 140k, but 1/4th of dev salaries in SF start above that.