I did some research on this topic in NJ.
Usually, the twonship controls this. Every town has a major plan and minor plan. You have to follow these rules. Usually, town has a building department. You have to talk with them.
Don't believe what they say. Ask them to show you the legal docuemnts.