I actually liked your previous post of Venice and Genoa reestablishing as Singapore like States, that is actually the challenge.
Yeah, but it is a hard one. The geopolitical and ideological context was pushing right in the other way. It is marginally easier for Venice (which, like Singapore, is after all separated from the mainland by a body of water, and had also a much more independent streak AFAIK, somewhat lasting to this day). Ok, I'll go for this.
1849. Garibaldines actually show up to save the day in the last days of the insurgent Republic. This ties down enough Austrian forces that the resumed war with Piedmont drags on, instead of ending with a single decisive Piedmontese defeat. Maybe Russia hesitates to intervene in Hungary so Austria remains embattled. Odds still are that the Austrians win both in Hungary and Lombardy, but maybe this lasts into 1850, and Vienna is busy enough (Hungary, Prussia) that they let Venice be for the moment. By 1851 the tiny Republic is entrenched and public opinion abroad sympathetic. Maybe Austria opts to exact a vengeance from Piedmont in the form of the formerly Milanese land between the Ticino and Sesia river, as compensation but Hungary is restive enough that a protracted siege of Venice is set on the back-burner. Eventually, a very uneasy armistice is reached whereby the Austrians realize it is cheaper to exile all Italian malcontents to Venice than having them around. So they tacitly accept the de facto existence of the Republic (while still notionally claiming it as a part of the Venetian-Lombard kingdom not to lose face). Owing no gratitude to Russia, they join the *Crimean War, but that backfires as Hungary and Italy rebel again, Prussia makes worrying noises, and the army does perform underwhelmingly. Napoleon III questions the wisdom of allying with Austria ever again and turns to tiny Piedmont, that after a more heroic and humiliating defeat has turned more radical in its "irredentism" against Vienna, but also more absolutist than IOTL. It has reformed into a militarized, vengeful little power, but is not as attractive to Italian democrats and liberals. An Italian War of Independence similar to OTL happens around 1858-59 with a similar French intervention. Garibaldi is in Venice ITTL and in no mood to cooperate much with Turin, so while he organizes agitation against Austria, Naples may be left alone for now.
The Austrian rotten structure of an already battered army shatters and Lombardy and Venetia join Piedmont in a Kingdom of Upper Italy. The King reasons, like the Austrians before, he's better off keeping all those liberals in Venice, claiming he's respecting the Republic independence as a reward for the services the city did to the national cause (the reason adduced for not bothering with San Marino IOTL). The Republic is then internationally recognized.
Nowadays, the Most Serene Republic of Venice has lost much of its older tradition of political radicalism. The city-state where the First International routinely met and the Second one was permanently headquartered, where most of the Democrtatic, Republican and Anarchist plotting took place for three generations, where many dissidents from all over Europe found asylum in their exile, is now a hyper-capitalist mix of tourist trap, tax haven and de-luxe resort-with-casinos. Independence means little for a country that has to import essentially all foodstuff and manufactured items from the adjoining mainland (except for the few celebrated Sant'Erasmo artichokes and a little seafood) and therefore cannot afford not be in customs and regulatory union with it in most cases (though many drugs allowed in Venice are not so in Italy, so you may still be inspected by customs offices in Mestre over the bridge; other laws also differ: prostitution is emphatically legal and regulated in Venice, for both sexes; financial regulations are also a lot looser, and gambling, which Italy strictly regulates, is a thriving industry). However, Venice clings to her Republican distinct insititutions and symbology as more fiercely as they have actually little impact on the world. The Republic is home to some 120,000 permanent residents, over two-thirds of them being citizens, but the people in place there at any given time are between three and five as many, the rest being made of temporary residents and temporary visitors, either tourists or businessmen, who may ironically add to their visits the sight of the burials of Giuseppe Mazzini, Giuseppe Garibaldi, Karl Marx, Friedrich Engels, Mikhail Bakunin, Lev Bronstein, Rosa Luxemburg and William Morris.
Sorry, no idea how to do anything like this with Genoa.