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

summit-plastic

v0.1.1

Published

An embedded JavaScript application engine built on Summit NodeDB.

Downloads

32

Readme

Summit-Plastic

npm license

Summit-Plastic is an embedded JavaScript application engine built on top of Summit NodeDB. It adds the application-level capabilities developers need—search, document indexing, ranking, realtime events, channels, and file storage—without reimplementing tables, rows, SQL, or the NodeDB storage format.

Install

npm install summit-plastic

Quick start

import { Plastic } from "summit-plastic";

const app = new Plastic({ database: "app.db" });
await app.connect();

await app.documents.add({
  id: "video-123",
  title: "Minecraft Survival",
  content: "A Minecraft survival gameplay video",
  metadata: { category: "gaming", tags: ["minecraft", "survival"] }
});

const results = app.search("minecraft survival", {
  filters: { "metadata.category": "gaming" },
  limit: 10
});

console.log(results);
await app.close();

connect() opens the NodeDB file and Plastic creates only its own adapter tables/buckets. NodeDB remains the low-level database engine responsible for pages, persistence, tables, rows, SQL, and buckets.

Data API

Plastic exposes a JSON-friendly table adapter:

const users = app.table("users");
users.insert({ id: "u1", name: "Kyle", age: 25 });
users.find({ age: 25 });
users.update("u1", { age: 26 });
users.remove("u1");

Document operations automatically update a persisted term-vector/inverted index and emit document:insert, document:update, and document:delete events. Search supports stemming, normalization, stop-word removal, AND/OR matching, prefix retrieval, phrase matching, BM25-style ranking with field boosts, metadata filters, highlights, sorting, and pagination:

const page = app.searchPage('"minecraft survival"', {
  operator: "AND",
  fields: { title: 5, content: 1 },
  highlight: true,
  limit: 20
});

Indexes

Custom fields can be added to the search index. Definitions are persisted in Plastic metadata and loaded again on the next connect():

app.index.create({ collection: "videos", field: "title" });

Documents can target a collection with collection: "videos", and search can scope to it with { collection: "videos" }.

Authentication

Plastic includes an embedded authentication system with accounts, password hashing, sessions, and local developer login state.

import { Plastic } from "summit-plastic";

const app = new Plastic({ database: "app.db" });
await app.connect();

await app.auth.signup({
  name: "Summit",
  email: "[email protected]",
  password: "password"
});

await app.auth.login({
  email: "[email protected]",
  password: "password"
});

const user = await app.auth.user();
console.log(user);

Realtime and messaging

const chat = app.channel("general");
const unsubscribe = chat.subscribe((message) => console.log(message));
const message = chat.send({
  user: "Kyle",
  message: "Hello",
  idempotencyKey: "client-message-1"
});
chat.edit(message.id, { message: "Hello everyone" });
chat.react(message.id, "Kyle", "👋");
chat.markRead("Kyle", message.id);
console.log(chat.history());

const server = await app.serve({ host: "127.0.0.1", port: 8787 });

Channels persist membership, support cursor-based history, idempotent sends, replies, edits, soft deletes, reactions, read receipts, and unread counts. app.serve() starts a WebSocket server. RealtimeClient.subscribe() waits for the server acknowledgement, then receives created, updated, deleted, reaction, and read events for the subscribed channel.

File storage

Plastic buckets use NodeDB buckets for bytes and a Plastic metadata collection for file metadata:

const images = app.bucket("images");
await images.upload("photo.png", "./photo.png", {
  contentType: "image/png"
});
const bytes = images.download("photo.png");

CLI

npx summit-plastic init
npx summit-plastic database create app.db
npx summit-plastic add document.json --database app.db
npx summit-plastic search "minecraft" --database app.db
npx summit-plastic status --database app.db
npx summit-plastic serve --database app.db --port 8787

The plastic command remains available as a compatibility alias. The CLI uses Commander.js and Summit Marker for help, errors, and terminal output.

Development

npm test

Plastic is an ES module package and requires Node.js 18 or newer.