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

json-api-shop

v0.7.2

Published

Javascript based tools for building applications based on json:api specification and conventions

Downloads

472

Readme

json:api shop

Build Status NPM Status

Documentation

Browse documentation pages.

About

Javascript based tools for building applications based on JSON:API specification and conventions.

Who is it for

  • backend javascript developer invested in JSON:API standard looking to streamline api development and enforce conventions and practices defined in specification
  • frontend developer who works with JSON:API powered api backend and needs a quick way to bootstrap mocked api backend for prototyping and running test suites

What is included

  • adapter for "in memory" database storage
  • service api to query and represent resources from storage
  • express server to expose resource operations via http api
  • browser server for prototypes and test runners

What it does

  • Request validation. JSON:API specification defines how resources are queried and manipulated. If a client request is malformed (invalid relationship payload, missing resource type or id, invalid query parameters...) bundled tools will ensure that it never reaches your application logic and will report bad requests back to client.

  • JSON:API resource representation with included resources. Building included resources payload can be daunting task involving recursion, sub queries, memoization and other techniques. Here this work is done automatically with no configuration or development effort needed.

  • Sparse fieldsets and relationship includes. No config needed here too. Clients can request smaller resource payloads using sparse fieldsets and relationship includes leaving your server and application logic with less sub-queries and work in general. This type of response / logic trimming is also done automatically.

  • HTTP server to present and manipulate your resources via api. Express node.js server comes bundled and preconfigured with all route and error handlers.

  • Browser server to prototype apps or mock api endpoints in test suits. Included browser based server intercepts XMLHttpRequest and Fetch requests and pulls a trick on your frontend api handlers. Your mocked dataset lives in browser memory and can even be persisted in browser storage (local storage, session storage...). Serverlesss. Kind of.

What it does not do

  • Authentication and authorization.
  • Database and resource modeling
  • Query caching

What you need to do

  • Create simple resource schema for your resource models.
  • Choose database engine (process memory, file, SQLite, MySQL, PostgreSQL, Firebase, Firestore, Mongo, Redis...) for your resources and implement database adapter.
  • Choose how you want to expose your resources - via simple programmatic service api, express or browser server.

Documentation and demo

Browse documentation pages.