The Codex was an artifact that was attributed to the ancient Protean civilization. This highly advanced piece of technology was discovered in 2367 in the ruins of a Protean base. It was created after the race determined that the universe was slowing down into a dead-like state. Thus, they created the Codex to fix the end of existence which was going to be responsible for reigniting the fires that fueled the universe and give it a second chance. This led to the Codex being placed in the asteroid belt in the Ubarri star which were all parts in the re-ignition process. When the time came, the Codex served as an information source which needed a driver to begin the rebirth of the universe.
It was discovered by an expedition team with Axael Krinn being the member who first found the Codex hidden in chambers beneath the ruins which were pristine form. The artifact itself was also active in the sense that after its discovery, it killed two of the team as soon as they came near it as well as maimed another two which included Krinn. It was only the actions of the expedition leader, Jadzia Dax that the other two surviving members survived after she dragged them out before succumbing to the effects of the Codex. Though unknown to them at the time, the deaths were caused because the Codex believed the explorers were its makers and thus shared to them all of existence which overwhelmed them which in turn caused the deaths.
Though she was physically unscathed, Jadzia was mentally scarred by the incident. In order to prevent anymore accidents from exposure to the Codex, she constructed the gate which was a holographic maze which only she could navigate. After which, she left a recording for a future Dax whereupon she erased her memories of the incident. The United Federation of Planets later established the Pandora facility to study the artifact. Starfleet scientists determined based on the available data that the Codex was a model of reality as seen from the outside. Observations led to them determining that it was plugged into the fundamental structure of space-time in ways that the Federation could not understand.
In 2375, the chief cryptologist examining the ruins, Axael Krinn, attempted to open the Codex but was unable to get past the gates developed by Jadzia Dax. As such, he held the entire research expedition at Pandora facility hostage and demanded to see Jadzia. With Jadzia deceased, this led to the Ezri Dax being dispatched to help in rescuing the captives and preventing Krinn from accomplishing his goals. Ezri Dax was unaware of the nature of the facility due to the memories being erased but eventually regained them allowing her to navigate the maze and activate the Codex which bonded with the Other. Forming the Catalyst, the entity sought to start the Beginning once the End had come. This conscious entity of boiling energy ignited and had to expand which meant it needed to rekindle life in a moldering universe. Bound to the space-time continuum and thus waited til the universe ran down after which it would renew itself whereupon a new universe would be born. Y'Lira Medoxa commented that the inhabitants of the next universe would owe their existence to the actions of the Catalyst. (DS9 short story: "Chiaroscuro")