There are various theories as how VaastuShastra came into existence. We will go by the first recorded ones. Among the four "Vedas" of Hinduism, the Atrarvaved mentions about "SthapatyaVed", which is about structures. This is regarded as the base of VaastuShastra. It mentions about VaastuShastra having a close relation with astrology. So certain Vaastu remedies are taken with the help of astrology. This science is called Astro-vaastu.