npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ty-puzzlejs

v2.6.1

Published

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

Downloads

221

Readme

npm version Build Status

PuzzleJs Framework

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.

Why?

Traditional models are not enough because of lacking independence, performance and limitations.

  • Multiple teams working on same code makes everything harder to manage.
  • Slowest service defines the page speed always.
  • When backend is collecting data user browser is wasting time waiting for it.
  • Features can't be online as soon as it is fully developed and tested because of other teams futures are not ready yet.
  • You can't use different technologies expect from the existing one.
  • You can't scale specific process because you are dependent to whole system.

Features

  • First Time To Byte PuzzleJs compiles html template into javascript function when it is starting for the first time. This operation is fully independent from the request so PuzzleJs can send the first chunk using this function.
  • Seo Friendly PuzzleJs is fully seo friendly as everything is being prepared and rendered on serverside.
  • Extensibility It is easy to extend PuzzleJs and your custom features to the framework.
  • Easy PuzzleJs makes it simple to build a gateway and storefront project.
  • Independent You can use any technology on your gateways, PuzzleJs is fully indepented from your technologies.
  • Scalable You can scale specific gateway when you need.
  • Fail-Safe You can still show your page to your users if any fragments fails to load.

Getting Started

Please check the guide for full documentation.

  1. Install Puzzlejs yarn add ty-puzzlejs

How PuzzleJs works?

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.

Documentation

Read the guide to familiarize yourself with how PuzzleJs works.

Changelog

Contributions

Feel free to contribute to PuzzleJs, please read Contributions for detailed information.