When I started on BYC years ago - people were discussing coops attached to their house or underneath their sun decks. They found out either they couldn't do it because city/town codes prohibited it due to fire hazards (wood shavings, being so flammable etc) or their home insurance policies would be voided for the same reasons. I don't know if this would be the case where you live. But it might be worth finding before you make any changes.