Josh Harder (right), Democratic candidate for California's 10th Congressional District, visits the home of Alphabet employee Prem Ramaswami (left) in Mountain View. Source: Preston Merchant

Jason Spero, a vice president at Google, said that before the 2016 presidential election, his political activism amounted to attending the occasional fundraiser and writing checks to his preferred candidates. But after Trump's victory, that all changed. "I'd never been as aware, awake and active as I have been since that November," he said. Now, Spero and other employees at Google and across Silicon Valley have their sights set on the November 2018 midterm elections, when they plan to do their part to flip the House of Representatives in favor of the Democrats and put a check on President Donald Trump. Much of their effort is focused on their home state of California, which has become central to the Democrats' hopes.

To take back the House, Democrats need to win a net 23 seats from Republicans in November. California has 14 Republican representatives, and nine of those seats are considered competitive in this election, including seven in districts that Hillary Clinton won in 2016, according to the Cook Political Report. Silicon Valley's two districts and San Francisco are solidly blue, voting overwhelmingly for Clinton and, before that, Barack Obama. So technology workers are going outside of their hubs and contributing to competitive campaigns throughout California, with employees from Google's parent company Alphabet leading the pack. Heading into California's June 5 primary elections, Spero has been meeting first-time congressional candidates across the state, joining finance committees, phone-banking, and providing advice on messaging.

And then there's the cash. Spero has contributed thousands of dollars to Mike Levin, who's running to replace the retiring Darrel Issa in the San Diego area, as well as to Dave Min, Harley Rouda, Jessica Moore and Josh Harder, who are all running in districts with Republican incumbents. He's even held fundraising events at his house, with employees from companies including Facebook, Twitter and Google. "I can't tell you how many times I heard in my living room, 'I've never been to a political event before,'" Spero said. "The hypothesis of the events was that a lot of people were motivated but didn't know what to do with that energy." In the 16 months since Trump's inauguration, the president has done plenty to motivate opposition in Silicon Valley. His efforts to limit immigration, roll back net neutrality and undo regulations that protect the environment are just the most blatant examples of his clashes with the tech industry. San Francisco billionaire and former hedge fund manager Tom Steyer has committed millions of dollars to a campaign to impeach President Trump, but tech employees frustrated with the president and Congress are sticking with a more grass-roots approach.

(L to R) Amazon CEO Jeff Bezos, Alphabet CEO Larry Page, Facebook COO Sheryl Sandberg, Vice President-elect Mike Pence, President-elect Donald Trump, during a meeting of technology executives at Trump Tower, Dec. 14, 2016 in New York. Getty Images

Campaign finance rules limit individual contributions to $2,700 to a candidate per election cycle, while political action committees can give $5,000. Even if he gets through to the general election, Harder will have an uphill climb. Denham has raised $2.7 million, more than twice as much as Harder, and carries the inherent advantages that come with incumbency. Prem Ramaswami, who works at Alphabet's Sidewalk Labs, is putting his support behind Harder, contributing $1,000 to the campaign and encouraging others to join. "I was really impressed that Josh was returning home to run for Congress in his district at a time when many of our rights and norms are being attacked," said Ramaswami, who met Harder at Harvard, where they were both studying. Ramaswami said he was so drawn to Harder's focus on health care and immigration that he decided to host a fundraising brunch of his own at his home in Sunnyvale, inviting a tech-heavy crowd of friends and neighbors.

'Focus-magnet district'

Harder said in an interview that he's been focusing his campaign locally, but the competitive nature of the race has spurred individual contributions from across the state. "This is a focus-magnet district for everybody," Harder said. Other than the seats that are already blue, "it's the only winnable election we have in Northern California, so to the extent other folks want to help, that's great," he said. As one of the richest areas in the country, Silicon Valley certainly has the economic means to spread the wealth. The median household income in its two districts is more than $120,000, or about double the median income in Harder's district, according to U.S. Census data. There's likely a lot more tech money and support to come as November nears. Swing Left and Tech for Campaigns, two organizations that focus on progressive candidates, told CNBC that they've received a flood of interest from Silicon Valley. Jessica Alter, co-founder of Tech for Campaigns, said it has nearly 2,000 volunteers from California, and that about 60 percent of its overall volunteers are first-time activists. But both organizations said they won't be mobilizing volunteers and money in California until after the primaries. District 49 is one reason why. In campaigning for the seat that Issa has held since 2001, Levin is one of four Democrats competing against a field of seven Republicans and one independent, according to fundraising records. Levin has significantly higher contributions from the tech space — led by Alphabet — than his competitors, but he's raised less overall than two of his Democratic challengers. Levin, who spent more than a decade as an environmental attorney, is focusing his campaign on clean energy, affordable health care and preventing gun violence. "This election is either going to be a validation of what this president stands for or a repudiation of it," Levin said. "As Californians, we stand up for a clean environment, we stand for those who are most vulnerable and we stand for equality."