Another point not mentioned: you'll want to stay close to your starbase limit early on to help keep up your Cohesion.
Deep Space Black Site is a good building so I'd recommend building starbases in only systems with colonies if possible. Also always build a starbase in a system with an enclave. Black holes are good sites for starbases because of the building that adds physics research.
My starbases are always dedicated to either trade, anchorages, or shipyards; I never mix and match the three. Trade starbases get offworld trading companies. Anchorages get the fleet logistics one. Shipyards get the fleet academy and crew quarters. For the rest of the building slots, I'll build special curator buildings, the Black Site, and maybe one of the resource silo or hydroponics bay if necessary. I play with a lot of hyperlane connections so there's fewer choke points and defensive stations aren't as useful. But you still might want defensive based starbases in systems with wormholes.