Is it legal to put a door right next to a wall, or do I need a couple studs in between? Check out the picture of the proposed for location. It will have double 2x6 top plates, with double 2x12 rim joists running parallel to that wall.
I usually have a min. of 3 studs from an adjacent wall.
This gives you the room for casing, and clearance for the door knob.
I agree.
I also question why you are building your walls that way? The bottom plate should be laying flat not upright

On a side note, is that redwood 2x6's? I've never seen NEW pine or fir lumber that dark.
As I recall you're planning on putting a second floor on top of this structure. If that's the case then you need a fully framed corner.
As others have pointed out trimming out a door that's up tight against the corner is problematic.
As FordTruckWrench pointed out you also need to consider what the wall sheathing is going to attach to on the ends of the walls.
