For a lot of our projects we use a custom static site generator called Bedrock. It allows us to build large and complex prototypes, with tons of different pages, navigation between different states etc. It also contains quite a bit of functionality to provide documentation and component style guides.
A Codepen looks a bit like this (try clicking the buttons):
I love Codepen, but it has its limitations. Sometimes you want to bring your code to your local development environment – but you don’t want to use a “heavy” prototyping setup like Bedrock.
Bedrock Mini is open source and can be found on Github.