I went through this after I moved in to my house. The PO had built a garage but not pulled a permit and one of my neighbors in back decided to report me to the city (won't go into that story). I had to apply for a permit with the city and submit drawings. The drawings did not have to be by an architect and I was able to do them myself. I did have to get an engineer to prepare some calculations on the truss system because the roof was not a conventional design and I found a guy to do it on a moonlight basis for a couple hundred bucks. An inspector had to come out and look everything over. I had to add some additional anchors for the lower plates of the walls into the foundation (earthquake) and I had to put GFCI's on each circuit for the plugs. He wanted to see the foundation so I had to dig in one spot so he could measure. That was about it - about an afternoon's work. Much less painful than I thought it would be. This was 15-20 years ago and I don't remember what the permit costs were but I'm sure the city has increased them a lot since they are broke.