Madrasas were generally centered around a main courtyard with a central fountain, off which other rooms could be accessed. Student living quarters were typically distributed on an upper floor around the courtyard. Many madrasas also included a prayer hall with a mihrab.