All Islamic mosques are modelled on the courtyard of the Prophet’s own house in Medina.
The shelters in his courtyard were also used as somewhere to meet and discuss community affairs. And that marvellous communal atmosphere of a space with many purposes is something else that survives to this day in the Islamic mosque.