Wikipedia
Esgaroth, or Lake-town, is a fictitious community of Men upon the Long Lake which appears in the 1937 novel The Hobbit by J. R. R. Tolkien. Constructed entirely of wood and standing upon wooden pillars sunk into the lake-bed, the town is south of the Lonely Mountain and east of Mirkwood. The town's prosperity is apparently built upon trade between the Men (descendants of the Edain and thus distant cousins of the DĂșnedain of Gondor), Elves and Dwarves of northern Middle-earth.
Esgaroth and Lake-town may have been separate settlements established on the same site, one predating Smaug's destruction of Dale and Erebor and the other built afterwards. There is mention in The Hobbit of "old pilings of a greater town" that could be seen at low tide.
Esgaroth appears to be a city-state, always independent of Dale, and a republic with no king (the only real republic shown in Middle-earth). The people had always elected from among the old and wise the Master of Lake-town and did "not [endure] the rule of mere fighting men."