I built my own pool with no violations, you just need to do your homework and hire good subs. That is where most homeowners get in trouble. They don't know anyone.
I general contracting on my own house, it was easy when you worked with the same contractors that I did electrical work for. They all were nice enough to watch out for me and any mistakes because when we were done building my house, I was wiring up their jobs.