There was a civil war in mainland China in 1927 to 1936 which resumed from 1945 to 1949. It opposed the People's Republic of China (PRC - communists) to the Republic of China (ROC - centrist/rightist party) . ROC lost and fled to independant Taiwan, ruling as an autoritative power at the beginning until transitioning to democracy since 1988.
this part is incorrect.
Taiwan (as a territory) was first brought under Imperial China control during the Ming Dynasty, then as the Qing Dynasty took over in the 17th Century the remnants of the Ming Dynasty fled there (until they were taken over by Qing forces in ~1683)
China lost the first Sino-Japanese war in 1895 and gave up Taiwan (and renounced its influence over Korea, paving the way for Japan to annex Korea just prior to WWI), but Taiwan was officially returned to China after it lost WWII.
the key part here that is the important part: Taiwan was given up by the Qing Dynasty in 1895, the ROC was founded in 1911 but lost the mainland part of the Civil War in 1949 and fled to Taiwan, but at that time there were already two "Chinas" - PRC founded in 1949 and the ROC which only ruled over Taiwan and some minor islands.
while it is true that the KMT ruled under martial law until 1988, Taiwan was not "independent" and a large part of the Taiwanese independence movement centers around this grey area.
so to say "independent Taiwan" is glossing over a lot of the background info that helps people to understand why 1) China wants to invade Taiwan so badly, and 2) why Taiwan is under US protection (which mostly stems from the need to stop communism starting in 1950 when the Korean War broke out, prior to that the US was essentially giving up on the ROC government... otherwise if communism conquered Korea, then the next target would have been Japan, which the US spent way too many lives fighting against and didn't want to lose)
(context - I was born and raised in Taiwan. I have many family members deeply associated with the KMT, but my dad's side is like 300 years of history rooted in Taiwan, so I have a very deep and unique perspective of what happens there)
Um, are you kidding? China's Naval forces do not compare toTaiwan, the US and Japan. Little known fact, Japan and Taiwan, though competitors, value and honor each other. Japan will be as much an alliy of Taiwan as the US, if not more-so. China can not win a Naval conflict concerning Taiwan.
fixed for you - Taiwan's naval forces do not exist in any meaningful capacity, their best ships are essentially leftover from the 1970s (Kidd-Class destroyers for example were originally built for Iran prior to 1979) - so you can leave Taiwan out of this.
Taiwan has been wanting to buy ships with AEGIS capability for the last 20 years, but the US refuses to transfer this technology to them. so until then, they can only rely on the US 7th Fleet and Japan to help defend.
Taiwan's entire defensive capability is built around destroying as much of the invasion fleet landing capability during the initial assault, and bottlenecking landing craft capability as there are not a large amount of beachheads suitable to land on. But the real strategy is to buy the island approximately 72-96 hours so allies (presumably US/Japan) can respond in time before it is too late to repel the attack.