Every particle in this cosmos whether transient or intransient is madeup of five constituents which are called Panchamahabhutas. Vastu is basically a science based on the balancing phenomena of these five elements in dwelling places or the places of other activities. Various ancient text like Vedas, Puranas, Samhitas and Jain Agams mention about the Vastu Principles for architectural constructions.
We have acquired the knowledge of Vastu Shastra from the four vedas namely Rigveda, Yajurveda, Sama Veda and Atharva Veda. Apart from the Vedas, lots of information regarding Vastu Shastra is available in the Puranas and in other ancient texts. The first mention of the principles of Vastu has been found in the Great Rigveda. After the vedas, four upavedas were also composed by the rishis. One of these upavedas is the Sthapatya veda, which is the upaveda of Artharva veda. With the passage of time Sthapatya veda was developed as Vastu Shastra.
The puranas which provide the knowledge of vastu are Matsya purana, Skanda purana, Agni purana, Vayu purana, Garuda purana and the Bhavishya purana. Matsya purana gives detailed information regarding rock carvings and the position and decoration of ceremonial sites and venues. Narad purana gives valuable information regarding temples. Similar information regarding temples is also provided in Vayu purana's but this purana deals with temples located at great height. Skanda purana deals with the principles of town planning and their layout. Metropolitan cities of the western civilisation would lose their lustre in front of the principles explained in this purana. Agni purana lays down the principles of residential dwelling units or residential houses. So we find that our classics are store houses of such vast knowledge.
Apart from these extremely ancient sources, there are many more granthas providing exhaustive knowledge regarding vastu. These are the Ramayana, the Mahabharat, the Arthshastra of Chanakya, Buddhist and Jaina granthas, Brihat samhita, Samarangan Sutradhar, Vishwakarma prakash, Mayamat, Mansar and Vastu Rajavallabh.