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

blog-kit-supabase

v0.8.1

Published

Supabase adapter package for `blog-kit`.

Readme

blog-kit-supabase

Supabase adapter package for blog-kit.

Use this package when your posts, authors, categories, and editorial state live in Supabase but you still want to keep the rest of the app working against blog-kit-core contracts.

Install

pnpm add blog-kit-supabase blog-kit-core @supabase/supabase-js

Use It For

  • Public post reads backed by Supabase
  • Editorial create, update, publish, and delete operations
  • Author and category repositories
  • Media uploads through Supabase Storage
  • Typed adapter contracts around an injected Supabase client
  • Mapping Supabase rows into blog-kit-core domain types
  • Optional Supabase Auth to EditorSession resolution

Main Exports

  • createSupabaseAdapter
  • SupabasePostRepository
  • SupabaseEditorialRepository
  • SupabaseAuthorRepository
  • SupabaseCategoryRepository
  • SupabaseMediaRepository
  • SupabaseAdapterError
  • resolveSupabaseEditorSession
  • Table row types for the current adapter contract

Example

import { createClient } from "@supabase/supabase-js";
import { createSupabaseAdapter } from "blog-kit-supabase";

const client = createClient(
  process.env.SUPABASE_URL!,
  process.env.SUPABASE_KEY!
);

const adapter = createSupabaseAdapter({ client });

const posts = await adapter.posts.listAllPublishedPosts();
const post = await adapter.posts.getPostBySlug("modular-publishing");
const drafts = await adapter.editorial.listPosts();

Auth Helper

Use this helper when your host app already uses Supabase Auth and you want to map the current user into the generic EditorSession contract:

import { resolveSupabaseEditorSession } from "blog-kit-supabase";

const session = await resolveSupabaseEditorSession({ client });

This helper is optional. Teams with custom auth stacks can ignore it and map their own auth model into EditorSession.

Media Upload Example

Configure a Supabase Storage bucket, then pass that bucket to the adapter if you do not use the default blog-media bucket:

const adapter = createSupabaseAdapter({
  client,
  mediaBucket: "blog-media"
});

const asset = await adapter.media.uploadMedia({
  fileName: "hero.png",
  contentType: "image/png",
  data: new Uint8Array(await file.arrayBuffer())
});

The adapter uploads to Supabase Storage and returns the public URL from the configured bucket. If you use private buckets, proxy assets or return signed URLs from your host app instead.

Schema

The adapter expects these tables:

  • posts
  • authors
  • categories
  • post_categories

Required relationship shape:

  • posts.author_id -> authors.id
  • many-to-many between posts and categories

Public routes should only expose posts where is_draft = false. Editorial writes should be protected by your host app, Supabase Row Level Security, or both.

For SQL and operational notes, see: