A unified theory for multiscale constitutive modeling of composites is developed using the concept of structure genomes. Generalized from the concept of the representative volume element, a structure genome is defined as the smallest mathematical building block of a structure. Structure genome mechanics governs the necessary information to bridge the microstructure length scale of composites and the macroscopic length scale of structural analysis and provides a unified theory to construct constitutive models for structures including three-dimensional structures, beams, plates, and shells over multiple length scales. For illustration, this paper is restricted to construct the Euler-Bernoulli beam model, the Kirchhoff-Love plate/shell model, and the Cauchy continuum model for structures made of linear elastic materials. Geometrical nonlinearity is systematically captured for beams, plates/shells, and Cauchy continuum using a unified formulation. A general-purpose computer code called SwiftComp (accessible at https://cdmhub.org/resources/scstandard) implements this unified theory and is used in a few example cases to demonstrate its application.