São João da Madeira (), is a city and a municipality in northwestern region of the Portuguese Norte region. It's part of the larger Porto Metropolitan Area, located 30 km from central Porto. The population in 2011 was 21,713. With an area of 7.94 km2, it is the smallest municipality in Portugal. In 2010, the city was distinguished in Portuguese quality of life studies as the "Best Municipality to Live In". São João da Madeira stood out also recently by introducing in 2011 the Industrial Tourism in Portugal and, in 2012, becoming the first Portuguese municipality to offer almost integral wireless coverage in its municipal area. History The origins of São João da Madeira extend back to the consecutive settlements by Celt, Roman, Moors and Visigoths. Yet, historically the first mention of São João occurred in 1088: the first reference was the phrase Uilla de Sancto Ioanne de Mateira, that appeared in the sale of lands in the territory. The designation of "Madeira" that appeared was in reference to the abundance of trees and forest, that continued to exist in the region. In the 19th century, São João da Madeira registered an intense growth, the fruit of commercial and industrial development linked to the manufacture of hats and dairy industry. J. Gomes de Pinho was the first empressario to establish a hat factory in 1802, but it was António José de Oliveira Júnior, an ex-functionary who would drive the local industry with his establishment in 1892 of the first fur hat factory. It would eventually become one of the major symbols of São João da Madeira's new economy, the Empresa Industrial de Chapelaria Lda. Totally mechanized by the early 19th century, it would become the largest factory in the Iberian Peninsula by the end of the 19th century. Oliveira Júnior was recognized by the national government, who issued him a diploma of Industrial and Agricultural Merit, its citizens later honouring him with a bust and the naming of one of its roads. The prosperity that developed, also supported by the nacscent growth of the footwear industry, allowed the growth of a dynamic centre that attracted more inhabitants with the possibility of work. With progress and modernization there was a radical alteration in the architecture of the community. The primitive church was demolished in 1883, and the following year the new temple was blessed and inaugurated (11 July 1888). In 1908