And here is the starting town
As you can see, everything is within the walls, and there is also a wall that goes over the river, with grating in it to allow the water to flow, but to also keep larger animals out.
You have the keep up on the hill. The building on the outside wall of the keep is the barracks. And there is an ostler near one gate, and the other enclosure if for other types of animals (i.e. cows and such), with the commons near that side being for them to graze (it helps having Druids on payroll to help grow fodder and such, plus warehouses which hold goods and items shipped from the main port over on Tyrlon.
Heh! They didn't even have to build the walls, only repair them, as they found them when exploring, and repaired/rebuilt the walls, and then the city interior to bring it back to usable condition.
The thing to remember with Tyrlon, is that you could find ruins almost anywhere, and they could have come from almost any world as well.