Period map is a powerful tool to study geometric objects related to K3 surfaces and cubic 4-folds. In this talk, we focus on moduli of cubic 4-folds and sextic curves with specified symmetries and singularities. We identify the geometric (GIT) compactifications with the Hodge theoretic (Looijenga, mostly Baily-Borel) compactifications of locally symmetric varieties. As a corollary, the algebra of GIT invariants is identified with the algebra of automorphic forms on the corresponding period domains. One of the key inputs is the functorial property of semi-toric compactifications of locally symmetric varieties. Our work generalizes results of Matsumoto-Sasaki-Yoshida, Allcock-Carlson-Toledo, Looijenga-Swierstra and Laza-Pearlstein-Zhang. This is joint work with Zhiwei Zheng.