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-archetypes

v0.2.11

Published

Open-source JSON Models For Popular Types Of Data

Downloads

53

Readme

json archetypes data standards

#JSON Archetypes

Simple, community-driven standards for popular types of data in JSON. That is all.

These were made for Servant. Servant is a personal database and these are its schemas.

Each JSON Archetype uses the JSON Schema format to describe the Archetype and its validation rules. All of the Archetypes can be found in the archetypes folder. JSON Archetypes are meant to be lean and contain only the essential properties/attributes that define and differentiate each archetype. The challenge is to agree on what those properties/attributes are...

Feel free to contribute to the existing JSON Archetypes or create your own!

##Contributing Anyone who has a JSON Archetype in mind, or wants to add to existing JSON Archetypes is free to contribute. Just follow these steps:

  • Fork this project.
  • Clone your forked project (which should now be in your github account) to your computer.
  • Create a branch and work on it to create/modify existing JSON Archetypes
  • Try to submit pull requests for one Archetype at a time

More on how to contribute to a Github project here.

##Design Principles

  • Shallow Architecture - Don't add nested objects. Only Arrays are allowed, and if they contain objects, keep those objects small. Shallow architecture makes the Archetypes more accessible using simpler queries that can be effectively indexed to scale well.
  • Unique Property Names - Every property name in an Archetype must be unique.
  • Follow The JSON Schema Specs - http://json-schema.org/example1.html
  • Copy Schema.org Schemas wherever you can - http://schema.org

##F.A.Q.

###How is this different from Schema.org?

JSON Archetypes are simpler versions of the schemas on schema.org. While application developers can comprehend the verbose, nested data architecture Schema.org uses, it's still complex and not much fun to work with.

That said, we’ve tried to copy schema.org schemas wherever possible, as well as their property names, so there will be interoperability. Hopefully we can evolve to further resemble schema.org in the future.

###Can I add additional properties to the Archetypes?

If you think the property is absolutely necessary, contribute to this repo :)

Keep in mind, developers mostly want to add properties to the Archetypes that are relevant only to the application they want to make. Nothing wrong with that. But, there are infinite use-cases for the Archetypes, and if we created Archetype properties for each use case, we’d have infinite bloat.

The solution is to make meta records for each Archetype record and save those meta records in your app's database. For example, make a meta record in your database that relates to Product Archetype record with the ID 881JKS0A891. In that meta record you can extend that product with properties like views, SEO keywords, etc.

###As a User, how can I store extra data in each Archetype (e.g. obscure product details)?

Archetypes aren't going to be 100% perfect for everyone. But don't let perfect be the enemy of good.
Occasionally, you may not be able to find room to squeeze in obscure details. On the other hand, the fixed formats of JSON Archetypes make it easy for apps to consume. Yes, you may miss a small detail, but more importantly, you will increase distribution and overall productivity of your data by letting it be used everywhere.

###Bro, I found this comic on XKCD and it’s totally relevant. Can I show it to you?

We've seen it, laughed, and moved forward.