Algebraic structure of codes over Fq, closed under arbitrary abelian group G of permutations with exponent relatively prime to q, called G-invariant codes, is investigated using a transform domain approach. In particular, this general approach unveils algebraic structure of quasi-cyclic codes, abelian codes, cyclic codes, and quasi-abelian codes with restriction on G to appropriate special cases. Dual codes of G-invariant codes and self-dual G-invariant codes are characterized. The number of G-invariant self-dual codes for any abelian group G is found. In particular, this gives the number of self-dual l-quasi-cyclic codes of length ml over Fq when (m,q)=1. We extend Tanner's approach for getting a bound on the minimum distance from a set of parity check equations over an extension field and outline how it can be used to get a minimum distance bound for a G-invariant code. Karlin's decoding algorithm for a systematic quasi-cyclic code with a single row of circulants in the generator matrix is extended to the case of systematic quasi-abelian codes. In particular, this can be used to decode systematic quasi-cyclic codes with columns of parity circulants in the generator matrix.