Things such as catback exhausts and cold air intakes are relatively easy for companies to make California smog legal. When it comes to software reflashes, intake manifolds, headers, cylinder head swaps, etc, that gets more difficult. When adding forced induction such as a turbo or supercharger, it is illegal as all bugger hell unless the company that supplies it has gone through the entire CARB certification process.
I can tell you more when it comes to engine swaps, etc. if you want to know.