‘It’s a challenge out here. The way the tech companies are building and increasing their size is just pricing people out. Families who have been here for generations can’t afford to be here any more. They’re being pushed off into rural areas – anywhere from an hour to two and a half hours away.”

JT Faraji is a 43-year-old artist who lives with his family in East Palo Alto, the northern California city on the edge of Silicon Valley. Just a stone’s throw away, Facebook’s global headquarters is his most visible neighbour, and he is also close to a big new Amazon office. He has lived in the area all his life and talks volubly about fascinating aspects of East Palo Alto’s history – like the period in the 1960s when black activists set up a high school and college, and there was even talk of renaming the city Nairobi: “There are a lot of minorities here: Hispanics, blacks, Pacific Islanders,” he says. “But those people are not really represented in the workforce in technology. So the way that northern California is going to look in not too long is going to be very … undiverse.”

In 2017, as part of a local grassroots group called the Real Community Coalition, Faraji began to put pressure on Facebook to – among other things – address concerns about housing and hire more local people. The coalition protested, organised vigils and eventually sat down with people from the company to discuss what was happening to their area. “What mostly came out of that was a lot of hot air, pushing back,” says Faraji. “Basically stalling and stalling and stalling.”

Facebook’s headquarters in East Palo Alto. Photograph: Alamy

Facebook has a local hiring programme, but Faraji says its focus on people in their 20s has cut out most of East Palo Alto’s community. (In response to inquiries from the Guardian, Facebook acknowledged its work on local employment with a social enterprise called Year Up, which is dedicated to 18 to 24-year-olds, but also mentioned “community job fairs”, efforts to connect “local residents directly to Facebook recruiters”, and workshops on “resume writing and interviewing skills”). In late 2016, the company had also co-founded what it called the Catalyst Housing Fund, and contributed around $20m (£15.3m), though Faraji says he has seen no signs of the money being spent; Facebook says that two and a half years after the fund was established, there are now plans for 261 new affordable housing units, but that “timing of project completion depends on the city’s remaining approval processes for the projects”.

The Real Community Coalition has now fallen from view – partly, he says, because of the effects of Facebook donating to the very non-profit groups that have traditionally fought for local people: “They are usually the first line of defence, at least in our community: organisations that are trying to combat gentrification or fight for affordable housing or what have you. But now, some don’t want to bite the hand that feeds them. And then there’s just a massive population turnover that’s been happening in the last two years.”

Like a lot of what he says, the words are full of a deep sadness. “It’s hard to fight for people who are leaving, and no longer here.”

Anti-Amazon protesters at New York city hall. Photograph: Drew Angerer/Getty Images

The rest of the world is now starting to understand what the residents of East Palo Alto – and indeed, a huge chunk of northern California – have known for years: that big tech has not just colonised the online realm: it has an increasingly visible presence in the physical world. Leaving aside Amazon’s globally ubiquitous fulfilment centres, they, Facebook and Google now have huge premises – “hubs”, “campuses”, old-fashioned offices – in cities across the planet, with even more to come.

The change may have come too late for some of the people of East Palo Alto, but in the past two years or so, something has shifted. Now, as they are planned, proposed and built, these developments are increasingly being contested by coalitions of activists who follow each other’s campaigns and draw on a growing pool of knowledge and experience.

Because new big tech projects often arrive in areas beyond city centres, where property is comparatively cheap and many people from ethnic minorities have made their home, the campaigns against them are often led by people of colour. A big issue is the often cosy relationship between companies and politicians, who regularly do their best to push things along by sweetening planning agreements with tax breaks and generous grants. The issues proliferate: from the private takeover of public space, through basic questions of local democracy, to issues around work and pay. As cities endlessly expand and the power of tech corporations grows, if you want a sense of the future of grassroots politics, this is a very good place to look.

The forces opposing big tech recently won a key victory in the New York borough of Queens, where Amazon’s plans to locate a huge chunk of the corporate office project it calls HQ2 in Long Island City – where 25% of the population is African American and 40% Hispanic or Latino – were so fiercely contested that the company beat a hasty retreat. In the midst of a somewhat absurd competition between US cities to attract Amazon to their locality, proposals had included a package of tax breaks and grants secretly negotiated by the New York state governor Andrew Cuomo and the city’s mayor Bill de Blasio that totalled nearly $3bn. It also raised the link between Amazon and the US’s Immigration and Customs Enforcement Agency (Ice). The agency uses Amazon’s cloud computing services, and Amazon has tried to persuade its officials to use the company’s face recognition software: a huge issue among many of the communities often on the receiving end of Ice’s cruelties.

‘I’ve never run a campaign that only took four months’ ... Maritza Silva-Farrell, a leader of the campaign to keep Amazon out of Queens. Photograph: Demetrius Freeman/The Guardian

But perhaps the key focus for campaigners – who include local congresswoman Alexandria Ocasio-Cortez – was urban gentrification, and what activists call “displacement”: the way big corporate developments usually lead to local people being forced out of the places they call home. The Amazon development was centred on 25,000 jobs that the company said would be paid an average salary of $150,000: many locals saw the prospect of a huge influx of white, wealthy outsiders, and loudly opposed it.

A big voice in the campaign is Maritza Silva-Farrell, the executive director of the Alliance for A Greater New York (Align), a grassroots organisation addressing issues of inequality and the environment. When we speak, she is in Seattle, meeting politicians in Amazon’s home city in the company of activists from Nashville, where Amazon is committed to a new “centre of excellence” that will employ around 5,000 people. She says she has also regularly been in touch with people in Spain and Germany, where Amazon workers staged strikes about employment conditions last year: “We always speak about this campaign as a global campaign, because Amazon isn’t a local corporation.”

Was she surprised that her side won? “I’ve never run a campaign that only took four months,” she says. “The announcement came out in November and Amazon was out of the city by February. I’m hoping it signals to other corporations that they can’t come into town and say: ‘We want this, and this, and this – and we’ll create some jobs, but we’ll tell you how many later.’ You should come, and talk to our community, and see what the needs of the community are, and have a real plan of investment.”

Silva-Farrell is now having conversations with campaigners in and around Arlington, Virginia, where Amazon has plans to open what has ended up as the sole HQ2 complex, on much the same scale as what it proposed for Queens. Its location is very close to Washington DC; the finished development will feature huge apartment blocks, a 49,000 sq ft cinema and “a 23-storey luxury apartment complex with a private Whole Foods [supermarket] entrance”. The development will be named National Landing, though it sits amid places that already exist: Pentagon City, Crystal City, and Potomac Yard – where, as in Queens, rising rents and impossible living costs are already highly charged issues.

Every aspect of the Virginia story echoes what happened in New York. Amazon will receive “performance-based incentives” totalling around $750m (£575m) from the state authorities if its plans come to fruition. With Arlington County’s hotel tax revenue expected to rise with Amazon’s arrival, the company will also get up to 15% of a local tax on hotels if it meets certain goals for how much space its new offices fill. In case anyone thought this wasn’t quite generous enough, two weeks ago, county authorities in Arlington also approved a package of “pay for performance” grants to Amazon that could total $23m.

A young protester makes his point at an Arlington county board meeting discussing Amazon’s development plans. Photograph: Nandita Bose/Reuters

The meeting where this happened was addressed by activists from a local coalition called For Us Not Amazon, whose leaders say that among the biggest issues they face is people’s lack of awareness about Amazon’s plans. Danny Cendejas is an organiser with La ColectiVA, a grassroots organisation working among Virginia’s Hispanic and Latino communities. What often hits him, he says, is an engagement gap made worse by the failure of both Amazon and the relevant local authorities to open up to people how their decisions will directly affect them – it is grimly symbolic, he says, that “on the county board’s website, if you go to the link in Spanish and search ‘Amazon’, there’s not a single hit that comes up”.

Like the Queens campaigners, Cendejas is appalled by Amazon’s links to Ice and its work. Local officials and politicians, he says, ought to “publicly call on Amazon to end collaboration with that. They should be willing to be courageous and call on Amazon to do that, if Amazon want to be good neighbours.”

The other subject he talks about is the fragile state of communities threatened by rising rents and property prices. “The issue is here already,” he says. “In this past year alone, from the conversations I’ve been having with people, there’s been an increase of around $200 [a month] in rent. For folks who are working paycheck to paycheck, that’s a huge difference.

“At least five of the families I’ve been working with over the last six months have had to leave the area because of the cost of living. Amazon would exacerbate that, particularly as there have been no guarantees that people could carry on living where they live.” The least that should happen, he says, is that the proposed giveaways to Amazon from public funds could be taken back, and invested “in affordable housing, to be anti-displacement. That’s an obvious idea.”

When I contact Amazon for its take on both its pull-out from Queens and opposition to its plans for Virginia, the company does not respond. Cendejas, by contrast, is very vocal about the threads that connect both stories. “The Queens win was a win for all communities of colour, and all low-income communities and all immigrant communities across the country. We celebrated with them. The concerns that people in Queens had were the same concerns we have here. And they’re not being addressed.”

