The Current city of Cairo had been formed in the beginning since the opening of Amr ibn al-Aas to Egypt, where he built the city "Fustat" in the year 21 AH / 642 AD on the same system of Islamic cities, then Abbasids built City "Al-Askar" 132 AH / 750 AD to the northeast of Fustat, and when Ahmad Ibn Tulun settled in Egypt and began to establish an independent state separated from the Abbasid Caliphate founded the city "Alktaea" in the year 256 AH / 870 AD, and only Alsharie Al-Aazam remained nowadays, it's called Sharie El Saliba, and the Masjid El Jama (Mosque of Ahmad Ibn Tulun), and when Gawher El-Sekelly conquered Egypt and annexed it to the Fatimid Caliphate, which was settled in Morocco, he founded the city of "Cairo" in AH 358 AH/969 AD to be the new capital of them, since then, Cairo became the fourth capital of Muslims in Egypt, and the planning of these cities generally was a mosque and Dar Alemarah or Caliph's Palace and Surrounded by streets and alleys that were for the accommodation of soldiers' sects , however, Cairo differed from the previous cities with the wall which were surrounding it and many parts of it are still till now. The first three capitals had been associated with each other when Gawher El-Sekelly began in building the city of Cairo to the north east of them, and Cairo was separated from those capitals in that time by a zone where there are Berket Elfel and Berket Qaroun, but Cairo then began to widen to the north and south, east and west , and that was normal, which is most likely a result of increased armies and men of the Fatimid state, especially after coming of Caliph Al-Muizz to Egypt in 362 AH / 973 AD with his family and his retinue, and increasing military personnel in the reign of his son, Al-Aziz Bellah, and the original Egyptian population were living in the earlier cities of Egypt (Fustat, Al-Askar and Alktaea), but The Fatimid City Cairo was inhabited by the caliph, his government and his army.
Then, in the Ayyubid Period, the seat of government was transfer to the Citadel, during that Saladin built a wall in 566 AH /1171 AD and in this time he was still a minister of Khalifa Al-Aded, the last Fatimid caliphs, then when he ascended to power began in the year 569 AH / 1173 AD in the sequel of this wall until revolves around Cairo and the earlier capitals of Egypt, and began to build the Citadel in the center of this wall .
Muslims knew several forms of buildings according to their needs in various aspects of life, religious buildings like mosques and schools, military buildings and civic buildings. Civic buildings, such as commercial buildings, like Wekala, Khan, Kaisaria and Souq , also, the Islamic city knew Fondok "hotel" since the beginning of the Islamic civilization, and it was increased in the Mamluk era and also in Othman era.
The architectural planning of these building had the same criteria in all of it, in other words, for example all the wekala had the same architectural planning; the ground floor of the wekala was including shops to show the goods which are brought in from abroad, they were in facades that were mediated by a gate that leads to open middle Sahn surrounded by stores for storing goods, and the staircase to the upper floors is in one corner of the interface. The same way we find it in all Islamic architecture, that every types; wekala, bet, hammam, khan, sabil, kottab, and even Souq had nearly the same architectural planning.