So you overestimated how much Chinese takeout your famished self could consume, and now you have nearly half a container of lo mein and zero desire to keep it for later. But before you throw it away, a new app called LeftoverSwap urges you to reconsider your options and maybe sell the food to a hungry stranger.

The idea utilizes technology to its extreme. Still in its beta stage, San Franciscans can buy and sell leftover food to strangers for a reduced cost via the smartphone app. But health officials are cringing at the egregious sanitation hazards and health risks of eating food already touched by foreign utensils, bodily fluids, and dirty hands.

Seattle entrepreneur Dan Newman first started the endeavor after a night of binging on pizza with friends only to find their fridge didn't have space for the leftovers.

"We were like, 'We don't want to throw this out, and it would just be great to broadcast that we have extra pizza to share,'" he said, citing one revelatory conversation with a couch surfer who identified as "freegan" — meaning his only food came from others' plates or dumpsters. "That was enough to spark initiative in me."

Users of the app have the ability to snap photos of their food, name their price, and post the listing online for hungry buyers to peruse at will. Sellers can either deliver the food or arrange to have it be picked up by the buyer.

Helping Humanity Or Simply A Health Hazard?

The intentions behind LeftoverSwap are admittedly noble. Newman wants to reduce the total food waste produced in the United States and, unlike current trends, use technology to bring people closer together. According to the app's website, 40 percent of the food we eat goes to waste, and 25 percent of us don't know our neighbors' names.

However, one health official doesn't see LeftoverSwap in its current form as being the correct, or perhaps even legal, harbinger of that change.

Richard Lee, director of the Health Department's environmental regulatory program, said selling food to the public without a permit is illegal in San Francisco. Doing so could result in expensive citations — thousands of dollars, he said — or three times the original permitting fee, according to SF Weekly.

While still bearing nutritional value, leftovers are notorious for carrying foodborne illnesses and other bacteria. By allowing users to freely trade such food, Lee said, there would be no way to regulate the trade or trace the source of illness if it arises. Too many moving parts — the restaurant, the first diner, and the end user — means no accountability if problems occur.

"Let's say everything was on the up-and-up," Lee said, noting that most dishes play host to countless disease vectors after being left out for more than four hours. "The people might not have washed their hands. They might be diseased."

However, CEO Dan Newman believes any health risks can be forestalled with simple awareness campaigns built into the app, which is planned to launch in the fall.

In an email to SF Weekly, Newman says the company will provide "common sense" guidelines to users, which will frown upon sending perishable food and encourage reheating before selling.

"Don't give (or sell) anything you wouldn't eat youself," he said.