So...you're talking about creating your own control panel!?! That is a HUGE undertaking. And from the sounds of what you are describing you don't know much about coding....
The control panel doesn't need to run as root to be able to execute commands. For example PHP has CLI where via the CLI...