I understand that during the Middle Ages the Doge of Venice was elected by the people in a similar fashion to a modern republic, though the Doge would have a lot more authority than a modern president/prime minister. I remember reading that the Doge would have to swear an oath, but what legal regulations and limits would be placed on the Doge, and what was the limit of the Doge’s power?
/u/AlviseFalier has written about the Doge of Venice before, and an overview of the Republic of Venice
/u/eldenv has written about how a Doge was elected.