Despite what some pundits have told you, things aren't bad. President-elect #trump, although being the party nominee isn't going to be able to get any of his policy proposals. Before I get completely dismissive of Trump's actual chances in 2020 first let me do a post mortem because we'll need it..
I respect Secretary Hillary Clinton greatly, maybe more so than I did before because of the way she has handled the entire ordeal and how she held on to huge chunks of the Obama coalition. But fact of the matter is, it wasn't enough, and she made several very critical mistakes.
See the mistakes
Mistake No. 1, which was the worst one in my opinion (debate that however you wish), is she gave up the white male vote. Every normally fairly moderate/liberal white male voter that would normally be receptive to the Democrat's message was ignored. They had felt like they'd been overlooked for many years in many different ways, but President Obama, at least, never completely alienated them. His original promise of trying to appeal to Republicans while ultimately failing gave white men comfort that they wouldn't be entirely left behind. Clinton, on the other hand, had "Women for Clinton, LGBT's, blacks, Latinos, young voters, Muslims, etc.," but not once, in any recent campaign speech, had she specifically tried to appeal to the white male voter, essentially giving them (and their wives) up to Trump who championed them in the most important states.
Mistake No. 2 was that her vice president choice was ill-advised from the very beginning. Kaine probably infuriated more Hispanic voters than actually brought into the camp. He had no appeal whatsoever to the rust belt states, and he made many young liberals choose instead to stay home. (Julian Castro or Elizabeth Warren would've been a much better choice for many many reasons.) Although I liked Kaine over all, he was too "safe" of a choice especially in a year when "flaming asteroid" was a competitive presidential candidate.
Mistake No. 3 was she had too much confidence going, and with every news organization and election prognosticator giving her huge odds to win despite almost never breaking 50 percent in the polls was a grave miscalculation. (Give credit to Nate Silver of FivethirtyEight, he was one of the few that cautioned her chances.) For a group of people that think contrails is a real thing, seeing everyone discounting their guy only energized them even more. And Clinton should've known the change argument would be a huge weakness for her, election 2008 being a perfect example.
Her last mistake involved her misuse of funds. She wasted money on a ground game when she should've probably used large amounts of funds on social media.
The future analysis
In the coming days I'm going to write more on what has happened and what needs to happen to remedy the situation, for the country and for our party, but right now, I think first we must acknowledge that Trump ran a very good campaign and the loyalty of his supporters and his party really caught everyone even him by surprise. However, the true test is yet to come, and I can say with some certainty. He starts out as being one of the most disapproved candidates ever in history, and unlike 2016, there isn't a "At least he isn't as bad as blank" because now he has to be judged on his own merits.