Pauline Kleingeld sums up Kant’s view of a republic in these words: “A republic is governed by the rule of law, not the caprice of a despot. The laws of a republic are enacted by the citizens through their representatives. In a republic, the legislative, executive, and judicial branches of government are properly separated from each other. Finally, neither the territory of a republic nor the offices associated with its government are the personal property of the officers in function.” (“Kant’s Theory of Peace” by Pauline Kleingeld; A Cambridge Companion to Kant and Modern Philosophy, edited by Paul Guyer)
According to Kant, the notion of “right” originates when the concept of freedom is applied to the external relations among human beings. In "Theory and Practice," he says that “right” denotes the “restriction of the freedom of each to the condition of its being compatible with the freedom of everyone, to the extent this freedom is possible in accordance with a general law; and public right is the sum of external laws that make such a universal harmony possible.”
Here’s another excerpt from Pauline Kleingeld’s essay:
“Public right requires, first of all, a state with just laws and the power to enforce them. In the absence of a just legal system with coercive authority, that is, in the state of nature, no one’s right to external freedom can be secure against violence by others (Morals, 6:312). Kant is not here making the empirical assumption that people are in fact prone to violate the freedom of others (although he certainly believes they are); rather, he is assuming the a priori idea that people are free and that freedom implies the possible violation of the freedom of others. This possibility alone is enough to require a system of laws and their enforcement to protect rightful freedom.”
The rights of the citizens are not Kant’s only concern—he grants certain basic rights to humans everywhere on earth. He proposes the idea of “Cosmopolitan Rights” for the first time in "Perpetual Peace," and thereafter in The Metaphysics of Morals. A cosmopolitan right is that which regulates the interactions between states and foreigners: it is concerned with issues such as migration, commercial ties, or attempts at colonial settlements. In "Perpetual Peace," Kant says that in cosmopolitan right, “individuals and states who stand in an external relationship of mutual influence are regarded as citizens of a universal state of humankind.”
Kant believed that republicanism is the only constitution that can safeguard man’s rights, and therefore it is the only constitution that by its nature leads to peace. In a dictatorship the rulers are free to burden their subjects with new taxes and use the revenue to launch wars. But in a republic, they have to get the consent of citizens before they go to war and Kant is of the view that as the citizens are naturally disinclined to vote for a war, there is greater likelihood of long lasting peace between republican nations.