Funny, I posted my (less cool) version of this exact idea last week: https://keybykey.app
Mine's based on the old electronic toy Simon - infinite and progressively more difficult.
https://en.wikipedia.org/wiki/Simon_(game)
You should definitely add midi controller support though - WebMidiJS makes it pretty simple.