A banner protest against Google’s plans to open a campus in the Kreuzberg area of Berlin. Photograph: Sean Gallup/Getty Images

Resistance to big tech is not only gaining momentum in the US. In November 2016, Google announced that it was going to open a new “campus” in the Kreuzberg area of Berlin. Aimed at providing a space in which employees could mentor new tech startups, it was to occupy 3,000 sq ft in a disused electricity substation, located in the heart of one of the city’s most renowned neighbourhoods.

In the days of the cold war, Kreuzberg became a byword for West Berlin’s Turkish population and bohemian subcultures: it was the one-time stamping ground of David Bowie and Nick Cave, and attracted thousands of punks and hippies avoiding West German national service. Twenty-seven years after the fall of the Berlin wall, it had become a noticeably more affluent area, but still retained enough of its old identity to convince Google it was a perfect place to be.

In response to the company’s announcement, the city authorities seemed exultant: “Today is a good day for Berlin,” said the city’s mayor, Michael Muller. But the fact that Kreuzberg had held on to an enduring idea of its outsider status eventually proved to be Google’s undoing, thanks to a loose coalition of local activists who were set on keeping it out. One of its elements was a group of techies elegantly named Fuck Off Google. Another was a neighbourhood organisation called Bizim Kiez, meaning “our quarter”, whose activists had first come together to save a Turkish shop. A third was GloReiche (a play on the German word for “glorious”), another neighbourhood collective that had recently worked to keep a bakery open.

One of GloReiche’s prime movers is Stefan Klein, a self-employed media law specialist who has lived in Kreuzberg for a decade: “We thought Google would be a tough opponent,” he says. “Everybody loves Google, everybody uses Google, Google is free, it has great products, and so on and so on. We thought: ‘It will be difficult to tell people why we think this is a bad idea.’”

Very quickly, though, opinion began to turn. In the past five years, rents in Kreuzberg are reckoned to have gone up 30% – and there was widespread fear that Google’s arrival would push them even higher. The fact that the new campus was intended to develop startups suggested to many Kreuzbergers that it would essentially amount to a gentrification factory, sending out swarms of new tech businesses to eventually take over the neighbourhood. And as Klein explains, there was also a fear of what the company’s arrival would mean for deep issues about the area’s infrastructure, alongside concerns about the opportunities that would arise for the company to harvest an ocean of information about people’s lives on the basis of what was planned in Toronto (more of that below): “Wherever Google goes,” he says, “they take over. They offer public services like transportation, or even controlling traffic lights – everything. For free, they say. But it’s never for free: they always want data. That’s the point.”

‘Wherever Google goes, they take over’ ... Kreuzberg campaigner Stefan Klein

Throughout their campaign, the Kreuzberg activists were in contact with grassroots anti-Google campaigners in Toronto and the company’s home city of San Francisco: comparing notes, pooling research and keeping in touch with each other’s activities. And after months of street protest, meetings, and door-to-door canvassing, in late October 2018, Google announced that it was pulling its plans: it would retain its lease on the property in question, but for the next five years, the space would be used by two social enterprises.

The company will not be directly quoted on its plans, but a Google spokesperson says he is confident the new arrangement will be “something for longer term”. Klein remains sceptical: “I think they’re hoping that we’re asleep, and we’re not fighting any more, and they can move in easily,” he says. “We’re doing more actions again in May – telling people what is happening. Because they’ve heard it from the press, most people think: ‘Oh, they’ve won, everything is fine.’”

He suddenly sounds worried. “We don’t think so.”

In Toronto, perhaps the most jaw-dropping story to date about big tech and the future of cities is rapidly taking shape. The city’s waterfront is reckoned to be the largest area of undeveloped real estate in North America – which, under the supervision of a public body called Waterfront Toronto, may soon be transformed. The company in charge will be Sidewalk Labs, an offshoot of Google that “imagines, designs, tests and builds urban innovations to help cities meet their biggest challenges”.

Reflecting ideas being developed across the world, what they have planned is a “smart city”, at the cutting-edge of just about everything. If it comes to pass, its basis will be 17,000 units of housing, 40% of which would be dedicated to “lower- and middle-income families”. Just about all its buildings will be based on the use of wood. There are plans for prototype “raincoats” that would cover open space and thereby regulate the climate. Some streets will be “dynamic”, so their use – by pedestrians, bikes, or cars – could change throughout the day.

