In the 17th century, Narva was a city on the border between Sweden and Russia, which Sweden wanted to turn into a regional capital. The designer of the defence fortifications was a military engineer and architect Erik Dahlberg.
https://www.visitestonia.com/en/narva-bastions