When did China become a Republic?
Republic of China (1912–1949)
Republic of China, as a state and republic in East Asia, controlled the Chinese mainland and Mongolia from 1912, when it was established by Xinhai Revolution, which overthrew Qing dynasty, the last imperial dynasty of China, to 1949, when its government fled to Taipei due to Kuomintang's failure in Chinese Civil War. Republic of China's first president, Sun Yat-sen, served only briefly before handing over the position to Yuan Shikai, leader of Beiyang Army. His party, then led by Song Jiaoren, won the parliamentary election held in December 1912. Song Jiaoren was assassinated shortly after, and Beiyang Army led by Yuan Shikai maintained full control of Beiyang government. Between late 1915 and early 1916, Yuan Shikai tried to reinstate the monarchy, before abdicating after popular unrest. After Yuan Shikai's death in 1916, members of cliques in Beiyang Army claimed their autonomy and clashed with each other. During this period, the authority of Beiyang government was weakened by a restoration of Qing dynasty.
1954 Constitution of the People's Republic of China
This constitution was published based upon 2 documents: one is “The Common Program of the Chinese people’s Political Consultative Conference (CPCPCC)”, and the other one is “The Organic Law of the Central People’s Government of the People’s Republic of China”. The Constitution of 1954 was the first constitution of socialism in China. In the constitution of 1954, it includes the Preamble, four chapters, 106 articles, and it defines “the national flag of People’s Republic of China is a red flag with 5 stars” (Art 104); “the national emblem of the People’s Republic of China is: in the centre, Tien An Men under the light of five stars, and encircled by ears of grain and a cogwheel.” (Art 105); and “the capital of People’s Republic of China is Peking.” (Art 106) 
During the development of socialism, the Constitution of 1954 stipulated the task for the ongoing Chinese Communist state. Compared with the Constitution of 1949, the constitution of 1954 narrowed the definition of the regime in China. Under this situation, China finally became a Communist country. 
On the eve of the Cultural Revolution, Liu Shaoqi, then the PRC President, fell victim to the Constitution itself. Although constitutionally Liu could not be removed, the force of the dawning Cultural Revolution was too great, and Liu had to leave the Presidency behind.