I just thought I'd toss some general thoughts your way, some of this may help you out.
- If you aren't going to focus on any military at all early on, consider making diplomacy a strong suit through your racial choices and techs.
- Keep in mind factories affect not only military production, but social production as well.
- Switch around your economy priorities often. Perhaps you don't need any military production for a brief time and you can spend nothing on it while you focus on research and social. Never set taxes so high that your overall approval rating is under 70%. Try to keep approval above 70% for every planet you have, when possible.
- Use your free colony ship on a larger planet, not the close by 4 or so quality planet you're likely to have. When you do colonize new planets, set their priority to social for that planet and get factories up first, since more factories mean you can build other structures faster.
- Consider building at least a couple of fighters, because a few ships is definitely better than no ships when it comes to keep up with the AI.
- Never underestimate the value of engine techs and speed bonuses, because whether it's a land grab, resource grab, or just getting trade going quickly, speed helps a lot.
- Starbases are critical. Grab those resources before the AI does, as much as possible, especially the green (economy) ones and red (military) ones.
- You may find it helpful to put all your eggs in one basket briefly. For instance, if you have mostly planets with no buildings on them yet, you might want to not only put factories down first (you should ALWAYS build factories first on a new planet!), but also put most or all of your spending on social so that you get those factories done asap.
- Long term, you should have mostly balanced spending. You need some in military to produce either military ships or constructors for starbases (you will really never lack for need of starbases probably until you can't build any more), social to keep your building construction and upgrade going, and research is obvious.
- Don't wreck your economy. You'll notice the AI often grabs up planets, and that's useful, but you can kill your economy if you grab too many planets too quickly, because they have maintenance costs before you even build anything on them. As you build those factories, your maintenance costs will climb a lot.
- Always build farms before your population on a planet caps out, unless you think that particular planet has enough population already.
To give an example of a good game, the one I'm about to finish has been strong the whole way. I am not the most powerful, militarily. But, I dominate most of the galaxy because I made it a priority to build colony ships early and starbases later on, combined with strong tech spending, so I have most of the map covered due to tons of cultural flips. I have a tax rate of over 50% which is normally bad juju, but I am keeping my overall approval over 70% at all times. I have a population that is essentially at the top of the graph and everyone else is almost entirely flat on the graph. But, my spending almost exceeds my taxes and tourism/trade income anyway because I have so many factories on so many planets. It's important to learn to ride that line where you're always just a step ahead of disaster.