The last remaining fortune cookie factory in San Francisco is on the verge of closure, thanks to sky-high rents and new technology, but its owner says he will never give up the family business, writes Lucy Sherriff.

Golden Gate Fortune Cookie Factory, in the city's Chinatown, is the last factory of its kind in the area, after competitors were forced to close when overheads became too expensive.

The family-run factory opened its doors on Ross Alley in 1962, and uses the same recipe to this day, as well as retaining the traditional machinery used to make Chinese fortune cookies.

"Even I don't know the recipe," co-owner Kevin Chan, whose mother and uncle founded the store, told the BBC. "It's my mum's secret."

Chan, who stays up until 3am at night writing the fortunes which are inserted into the cookies, says he's proud the store remains open, but he's facing an uncertain future.

"My rent is $6,000 [£4,555] a month. Three years ago, it was $1,400. But I'm not going to just walk away. I'm not going to give up. I will keep going for as long as I can."

Chan's mother still works at the factory, along with three part-time employees. The store used to sell to restaurants and hotels but it couldn't compete with the bigger factories elsewhere in the US. Chan would charge $14 (£11) for a case containing 400 cookies.

It takes Chan's factory around an hour and a half to produce one case of cookies. His staff work for eight or nine hours a day and are paid minimum wage - $15 an hour.

"There is no way I could make a profit. And then these other factories came along with modern technology.

"They use these fully automated machines. They can make 1m cookies in a day, individually wrapped, and sell a box of 400 for $8.95. I cannot compete with that."

Chan describes his methods and machinery as "old-school style". He has three traditional iron machines in his narrow factory; the oldest one is from 1956.

"It's hard," he continues. "Old school doesn't exist in today's technology. But I'm determined to keep the traditions going."

Chan has switched from wholesale back to retail, and says even though keeping his factory open to tourists slows him and his workers down, he's determined to keep welcoming customers.

"I could just close them and nobody would bother me, but that's not my goal. My goal is to serve people, to offer them Chinese hospitality, to teach them about Chinese culture."

Keeping the doors open also poses logistical challenges; the staff wear gloves to protect their hands from the heat, as the cookies have to be folded while hot, as they shatter when they've cooled.

"In the winter, we have a lot of wastage, as sometimes our staff can't fold the cookies fast enough. And in the summer, it gets really really hot in here.

"But I want people to see how the cookies are made."

Chan, who was born in China but emigrated to the US when he was eight, points to a chip in one of the folding boards attached to the machine closest to the door.

"I put my hand through that board during one summer when I was nine years old. It was so hot in here, and we can't use air conditioning because of the cookies cooling too fast, and I got so frustrated I slammed my hand on the board and broke it."

Everything about the factory is traditional, even down to the bright pink bags Chan gives his customers - red is a lucky colour, but the pigment is expensive, so carrier bag manufacturers mix it with white pigment, resulting in pink.

Chan's daughter isn't interested in taking over the business, but the businessman says he's not done just yet.

"I don't think about the future. I just try and carry on as I can right now. You never know nowadays, the landlord could decide to kick me out and I'd have to go anyway.

"But this is the heart of the factory, here on Ross Alley. No matter how much rent they charge me, I say 'go for it'.

"We've been doing this for 56 years and I've only adapted things slightly. No matter how hard things get I still want to do it. The customers make it all worth it."

Chan has made some adaptations to attract more customers into the store, including chocolate and matching tea-flavoured cookies. Customers can also opt to write their own fortune cookie messages, and Chan has even been part of aiding a few wedding proposals.

Some customers have written wedding proposals as their fortune. Chan has seen nine people propose this way - one even putting the engagement ring inside.

"They always come back and tell me what happened," Chan muses. "There's been a pretty good success rate actually, 85% in fact."

Photographs by Lucy Sherriff