40 years ago, my father in law, who had grown up in the countryside north of Hong Kong, just over the border into mainland China, went back to the village of his birth. I remember him telling stories of a simple life, playing in the rice fields, and faded photographs of him riding water buffalo as a young boy.

Having moved to Europe he wanted to retain some presence in the small place. He bought some land, and built a small block of apartments which he hoped might grow in value and some day be a good pension for him and his family.

Over the past 30 years, the fishing village of Shenzhen has been reborn as a futuristic metropolis bursting with factories. It is the heartland of China’s tech revolution, dubbed the Silicon Valley of hardware. Now it is a boom town, the likes of which the world has never seen before.

In 1979, the Chinese government turned it into an experiment to grow capitalism in a test tube, designating it as the country’s first Special Economic Zone. The city is driven by an influx of workers from the countryside who make everything from real iPhones to fake Chanel bags. Shenzhen — and the surrounding Pearl River Delta — has become known as the world’s factory floor.

If you own a smartphone or computer, odds are parts of it came from here. It is now a megacity of over 12 million people. It has also become an incubator for cutting-edge design, a bastion of next-gen urbanism, and a leading cultural capital. Welcome to Shenzhen, the manifestation of China’s economic miracle.

To see why Shenzhen is called a rule-breaking tech hub, wander the endless wholesale kiosks of Huaqiangbei’s malls, where tech entrepreneurs, hackers, and makers gather. You will find every electronic component and gadget imaginable, laid out like so many spices in a bazaar.

This is ground zero for the production of shanzhai — “pirated” goods that are often less knockoffs than remixes, like an Apple Watch that runs on Android, has a removable battery, and is a quarter of the price. Naturally, the West frowns on shanzhai, but experts like David Li, a Taiwanese technologist and cofounder of Shenzhen Open Innovation Lab, argue that these bootlegs drive innovation. Hoverboards, he points out, evolved in the wilds of shanzhai production to become a global hit.

Meanwhile, the Chinese government is using Shenzhen as a showcase for its move from “Made in China” to “Designed in China” — a program to rebrand the country as a place that can invent, not just copy and mass-produce.

Another draw is Shenzhen’s distance from the capital. As the old Chinese saying goes: “The mountains are high and the emperor is far away.” Though the government engineered Shenzhen, its location in the Pearl River Delta, more than 1,300 miles from Beijing, gives it a more relaxed atmosphere. “Freedom is a really big word, but there is a sense of Shenzhen being more open in every way,” says Jason Hilgefort, an American architect and educator who leads the local urbanism academy Future+.

Schenzen is also home to some of China’s leading companies including the world’s leading electric car business BYD, and world’s leading drone maker DJI. And then add Huawei and Tencent.

Chinese tech infrastructure giant Huawei was founded in Schenzen in 1987 by Ren Zhengfei, a former engineer in the People’s Liberation Army. At the time of its establishment, Huawei focused on manufacturing phone switches, but has since expanded its business tremendously. It is the largest telecommunications equipment manufacturer in the world and the second largest smartphone manufacturer after Samsung.

Tencent is another leading business from Schenzen. QQ is a social media platform owned by Tencent with 850 million monthly users. WeChat even has 963 million monthly users. Tencent does not stop at these platforms. Their services include music, web portals, e-commerce, mobile games, internet services, payment systems, smartphones, and multiplayer online games All these services are among the world’s biggest and most successful in their respective categories.

More by Peter Fisk: