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 🙏

© 2026 – Pkg Stats / Ryan Hefner

edcon

v0.3.0

Published

This is a tool to build a minimalistic CMS based on a custom database model.

Readme

edcon

This is a tool to build a minimalistic CMS based on a custom database model.

The idea is that the user stores the content in their own database format depending on their needs. This could be a key-value-store like redis, a full database like postgres or even a flat file system on a single server.

Every piece of content is associated with a path which should usually correspond to the page that represents the content in the application, content for the home page should be stored as "/", content for the about page as "/about" etc.

Data is fetched simply from the database using sql, redis.json.get etc. and the only key an entry must contain is its path.

Then that data is passed through the entry function from edcon which enhances the field values with the necessary meta information edcon needs to know which field is edited:

import { entry } from "edcon"

const raw = fetchEntry() // { path: "/about", title: "About" }
const data = entry(raw, editMode) // { title: { path: "/about", field: "title", value: "About" } }

Then that data is rendered using editable from edcon:

import { editable } from "edcon"

return (
    <main>
        <editable.h1 value={data.title} />
    </main>
)

now if editMode === true then <editable.h1> will become contentEditable and have additional attributes to indicate which field on which path is being edited. If editMode === false then it will be a regular <h1>.

To catch changes and actually store them in the database, one would then add the Body component from edcon:

import { Body } from "edcon"

export function Layout({ children }) {
    return (
        <Body storeUpdate={storeUpdate}>{children}</Body>
    )
}

where storeUpdate receives the props

type StoreUpdateOptions = {
  path: `/${string}`;
  field: string;
  value: string;
}

Next.js

The primary target for this is to be used in Next.js applications. In these cases, draftMode can be used to differentiate whether content should be editable:

const editMode = (await draftMode()).isEnabled

Then vercel infrastructure can be used to enable and disable draft mode authenticated by vercel. Alternatively, auth.js can be used for authentication.