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

@cossackframework/cms

v0.9.6

Published

Cossack CMS: resources, schema planning, repositories, auth and stores on RomeDB

Readme

@cossackframework/cms

The Cossack CMS on RomeDB: collections defined as data and stored schemaless, blocks, rich text stored as ProseMirror JSON, taxonomies with nested terms, media, settings, themes, menus, resources with a schema planner and a migration ledger, authorized repositories, users and sign-in with authenticator apps and passkeys, the framework stores, an outbox and plugin hosting. Publishing tools: scheduled entries, preview links, autosaves, revisions you can compare and restore, automatic and managed redirects, per-entry SEO, resized image variants with crops and focal points, application passwords for the content and management API (cossack cms, MCP), signed webhooks, moderated comments, reusable patterns and translations. Several people edit one entry together through its room (live text, presence, a shared draft; docs/cms/collaboration.md) and leave review notes for each other on passages, blocks and fields (docs/cms/notes.md). Forms are built from input blocks with conditional logic, and each keeps its submissions in a table of its own, with notifications, webhooks and hooks like Gravity Forms'. Add it to an application with cossack add cms, which renders the shared auth and dashboard pages over CMS storage and a default theme into src/plugins/default-theme/. It runs on Cloudflare Workers with RomeDB Cloud and on Node.js with a RomeDB file in the server's process, romedb serve or Cloud. The package is also an application: app/ holds the pages, components and API routes that cossack add cms renders, and pnpm dev here (or pnpm dev:cms at the repository root) runs them from the workspace; see app/README.md.

import { field, type CollectionDefinition } from '@cossackframework/cms';

export const products: CollectionDefinition = {
  name: 'products',
  label: 'Products',
  singular: 'Product',
  path: 'shop',
  taxonomies: ['tags'],
  features: { content: { blocks: ['core/heading', 'core/paragraph', 'core/image'] }, featuredImage: true },
  fields: {
    price: field.number({ required: true, min: 0 }),
  },
};

| Entry | Use | | --- | --- | | @cossackframework/cms | Collections, blocks, fields, rich text, menus, the theme contract, permissions, settings, extension points, manifests, media helpers, the co-editing rules (client-safe) | | @cossackframework/cms/server | createCMS, repositories, planner, users, taxonomies, menus, settings, files, auth, stores, outbox, Markdown (server-only) |

