Iran is not a true Theocratic Republic. I'll make a brief note of it. Iran has a complicated and an unusual political system that that meets no Western designation of governance accurately. Rather it combines elements of a modern Islamic theocracy with democracy.
The governmental bodies are connected to one another in complicated relationships. The most accurate terminology is a non-western one, "Wilayat-e Faqih" (Guardianship of the Islamic Jurists). It is a republican democracy overlapped by a
Islamic guardianship.
In a true theocracy, the inhabitants of the state believe that divine power governs an earth-bound human state, either in a personal incarnation or more often through religious intermediaries (i.e., a church, a pope). This authority then replaces/ dominates the civil government. Theocratic governments enact & implement 'theonomic' laws. Hence, Iran is not a true theocracy. It is a state where religious affiliation and influence is present in both governance and legislation. This alone does not render it theocratic. Greece also has a state religion yet it's a secular democracy. Vatican city is theoretically (in actuality it is administered by Papal councils) in control of the Pope-- a divinely appointed intermediary as per Roman Catholic belief-- and thus functioning as a true theocracy.
Therefore, at best, Iran is a theocratic democratic republic, which in itself is a new term altogether and an entirely new form of governance. As for the Supreme Leader, he is elected by an unelected body (The Assembly of Experts, 'doctors' of Islam). In powers he is above the President (and in effect the true head of state) but it has to be emphasized that he is a Jurist, a judge. A more accurate term for the رهبر معظم, (Rahbare Moazzam) would be Supreme Jurist. The term "Supreme Leader" is purposely used by the Western media to associate the system with autocratic rule.