It saddens me that it even has to be pointed out that the Federation has a civilian government. Obviously it does. Gene Roddenberry was a WWII veteran who fought against military dictatorships, so of course he didn't create an idealized future built around the very thing he fought against in the war. That should be obvious on the face of things.work.
I prefer to stick to what's on the screen. It appears the consensus in this thread is they have a civilian council, though aside from a one liner in TOS there's nothing to suggest the federation is a democracy, they could be modeled on China's one party government for all we know. They certainly appear to be communist since we're told there is no money, but it's not the modern version of communism either or any version that's been tried in human history.
As for whether TNG is hopeful... well, yes, in many ways to me it is. But it's also a bit disturbing, because to some extent it's based on the modern or pre-modern military, and the federation is highly hierarchical, so it's not clear that the crew will behave like good people if they have a bad captain. Are they only as civilized as the person at the top of the totem poll?
For example, in All Good Things, Picard basically orders the crew to commit suicide by flying into the anomaly. He does not explain to them why this is necessary, to it's kind of disturbing the crew might kill them-self because the captain says so. If Picard was wicked or senile or suicidal, he could have killed a lot of people and families without any check on his power.
Also in All Good Things, admiral Riker appears to start a war with the Klingon to save a federation medical vessel that entered contested Klingon space at Picard's say so. That's also kind of disturbing.
I think Star Trek would be more hopeful without the pew pew pew, but of course it would be much more boring.