Data contract:

  • Each collection is its own document table, r__cms__<name>. Only host fields are typed in the database; the host validates content fields, and reads tolerate values that no longer fit a changed field. Saving a definition changes only indexes.
  • A collection's standard fields are its features (content, excerpt, featuredImage, revisions), fixed names themes rely on; its other fields are the field groups attached to it, in the order the collection manager sets. Field groups are meta boxes built from blocks: field blocks laid out with the core layout blocks, attached to collections, taxonomies, users and menu items. They compile to field declarations, so values are stored flat by name; a rows field is a repeater (rows with an _id, nested without limit) whose indexed row fields get an array index on their path into the rows (specs.*.name, RomeDB 0.2.11) for array::contains seeks. A field with multiple: true holds several values of its kind as one array, each checked with the kind's rules, bounded by minItems and maxItems, and indexed as an array when filterable; a gallery is a multiple media field and a multiple choice a list of its values. Conditions on fields clear what they hide on write.
  • A collection's entry editor is arranged by its editor layout: tabs for the main column and a sidebar every tab shares, built from editor/tab, editor/section and editor/box blocks with the core columns, grids and notes. A box is one of editorBoxes(): a field (field:excerpt), a field group (group:pricing), a taxonomy (taxonomy:categories) or the editor's own (seo, attributes, languages, template, discussion, revisions); the title and the Publish box are pinned. Without a stored layout the editor shows defaultEditorLayout(), the arrangement it always had; resolveEditorLayout() appends boxes a layout does not name, leaves out boxes that are gone and merges what active plugins' manifests add (editor). Plugin manifests also ship field groups (fieldGroups), stored when the plugin is granted. A tab's ID names it in the editor's address (?tab=pricing, EDITOR_TAB_ID). The collection manager's Editor tab edits the layout as one tree, the sidebar its last row, so meta boxes (the dashboard's word for boxes) drag between a tab and the sidebar.
  • Each mutation is one atomic batch: record, revision, audit and outbox rows, guarded by the operation ID, so a stale edit writes nothing.
  • Terms store their ancestors' IDs as a path, so a subtree is a prefix match and a move is one statement. Entries hold term IDs in indexed arrays.
  • Code-declared resources use strict collections. Generated schema changes are additive; renames, backfills, tighter rules and drops are explicit, versioned steps. Each step is one batch sent with ifSequence; a conflict re-plans.
  • A resource is active only when the database records its current declaration.
  • Blocks are one tree: { id, type, data }, with children under a container (core/group, core/columns holding core/column, core/grid) and a core-checked layout (hide by container width). A type declares what it holds (children) and where it goes (parent); at most 200 blocks and 4 levels per field. Layouts are blocks, so revisions, patterns and the front-end editor cover them; nothing is stored beside the block list.
  • A block's text fields may bind to the entry's fields: {{ $.price }} puts the value inside the text, with words and formatting around it (resolveBindings, resolveBlockBindings); the default theme lists no fields on its own. The site resolves them when it renders an entry; the editor keeps the syntax and offers the fields in a picker.
  • A block's style holds slugs of the theme's presets (background, text, padding, margin, fontSize) and an align; layout adds an anchor and className. A type's supports narrows what its Style tab offers over its category's defaults. Themes declare presets (colors, font sizes, spacing) in their manifest, Customize adjusts the palette and adds site-level CSS, and blockStyleAttributes renders a styled block's wrapper with classes and custom properties, so a palette change recolors stored content.
  • An entry's content is blocks: the content feature, on for posts and pages, and the core/richtext block is the word processor among them. Themes get one entry.content list: every blocks field, and each rich text or Markdown field as one rich text block. A collection's template is the blocks every new entry's content starts with (templateLock keeps them, or their order too); blocks of the data category store values and render nothing. Rich text is validated against an allow-list of nodes, marks and attributes on every write and rendered to escaped HTML; the plain text of searchable rich text and blocks fields feeds the full-text index.
  • Extension points besides the resource and form hooks: cms.term.before-save, cms.comment.before-save and cms.menu.before-save adjust or refuse writes; cms.dashboard.entry-actions (the built-in quick actions, which handlers add to, remove or reorder), entry-columns and bulk-actions add links, plugin commands and columns to the dashboard's entry lists.
  • A menu is one JSON tree saved with a revision check. Entries and terms are stored by ID and resolved when the site renders.
  • A plugin runs only when its resources are migrated and an administrator grants what its manifest requests. Builds run the plugin policy lints (cossack plugins check). Its ui.slots links fill the dashboard navigation (dashboard.nav), the dashboard's bottom taskbar (dashboard.taskbar) and the taskbar signed-in users see on the site (site.taskbar).
  • A theme is a plugin whose manifest has a theme field and whose templates/ files (or ui.ts theme export) are the site templates, picked per page from most specific (entry-posts, term-category) to general (entry, archive). Themes own templates, not routes. Activating one is a settings write; its templates need no grant. A theme's server.ts exports loaders that read data under the plugin's grants for its templates; templates/head.ts adds stylesheets and fonts from assets/; theme.extends makes a child theme; theme.areas declares widget areas; a manifest's collections ship site collections with the plugin. Editors can choose an entry's template and edit its blocks on the public page.
  • A form is a forms entry whose body holds input blocks (input: { kind } in the declaration), laid out with the containers and shown or hidden by a block's when; a form/repeater holds a row of inputs people fill in once per passenger or item, and a text, number or date input with multiple on takes several values, added one at a time. A form/file input takes uploads (allowed extensions or types, up to 10 MB a file, 10 files, 25 MB a submission; the content is checked against the type): the files are private files under cms/private/forms/<form>/<submission>/, which the library and /media/ never serve, and download through GET /api/cms/forms/<form>/submissions/<id>/files/<file> with cms:submissions; the record keeps { id, name, size, type }, and deleting the submission or the form removes them. Its submissions are the resource cms/form_<form id>, stored in its own table and extended when inputs are added. A submission is one batch: the record, a receipt and its form.submitted outbox event, which sends the form's notifications and webhooks. Hooks: cms.form.validate, before-submit, prefill, confirmation, notification and submitted.
  • Scheduled entries are published by maintenance as a system write, so their outbox events and webhooks fire when they go live. A published entry's URL change records a 301 in the same batch.
  • Preview links, application passwords and recovery codes are stored as SHA-256 hashes. Webhook deliveries are queued per webhook from the outbox and signed with HMAC-SHA256.
  • After a package upgrade, new host tables and changed built-in collections apply on the next request; code-declared resources and plugins still migrate from Tools → Schema.

See the guides with cossack docs --package @cossackframework/cms, and the developer docs in docs/cms/: overview, plugins, manifest, hooks, themes, menus, settings and languages.