Toronto’s waterfront is considered to be the largest area of undeveloped real estate in North America. Photograph: Creative Touch Imaging /NurPhoto via Getty Images

Perhaps most importantly, the efficiency and environmental sustainability of the whole thing will be based on the use of huge amounts of data generated by its residents as they go about their daily lives. Sidewalk Labs says people’s privacy will be protected by the fact that anyone using data will have to sign up to a “responsible data impact assessment” and that the ownership of data will rest with an “independent civic data trust”, but to many people, these inevitably sound like opaque, abstract ideas.

Waterfront Toronto says it has “made a clear, public commitment to the protection of public privacy” and that it will abide by a “privacy by design” standard developed by Dr Ann Cavoukian, a leading Canadian privacy expert. But along with another adviser to the project, Cavoukian has now pulled out of the project because of privacy concerns: “I imagined us creating a smart city of privacy, as opposed to a smart city of surveillance,” she says.

Sidewalk Labs’ arrival in Toronto was formally announced in October 2017, when the-then executive chairman of Google’s parent company Alphabet, Eric Schmidt, shared a stage in the city with the Canadian prime minister, Justin Trudeau. In the past, said Schmidt, he and his colleagues had thought “about all the things we could do if someone would just give us a city and put us in charge,” before he laughed, and added: “That’s not how it works, for all sorts of good reasons.” With his usual breezy enthusiasm, Trudeau said the development would be a “testbed for new technologies ... that will help us build cleaner, smarter, greener cities.” Eighteen months on, polls say 55% of Toronto’s residents support the plan.

Opposition to it has only just started to cohere – chiefly in the form of a new campaign group called Block Sidewalk. One of its key voices is Bianca Wylie, whose expertise lies in technology and public engagement. “No one even asked for this thing,” she says: “The people of Toronto didn’t want a smart city or a smart neighbourhood – and now we’re having the wrong conversation. It’s all, ‘How do we pull this off?’ Not, ‘Do we even want it?’ That’s the slide that happens.”

Wylie can talk about the data and surveillance aspects of what Sidewalk Labs seems to have planned, much of which remain unclear. But she puts more emphasis on the fact that the authorities in Toronto seem to have moved into talking about the details of the project before anyone has thought through the much more basic stuff, about how to create the right legal and regulatory framework for such a mind-boggling vision: “We don’t have policies and laws to manage something like this,” she says. “That’s such a fundamental part of the problem. In a democracy, you’re supposed to get your policies and laws in order first. Now, you’ve got the vendor at the table, influencing all these things.”

At first, it looked like the Sidewalk Labs smart city would cover around 12 acres. But last month, leaked documents reported in the Toronto Star revealed plans for the redevelopment of the waterfront to actually cover 350 acres (and house as many as 75,000 additional people), and that Google would take a portion of property taxes, development fees and tax revenue generated by increased property values. This, says Wylie, finally catalysed hostility to the whole plan: “If all these things had been identified at the beginning,” she says, “a lot more people would have sat up. That’s why [the way] they have been allowed to operate has been so fundamentally anti-democratic. If they had come out and said, ‘We want to finance transit infrastructure, we want a cut of development fees, we want to get in on municipal revenue’, you would have a lot of people organising, But that only came out because of a document leak.”

Towards the end of our conversation, Wylie mentions one more remarkable thing – the fact that what is planned for Toronto is unprecedented, in every conceivable way: “The fascinating thing about this project is, Sidewalk Labs has no résumé. They haven’t done anything. Usually when you get awarded contracts like this, you’ve got 10 or 15 years of experience. But these guys have nothing.”

Back in East Palo Alto, as well as expanding its existing HQ, Facebook has just taken another step towards plans for a new development called Willow Village, which will include a huge office complex, shops, hotels and a town square, and employment for more than 8,000 people. There will also be housing, but only 225 out of 1500 units will be set aside for “low-income households and seniors”.

“They are going to do some major, major expansion,” says Faraji. “And when they do, I suspect the rest of the people that look like me and have been here for a long time – the ones who are renting, anyway – are going to be gone. I just don’t see how people are going to be able to afford to be here any more.”

I wonder: does he have any advice for people fighting big tech elsewhere?

“Come together as a community. Do not allow your leaders to accept money for their organisations from tech companies. That’s what happened here. If you’re not together, it will be an uphill battle.”

There is only one question left. Does he think he’ll stay, even as Facebook endlessly expands?

What he says next cuts straight to the simplest kind of resistance: just staying put, and remaining defiant: “Oh, I’m not going anywhere.”