I need an advice about creating an independent city (a city state) in the middle of a desert (the stony kind of wasteland). I will scratch what I have in my mind so far and I would be glad to hear if this is a realistic scenario and how to make it as realistic as possible.
My world is quite hot and around the equator, there are extremely hot wastelands. Some distance from the equator, the conditions in terms of temperature are compatible with living, though still hot (imagine Egypt or Libya during summer). The land is quite hostile and there are little to no settlements or villages.
However, there exists an oasis and one or two big rivers surrounded by some area of fertile soil around which big (50-100k) cities formed.
In terms of history, these cities were formed by outcasts from more habitable zones located in north and south of the desert (imagine how Australia was originated) and grew at these few habitable places simply because there was nowhere else to go for the citizens (everything around is a desert or a very hostile land, though the population is limited by the ability of the city to produce food at its location).
I know I have to consider several things, like water (oasis or river + maybe some underground source), food (basic agriculture based on irrigation), shelter (mainly stone) and access (occasional caravans but besides that, the city is quite isolated). There might be two or three such cities in the desert in quite big distances from each other.
Is this a realistic setting? What other things I have to keep in mind when designing such city state?
What are your tips for agriculture in terms of basic groceries and plants?