I'm on an F1 visa and have been working as the sole founder of my startup since May. You have to apply for OPT and choose the "self-employed business owner" option.
The biggest problem is that OPT is valid for one year, plus 17 months if you're coming from a technical (STEM: Science, Technology, Engineering and Mathematics) degree. So you have about 2.5 years to do something so big that you can transition to something else (EB-5, startup visa?).
Feel free to ask me more, I did lots of research in this area before quitting my job and starting to work full-time for my own business.