At the point of independence Indonesia was still a Federation. However many saw this as divisive and as an unacceptable colonial legacy.
Sukarno in particular recognised that it had "bad connotations." He favoured centralism. So on 17 August 1950 federalism was scrapped in favour of a unitary republic.
Sukarno had already -in 1945- articulated "five principles" around "faithfulness", democracy, internationalism, social prosperity and national unity. However it wasn't until 1955 that those ideas were tested in a national election. The Nationalist PNI won 22%. The PKI, the Indonesian CP, got 16%.
There was of course a multiplicity of parties. By 1957 Sukarno had grown tired of the party system and spoke of a "guided democracy" that would produce more of a national consensus.
His profile internationally meanwhile had risen. In 1955 an Asia-Africa Conference was held at Bangdung, West Java. It spawned the Non-Aligned Movement, the concept of the Third World and the notion that nations need not necessarily side with either the US or USSR in the Cold War.
Through all this the PKI continued to prosper. It had 3.5 million members and a strong base in the womens', youth, peasant and cultural movements. Its "unilateral action" -seizing land from large owners- was particularly popular.
But reactionary forces were waiting in the wings. There was some confusion in military circles s to whom could really be regarded as a "Communist." The "ever-helpful" CIA assisted with its list of people who could be rounded up.
In the end some 500,000 were slaughtered by the the time Suharto officially became President in 1968 (Vickers 2005).