A quiet hum of activity enveloped the east side of San Francisco’s Civic Center Plaza the other day as Sam Mogannam and his team raced to get the new Bi-Rite Cafe ready for its celebratory soft opening just over 24 hours later.

Front-counter personnel practiced taking orders Monday as workers wielding power drills put the finishing touches on the new cafe, which is set to open to the public Wednesday.

Mogannam himself was preoccupied with getting the soft-serve ice cream machines working — the new cafe near Grove Street is just steps from the Helen Diller Civic Center Playground, which by 11 a.m. was already beginning to teem with kids, despite the autumn chill in the air. Closer to City Hall, commuters walked in long arcs to avoid colliding with an outdoor aerobics class.

“It would be nuts to open without those machines running. They’re running now,” said Mogannam, proprietor of the Bi-Rite markets, which have been in his family since 1964.

The cafe is the latest emblem of the city’s effort to revitalize Civic Center Plaza, unify it with the surrounding neighborhoods, and make the area a safe gathering spot for residents and tourists.

Not long ago, Civic Center — the seat of local government and home of many of San Francisco’s most important arts and cultural institutions — was a grim showcase of hard-drug sales, an open-air shooting gallery littered with used needles, trash and human waste.

Last year, at the direction of the late Mayor Ed Lee, the city quietly embarked on a cleanup of a roughly 100-block chunk around Civic Center. In June, the city announced a joint effort with BART to clean up the busy and often squalid Civic Center Station by adding a used-needle kiosk. San Francisco and BART police also began to work together to deter drug sales and guide homeless people toward services.

Efforts by the SFPD to rid the area of drug dealers and address other quality-of-life complaints at United Nations Plaza, along with the Market Street corridor and Civic Center Plaza, have resulted in 637 bookings and citations since the beginning of the year, Mayor London Breed’s office announced last week.

“Some of the time and effort we put into this space are starting to work,” Breed said. “I intend to clean it up and keep it that way.”

“A year ago, you thought, ‘I’m not sure I want to bring my kids here,’” said Amy Cohen, director of public space initiatives for the city’s Office of Economic and Workforce Development. “It was kind of a microcosm of the city’s problems.”

While the area’s transformation remains a work in progress, the differences are stark. In addition to two new playgrounds that cost $10 million, the space hosts a growing number of public events, including outdoor concerts, art installations and food-truck gatherings. A winter park — complete with a 6,000-square-foot ice rink — is set to open next month.

“We understand that this is a really important space and it’s a complicated space, but fundamentally it’s a park, and we’re trying really hard to make it functional,” said Phil Ginsburg, general manager of the Recreation and Park Department. Over the course of a year, Ginsburg said, the new playgrounds alone have seen more than twice the number of visitors, with around 14,000 people visiting the sites in July alone.

The new cafe’s proximity to the playgrounds is no coincidence. During the planning process, community members made it clear that having refreshments nearby would help make the recreational spaces a bigger draw for families, said Philip Vitale, a project manager with the Trust for Public Land, which oversaw the development of the playground alongside Rec and Park. Funding for the cafe came largely from a $2 million grant from the Mercer Fund. Bi-Rite has an initial three-year lease on the facility.

Despite the recent improvements, problems still persist around Civic Center. Mogannam said he personally picked up three needles on Sunday. But he agreed to open the cafe a year ago — long before many of the area’s positive changes had taken root.

“I knew what I was getting into,” he said. “If it was going to be easy it wouldn’t be worthwhile.”

The cafe will offer a variety of salads, soups and other entrees in addition to coffee, tea and baked goods. Beginning Wednesday, it will open 7 a.m. to 5 p.m. during the week and 10 a.m. to 4 p.m. on weekends.

As the Tenderloin Clubhouse director for the Boys & Girls Club of San Francisco, Michael Vuong brings groups of kids to the playgrounds during regular trips to the Main Library, which is across Larkin Street.

“With the renovation of Civic Center — the new playgrounds being put in place and the amount of activity happening there — the park definitely seems more family-friendly. It has a safer feel to it,” Vuong said. “It’s being held to a much higher standard than it was before.”

But he added that the apparent absence of homeless people and addicts in Civic Center doesn’t necessarily mean those people have been helped off the streets. He’s worried they’ve just been pushed elsewhere.

“How do we help solve the situations for people who no longer occupy the space? At the end of the day, we didn’t solve their problems, we just turned their problems into someone else’s problems.”

Officials say that despite imperfections, Civic Center’s progress so far could be a model for future efforts to reanimate run-down city corridors.

“We’re building on the success that’s happening here to inform our work for the rest of the city,” said Joaquin Torres, OEWD’s director, shortly before dropping by the Bi-Rite Cafe for a coffee and an egg sandwich.

“Delicious,” he said.

Dominic Fracassa is a San Francisco Chronicle staff writer. Email: dfracassa@sfchronicle.com Twitter: @dominicfracassa