Seriously, look up your local zoning rules. It's not "you can't build a chemical plant next to a preschool" like it's so often portrayed. It's minimum size for the lot, max square footage of the house based on lot size, max/min frontage, height allowances, max garage sizes, minimum number of trees, number of windows.... etc.
It really just goes on like that, and then to top it off, you can be totally compliant with code and still not be approved. Either because of local incompetence (building permits stuck "in review" for years) or because of local opposition.