The Messenger of Allah ﷺ commanded us to build mosques in different localities (i.e. in the locality of each tribe separately) and that they should be kept clean and be perfumed.
أَمَرَ رَسُولُ اللَّهِ ﷺ بِبِنَاءِ الْمَسَاجِدِ فِي الدُّورِ وَأَنْ تُنَظَّفَ وَتُطَيَّبَ