Reminds me of https://en.wikipedia.org/wiki/San_Gimignano or the other Italian city-states like Florence. Same apparent dynamics, too: lots of insular clans creating little fortresses for their extended families while competing economically & socially inside the density of the city, always teetering on the edge of civil war.