A warning - everyone rushes online, all of the time.
Not everyone and not all the time, but sufficiently often that you should be prepared.
First things first: scout.
If the first you see of the enemy fleet is them invading one of your worlds, you're in serious trouble. What if, instead of thirty assailants, that had been two Vulkoras desolators? They could have bee-lined to your homeworld and destroyed it before you could get back. The bottom line is that you need
to be paying attention and actively scouting to know where your enemy is and what units he has.
As has already been mentioned, your best form of defense is repair bays. These go A LONG ways to keeping your fleet alive. Couple them with frigate factories (not on every planet, but such that reinforcements only need to make one jump to reach your front lines) and you can usually win any battle of attrition when on the defensive.
Don't count out starbases, just don't overuse them. Placing them on key choke points is a great move. Sure, your enemy can just go past them, but the thing is that if they want to get back either to retreat or defend they have to go through a starbase, taking away all antimatter and damaging their hulls. Doing this repeatedly just isn't in the cards. A well-placed starbase can be invaluable, but a poorly placed one is nothing short of a colossal expenditure.
I follow closely the idea that if I can keep my choke-points heavily defended, then I've nothing to worry about because if the enemy can't get past that one defended planet then I've bought myself all the time I want.
This will give you a lot of mileage against the AI, but you'll need to throw it out the window when fighting human opponents. What your opponent did was a textbook response. It's actually a sign of a bad or inexperienced player if they don't do this!
EVEN WITH the Vasari's Phase Tunneling, which I did have in place, allowing my ships to in fact intercept the enemy fleet
If you had phase tunneling, then we're actually pretty far into the game and this isn't a rush anymore. Secondly, if you needed
phase tunneling to counter this (ie, the enemy's fleet got the drop on you) then you weren't scouting well enough. Phase tunneling allows you to protect multiple fronts with one fleet, it supplements
scouting, but it does not supplant
Your problem here was that the enemy fleet was so much more powerful than your's. You need a competitive
fleet, even if you plan to play defensively. As I've already mentioned, scouting is quite important, and you need to keep your fleet positioned well. You need to have a fleet in position to actively threaten the enemy and deter brazen offensives like these. If your choke point is an asteroid, you can actually get a lot of mileage out of phase jump inhibitors to slow the enemy and to perhaps get some free shots off on their fleet.
Another option if you're determined to stay fleet light is starbase spam. Starbase approximately every second planet, focusing on the more valuable and strategic ones. When the enemy attacks, you head towards his empire and return the favour. Stock up on bombarding capacity and start starbasing strategic worlds in his empire. The goal is simple: when the dust settles, both sides will have ravaged much of other side, but you will control a network of starbases on the most valuable planets, blocking the enemy's movement and allowing you to pick targets of choice. Of course, the risk here is that the enemy fleet is still much more powerful than your's.