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

pocketbun

v0.36.6-pocketbun.0

Published

[![CI](https://github.com/pekeler/pocketbun/actions/workflows/ci.yml/badge.svg)](https://github.com/pekeler/pocketbun/actions/workflows/ci.yml) [![Latest release](https://img.shields.io/github/v/release/pekeler/pocketbun?display_name=tag&sort=semver&color

Downloads

1,890

Readme

PocketBun

CI Latest release

PocketBun is a port of PocketBase to Bun.

PocketBase is an open source Go backend that includes:

  • embedded database (SQLite) with realtime subscriptions
  • built-in files and users management
  • convenient Admin dashboard UI
  • and simple REST-ish API

PocketBase © 2022–present Gani Georgiev. Project on GitHub.

Why?

PocketBase is an excellent, well-designed, self-hosted Backend-as-a-Service. You can extend it with Go and JavaScript, but the embedded JS engine has limited ES6/Node compatibility, making complex customizations difficult. Your project may end up with a second backend.

PocketBun is a semi-automated port to Bun that aims for maximum compatibility with PocketBase’s API and behavior. It's a version of PocketBase that feels more native to JS/TS developers.

Key differences:

  • Built on Bun instead of Go
  • No Go extensions (only JavaScript/TypeScript)
  • Full ES6+ compatibility + native npm package support
  • CLI binary is named pocketbun (not pocketbase)
  • No update command; update via package manager

Warning

PocketBase is still under active development and NOT recommended for production.

Naturally, the same applies to PocketBun.

Docs

PocketBun docs

Installation

bun add pocketbun to add to an existing project, or bun create pocketbun my-app to create a new project.

Quick Start

Create a small server script (for example server.ts):

import { BaseApp, serveAsync } from "pocketbun";

const app = new BaseApp({ dataDir: "pb_data" });
await serveAsync(app, { httpAddr: "127.0.0.1:8090" });

Run it:

bun run server.ts

Then visit http://127.0.0.1:8090/_/ for the Admin UI and http://127.0.0.1:8090/api/health for a basic API response.

Examples

  • examples/simple — minimal server start
  • examples/advanced — hooks, migrations, auth, CRUD, files, realtime, and custom routes

Performance

PocketBun aims to stay in the same performance range as PocketBase. Exact comparisons are noisy because Go (1.26.0) and Bun (1.3.10) are different runtimes.

Benchmark setup:

  • host: Hetzner CCX13 (2 dedicated vCPU, 8 GB RAM)
  • versions: PocketBase v0.36.5, PocketBun 0.36.5-pocketbun.2
  • method: 5 full runs per system, then mean values per scenario

Results (PocketBun relative to PocketBase):

  • scenario range: 6.1x faster to 3.0x slower
  • geometric mean: 1.6x faster
  • aggregate mean benchmark time (sum of mean Completed across scenarios): 10m 2s vs 21m 41s

In this benchmark batch, PocketBun was generally faster on read-heavy/filter-heavy workloads, slower on create-heavy write workloads, and mostly in the same range elsewhere.

The benchmark suite itself has known fluctuations, so treat these numbers as directional rather than absolute.

Tests

PocketBun keeps upstream test coverage close to PocketBase and adds around 20% additional PocketBun-specific tests.

Only 2 tests didn't get ported. They are for PocketBase’s self-update command/plugin which doesn't exist in PocketBun.

All tests are passing.

Differences

The full differences list is documented here, including:

  • runtime/distribution differences
  • CLI defaults/path resolution differences
  • async API extensions
  • operational differences (thumbnails, logs, templates, SQL helpers)
  • intentionally unsupported upstream topics

Development Setup

If you want to contribute after cloning from GitHub:

bun install
bun run upstream:sync
bun run format:fix
bun test --concurrent
bun run typecheck
bun run lint

Optional quick smoke test:

cd examples/simple
bun install
bun run start

Jeans with logos.