After migrating to Madinah, the prophet dealt with 3 categories of people which were:
His companions, the muhajireen and the Ansaar
The polytheists
The Jews
The polytheists were mainly of the Aus and Khazraj tribe.
The Jews consisted of the tribes of Banu Qainuqa, Banu Nadir and Banu Qurayzah.
Banu Qainuqa were the allies of the Khazraj tribe
Banu Nadir and Banu Qurayzah were the allies of the Aus tribe.
The prophet constructed a mosque named Masjid-e-Nabavi in Madinah where his camel knelt down. He bought the land for the mosque from 2 orphans, Sahal and Sohail.
Suffah was a big platform with a thatched roof one of the corners of the masjid. It was a training place for Islamic education and a shelter for poor Muslims.
Abdullah bin Zaid Ansari and Umar came to the prophet and reported to have dreamt of the words of Azaan. The prophet said this was a true vision by Allah and this became the call for prayer. Bilal ibn Rabah gave the first Azaan of Islam.
A large number of Ansari and Muhajireen assembled in the house of Ana's bin Malik where the Holy prophet initiated the spirit of Brotherhood, also known as Mawakhat.
Brotherhood meant that the Ansar had to share his Wealth and property with his Muhajir brother.