I envision this less as an in-atmo craft and more like a space-dock/high-orbit shipyard.
Maybe it floats near an asteroid mining colony or belt. It's far enough away that it's not getting pummeled by the tumbling space rocks, but it has gun batteries just in case it needs to repel drifting debris or pirates. Manned ore haulers, known as freight trains, line up and are drawn slowly in by tractor beams. Once the processed ore is off loaded by drones, the upper level factory sets to work building mining equipment, miscellaneous drones and bots, and even recycles ore containers and ships.
Larger vessels are beyond its manufacturing capabilities, but damaged craft can dock at any number of repair bays.