You have the right idea.
If you're doing all the work, you ought to get paid
for your time, before sharing the income with investors.
Don't worry, it will make sense to them, too.
After all, if they invest their money, they want the business
too succeed. It won't, if you can't afford to work there.
So, first, you'll need to select a business structure -
either a partnership, or an LLC, or a corporation, or an S-corporation.
The folks at Nolo Press have some articles about the structures -
and they have some good books on how to form these entities yourself.
Of course, it really helps if you have a good tax professional
in your corner to help you understand the tax effects of your
attorney's recommendations. And if you have investors, it's wise
to have an attorney to protect your interests.
OK, so how do you get paid?
Absolutely, DO build in reasonable compensation for yourself.
If your entity is a partnership or an LLC that files as a partnership,
you can't have a salary. You get what's called a guaranteed payment.
That can either be a fixed monthly amount, or a percentage of sales.
All you have to do is to define it. In fact, you can even have the
company pay your benefits - like medical, sick time, vacation time.
Just spell it out in the agreement with the partners or members
(if it's an LLC).
If you create a corporation, you must have an actually salary,
with payroll witholdhing and everything. You can have the company
pay for your benefits and deduct them.
With an s-corporation, the company may not pay for your benefits
if you own 5% or more of the shares. If the company pays for them,
you'll have to add the cost to your own payroll.
So that's how you'll get paid.
In all cases, your investors will get paid their share of the profits
after your compensation - and perhaps even after you keep a reserve
for next year's operations or growth. You can spell that in the agreement.
Remember, be sure you are being paid enough so that you don't have
to struggle. Otherwise, you will be distracted, looking for outside
work, or so frustrated that you do poorly.
Read more information in the Nolo books and on their site before you
talk to any professionals. It will help you have more control of your
situation and to arrange the best deal - for everyone concerned.
Good luck in your new business.