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

blitzzz

v0.0.1

Published

choo + dat + ssr

Downloads

1

Readme

blitzzz

:zap: choo + dat + server-side rendering

(proof-of-concept)

Blitzzz acts as a seeder and serves a mirror to http://. The http:// version is server-side rendered, using a modular system to load and use the data.

Made from Jon-Kyle's project-starterkit. Thanks for that!

Why?

Most sites on the peer-to-peer web use JS to load and render the content (which is a super-power), but this has some drawbacks when the site's mirrored to http://. Without server-side rendering these sites don't work on no-JS environments and also search engines do not find them (which might be important for many people).

I think we should fix these problems, having a site based on peer-to-peer technologies should give you something more and not take away important functionalities.

SSR can also make the site faster.

Usage

First of all you need a site using a combination of Choo and the DatArchive API. For static sites blitzzz is useless.

Blitzzz was originally built with Enoki in mind, but it uses a modular system to load and provide data to the renderer. See the Providers section.

Site configuration

You must add a config.blitzzz.yml file into the root folder of the archive. In this you can set values specific to the site. The two most important values are app and content. app is the location of the Choo entry file in the archive, content is the path to the content data (this gets passed to the "provider").

In the site field you can specify values related to the automatically generated HTML, the one that will be wrapped around your app.

content: /bundles/content.json
app: /source
minifyHTML: false

site:
  title: '{page} - blitzzz'
  css: /bundles/bundle.css
  js: /bundles/bundle.js
  root: main
  meta:
    description: Blazing fast sites.

Server configuration

On you server machine you'll need another configuration file (default location is ~/.blitzzz.yml). In this you can set the port, the Dat key of the site (!!!) and other values: the path to the provider file (defaults to /providers/enoki.js) and whether Blitzzz should cache the pages or not. The cache is cleared every time your site is updated.

# app
port: 8080
dat: dat://52cdf81e7dae04c93964f792138e054537a5b5b1cc13baaa988b1e77c74faadc/
provider: providers/enoki.js
cache: false || number of pages to keep in cache
email: undefined || email to bind the https certs to

Providers

Providers are functions that return an object with two methods: getState and update.

API:

  • provider = Provider(contentPath)
  • provider.getState(state) - it should extend and return the default state of the Choo app with the content
  • provider.update() - triggered when the archive was updated and should re-read the content

Todo

  • archiver
  • handle updates
  • clean old archive data if key's changed
  • https via greenlock