Before the nation was established as a Democratic Republic? Perhaps you don't recall, but representatives from each State were sent to Philadelphia to vote on the question of Independence.
"The declaration was signed by representatives from New Hampshire, Massachusetts Bay, Rhode Island, Connecticut, New York, New Jersey, Pennsylvania, Maryland, Delaware, Virginia, North Carolina, South Carolina, and Georgia. "
Once they had established a Democratic Republic, elections became the normal way to handle issues of significant importance to a state.
The Revolution had been going on for over a year at that point. We had fought at Lexington, Concord, Bunker Hill, had captured Fort Ticonderoga and invaded Canada. Was all of that illegal up until that point when the magic words were invoked?
I notice DiogenesLamp uses that term "Democratic Republic" several times in this thread.
It's an odd term for a conservative site, we usually say "constitutional republic", and avoid language which sounds uncomfortably close to "Democratic Peoples' Republic".
It also reminds us of the constant Democrat political complaint that President Trump "is undermining our Democracy", where the key to understanding is that "the Democracy" is simply an older term for "Democrat party".
So yes, it's true that President Trump hopes to undermine "the Democracy's" one party rule over the United States.
Regardless, "Democratic Republic" was not our Founders' original intentions in, say, 1776 or 1787, but rather a constitutionally defined representative republic, those representatives elected by strictly authorized voters.