One of the disappointing aspects of Lucas's prequels was the missed opportunity to reveal more about the history of the Jedi and their relationship with the Republic.
In the original trilogy the empire is atheistic and materialistic while the rebels, despite being a multi-species coalition, seem united religiously, spiritually, and morally by a belief in the Force. This implies that the old Republic was racially diverse but nevertheless unified culturally under a single religion/spiritual belief and that the Empire not only supplanted the old political order but introduced a new dominant culture as well.
The Jedi, as a kind of warrior monk in this religion of the Force, would have been central to the unified culture of the Republic. I am reminded of the relationship between the Druids and the kingdoms of pre-Roman Britain. As best as we understand it, many different small competing kingdoms existed on the islands of Britain and Ireland, but they were unified culturally by a shared belief in the Druid religion. When the Romans invaded, they recognized the cultural importance of the Druids and their role in resistance to Roman occupation. As a result, the Romans massacred the Druids, culminating in a final battle at Angelsey, which is why history knows so little about the Druids. None were left to keep alive their rituals or beliefs. Roman imperialism could provide a template for later events in the Star Wars universe.
But what about the founding of the Republic and the role of the Jedi in its history? There isn't much to go on from the clues in the original trilogy, but fleshing out this idea is important. When I taught creative writing, I had my students read an essay about the iceberg theory, aka the theory of omission. In a nutshell, what appears on the page or the screen should be just the top of the iceberg, supported by a huge body of material in the writer's mind. With that said, here are my ideas for a backstory about the founding of the Republic, ideas that would likely never be elaborated upon or delivered as exposition in the prequels but nevertheless can help us craft new stories:
Thousands of years before the Republic, the first people to make a voyage between the stars settled on a new world. It was the first of many voyages, and soon fleets of ships were traveling between star systems, both human and non-human, exploring and colonizing planets throughout the galaxy. However this great migration took place slowly, at sub-light speeds and space travel meant leaving one's family and everyone they knew behind. Such slow speeds across lightyears of space meant that when a new world was reached, many years had passed on board while many more decades had passed on the planet. Many governments had risen and fallen in that time, many wars had started and ended, and the culture had changed. Successive waves of colonists had little in common with those who arrived before them. Inevitably there was distrust, dislike, and conflict between these colonists. Violence spread. Reinforcements sent from one star system to another arrived decades after a war began, sometimes even after the war had ended, which protracted conflicts for generations. Because of time dilation, violence and discord was the way of life in the galaxy -- until the Jedi arrived.
Their exact origins have been lost to time, but these monks spread through the galaxy at sub-light speeds, establishing temples and centers of learning on every planet. Via the Force, the Jedi could communicate with one another in real time across the gulfs of interstellar space and acted as peacemakers when new ships arrived from deep space. Often Jedi monks would travel between multiple worlds in one lifetime, which was rare because the time debt meant never seeing one's family and friends again. As a result, the Jedi developed a tradition of celibacy. The presence of the Jedi in the minds of trillions of people throughout the galaxy, as well as a shared religion of the Force, united the galaxy culturally and spiritually.
There was no Galactic Republic at this time. Instead, each planet had its own system of government. Some were dynastic kingdoms, others autocracies, others democracies, but because of religion and the Jedi themselves, they did not war against each other.
That is, until the hyperdrive was invented. It happened on a single world, a planet ruled by an ambitious and power-hungry king.
The peace established by the Jedi lasted for centuries until the hyperdrive was invented on a planet ruled by an ambitious king who realized he could use the hyperdrive, along with FTL communications, to conquer the galaxy. Faster-than-light travel and communications gave those who had them an insurmountable tactical advantage, and a war of conquest ensued. Successful at first, this king crowned himself emperor and ruled over hundreds of planets, but then in an unprecedented way the Jedi, using the Force and their telepathic abilities, organized a resistance and counter offensive, which ultimately defeated the emperor.
After the war, the Jedi took the hyperdrive and FTL communication technology and distributed it throughout the galaxy so that no one planet had an advantage over another. With the vast distances between star systems effectively gone, the galaxy soon faced problems of trade, cross-border crime, immigration, disease, et cetera. In response, a few planets formed an alliance that became a unified republic under a single central government. The Jedi promised to provide for the Republic's defense, but never to interfere with its governance. Over time, more and more star systems joined the Republic, especially toward the center of the galaxy. However, at the edges of the galaxy many planets remained non-aligned and independent, with the Republic in front of them and uncharted space behind them.
Immediately after the war, the emperor was captured and imprisoned, but many of his inner circle escaped justice and disappeared into the far reaches of the galaxy. Many in the Republic believed (correctly) that the frontier and non-aligned worlds provided them safe haven. In hiding and stunned by their defeat, these war criminals vowed never to be defeated again and began studying the Force and learning the ways of the Jedi. They retained dynastic titles like "lord" and formed the Sith, an evil order committed to the dark side of the Force, with a fascist ideology that might makes right and that human beings are superior to all other races.
However, they were powerless at the edge of the frontier, and throughout the galaxy a democratic peace lasted for thousands of years -- until the events of Episode One.