If it's a single story plan on making it free standing (not attached to the house)
Never have it any closer the 4" of any door openings.
Use 6 X 6's not 4 X 4's.
Do not just attach the the rim joist to the outsides of the post, you need to cut into the sides of the 6 X 6's instead.
Trying to "save" money by under sizing the joist is a very common big mistake.
Though bolt all the rim joist, do not just nail them.
Only use ACQ apprive fastners!