I looked into it, maybe some of the stuff I ran into will be useful insight for you.
If I were to follow code I'd have no back yard. The city requires a 20' driveway from the property line, which happens to be 10' into my yard because there is no sidewalk. Terminating the 30' of concretr would be the parking area.. aka carport. I had it all planned out too. There's diagrams online, you can adapt stuff meant for agriculture if there's nothing exactly like you want.
Also, if it's attached I'd have to tear out my siding and make it all fire resistant. Same goes for my shed, it's in a far corner of my yard because if it was up against the house it would be a fire danger.