Here is a common legal flow for startups just starting out:
- You'll want to first form your business. Either an LLC, C Corp or S Corp for most web startups.
- Get your post-incorporation documents in order if you ever plan on taking on investors and/or hiring people. This includes stuff like bylaws, initial board consent, restricted stock purchase agreement, confidential information and assignment agreements etc...
- Protect your IP. Decide whether you want to trademark your company name & logo, patent a process, draft NDAs etc. More on that here.
- Create a founders agreement if you plan on bringing or currently have co founders. See Raad Ahmed's answer to What topics should be covered in a founder agreement?
- If you plan on raising money from investors, decide whether you'll do a convertible note or equity round. If convertible note, you'll want an attorney to draft up a convertible promissory note, note purchase agreement, and board consent.