Ancient Rome had a republic, just like the United States. Romans also had unofficial branches of the government, like judicial, executive and legislature. Both of the governments had a legal code. In Rome's case, it was the Twelve Tables. In the US, it is the Constitution.
Hope this helps.