Hindu temples are built nit merely as Prayer halls. To call them as Prayer halls is erroneous. Temples are the places where positive vibrations are felt and those who go there are charged with positive energy. The power that reside in temples is due to the Veda mantras being chanted daily. Mantras are mystically locked sounds that awaken one’s spirituality.
Though the central principle of Vedas do not mention or sanction Idol worship, but abstract Brahman, the Reality, later idol worship was introduced as a means to Self Realization. Worshipping Abstract Brahman, which is Reality, is difficult, is called Nirguna Upasna, worship of the ‘Beyond Attributes’; Sauguna Aradhana or worship is reaching the goal of Brahman through idols as it is, easy for the Mind to concentrate upon. So no mention of Temples in the Vedas.
However, later texts called Agamas dealt with this aspect and laid down rules for construction of Temples. I had written on this in this site.
Matsya purana, one of the eighteen purana of Hinduism explains the construction of Temple in Square Form. I have provided details in this article.
Oldest temple in This design is found in Amarkantak temples in Madhya Pradesh. It is the birth place of River Narmada, Son and Johila.
The Matsya Purana ( Matsya Purāṇa) is one of the eighteen major Puranas (Mahapurana), and among the oldest and better preserved in the Puranic genre of Sanskrit literature in Hinduism.The text is a Vaishnavism text named after the half-human and half-fish avatar of Vishnu. However, the text has been called by the 19th-century Sanskrit scholar Horace Hayman Wilson, “although a Shaivism (Shiva-related) work, it is not exclusively so”; the text has also been referred to one that simultaneously praises various Hindu gods and goddesses.
The text highlights the square design principle, suggesting that the land and design of large temples be set on 64 squares (mandala or yantra),and numerous other square grid designs such as the 16 square grid smaller temple.A temple’s main entrance and the sanctum space should typically open east facing the sunrise, states the text, while the human body was the template of the temple, with Atman and Brahman (Purusha) as the resider in the heart, respectively. The relative ratios, of various levels and various spaces, which the text asserts are naturally pleasing, such as those of entrance height, lengths and heights, placement of carvings are specified in chapters 253-269, as well as other sections such as chapters 58-65. For example, the text suggests that the pillar inside the temple (stambha) be considered as of nine parts, with terms such as Padma, Kumbha, Antara and others, wherein the width of the pillar and each of these parts have certain ratios, and the structural features or carvings be laid out on these nine parts.The text, though named after an avatar of Vishnu, has numerous sections on the installation of Shiva Linga, while other chapters mention Vishnu murti, goddesses and other deities https://en.m.wikipedia.org/wiki/Matsya_Purana
Amarkantak is the origin of Narmada River, Son River and Johila River. It is a sacred place for Hindus. amarkantak, situated in the Maikal hills, is a popular Hindu pilgrimage center in Anuppur district of Madhya Pradesh. At this place 1065 meters above sea level, only the Vindhya and Satpura hills of central India merge. The Narmada and Son rivers originate from Amarkantak surrounded by teak and mahua trees from all around. The Narmada River flows westwards and the Son River in the east direction. The beautiful waterfalls, sacred ponds, high hills and serene environment mesmerize the tourists. Nature lovers and religious people love this place. Amarkantaka is associated with many traditions and legends. It is said that Narmada, the daughter of Bhagavan Shiva, flows from here in the form of Jeevandayini river. There are many temples dedicated to Maa Narmada, which are considered as the form of Durga. Amarkantaka is also famous for many ayurvedic plants, which according to legends are considered to be full of life-giving properties. Apart from this, Mahadev hills are situated between the Narmada and Tapti rivers of India.https://sattology.org/content/amarkantak-origin-of-maa-narmada/