What began in a.d. 830 as the Doges ' chapel for the remains of the evangelist Mark , the republic 's patron saint , was rebuilt in the 11th century as a grandiose Byzantine-Oriental basilica influenced by the Hagia Sofia in Constantinople .
The original chapel also had an oriental influence .