PuzzleJs makes it easy to create gateways and storefront projects that talk each other. It is inspired by Facebook's [BigPipe](https://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919/), developed

Frontend microservices framework for scalable and blazing fast websites.
 
PuzzleJs makes it easy to create gateways and storefront projects that talk each other. It is inspired by Facebook's BigPipe, developed with lots of great features and passion.
1. Install Puzzlejsyarn add ty-puzzlejs
Before request
1. Gateways start and exposes their fragments and gateway information from desired routes.
2. Storefront fetches registered gateways information.
3. Storefront downloads and caches required fragments, dependencies and assets.
4. Storefront compiles html into in memory javascript function for fastest template rendering.
On Request
1. Storefront sends a chunked response with the compiled function but not closes the connection. Users are now able to see your website with static contents and placeholders. It also sends backend requests to gateways ti recieve rendered fragments.
2. When any fragment recieved from gateway it sends it to browser as a chunk and replaces previously sended placeholder with the content.
3. When all fragments are sent, PuzzleJs closes connection.