From cosmological structures to the milky way