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

corymb

v0.1.0

Published

Opinionated Bun backend framework: Better Auth (email/password + passkeys), PostgreSQL + PostgREST data API with RLS, Redis cache, jobs, storage, SSE realtime, security guards, flags, billing, webhooks, MCP and API docs.

Readme

corymb

An opinionated Bun backend framework, shipped as an npm package.

Authentication, PostgreSQL + PostgREST data with row-level security, caching, background jobs, object storage, realtime, security primitives, feature flags, billing entitlements, webhooks and MCP — wired together so you start with the plumbing instead of rebuilding it.

npm license runtime

[!WARNING] Active development (pre-1.0). corymb is under active development. The public API may change between minor releases until v1.0.0. Read the release notes before upgrading and pin an exact version in production. Bug reports and feedback are welcome.

Why corymb

  • One package, one public API. Import from corymb; never copy or depend on framework internals. Framework updates arrive through a version bump.
  • Auth is the only direct-database path. Better Auth owns the auth schema via DATABASE_URL; application data goes through PostgREST so RLS applies to the verified Better Auth JWT.
  • Your routes win. Routes, middleware and WebSocket endpoints passed to startServer() / createApp() are merged after the built-ins.
  • Production-oriented defaults. Request IDs, structured and redacted logs, unified errors, CORS, security headers, request limits, rate limiting and graceful shutdown are already in place.
  • Bun-native. Bun.serve, bun test, bun build and bun --compile all work out of the box.
Consumer app
  └─ startServer(options) / createApp(options)
       ├─ routing + composable middleware
       ├─ Better Auth        → PostgreSQL auth schema (DATABASE_URL)
       ├─ PostgREST client   → PostgreSQL app schema + RLS (POSTGREST_URL)
       ├─ cache (Redis or in-memory LRU)
       ├─ BullMQ jobs (Redis)
       ├─ object storage (S3 / filesystem / memory)
       ├─ audit, idempotency, rate limits, security guards
       ├─ feature flags + billing entitlements
       ├─ webhooks (outbound delivery, inbound verification)
       ├─ MCP endpoint (/mcp)
       └─ realtime SSE + WebSockets

Features

| Area | Included | | --- | --- | | Auth | Better Auth email/password + username, session rotation, cookie/bearer/JWT sessions, JWKS for PostgREST, passkeys/WebAuthn, 2FA (email OTP, TOTP, backup codes), sensitive-operation step-up | | Data | PostgreSQL auth schema via pg; PostgREST app schema with per-request JWT + RLS; typed query client; offset and cursor pagination; SQL migrations with status CLI; transactions, savepoints and Unit of Work | | HTTP | Bun.serve routes, composable middleware registry, request validation, compression (br/gzip/deflate/zstd), signed cookies, multipart uploads, streaming/SSE, WebSockets, unified errors, security headers | | Realtime | Authenticated SSE via Redis pub/sub (in-memory fallback), WebSocket endpoints with connection limits | | Jobs & storage | BullMQ + Redis queue with retries, backoff and dead-letter; object storage adapters for S3-compatible services, filesystem and memory; pluggable mailer | | Security | Tiered rate limiting (shared over Redis), request timeout and URL limits, CSRF double-submit, brute-force lockout, bot detection, SSRF guards and safeFetch, sanitize helpers | | Operations | Validated typed config, structured redacted JSON logs, request IDs, audit events with pluggable sinks, Idempotency-Key protection, liveness/readiness probes | | Product | Feature flags (env, cache-backed, OpenFeature), billing/entitlement gating, HMAC-signed outbound webhooks + inbound verification, MCP (Model Context Protocol) endpoint | | Developer UX | Project scaffolding CLI, built-in API docs page, auth UI, sample routes, and a self-contained coding-agent skill |

Requirements

  • Bun >= 1.3.0
  • PostgreSQL reachable at DATABASE_URL (auth schema + migrations)
  • PostgREST reachable at POSTGREST_URL for application data
  • Redis (or Valkey) reachable at REDIS_URL, unless you opt into the in-memory cache

Quick start (recommended)

Scaffold a project with the CLI:

bunx corymb init my-app
cd my-app
bun install
# edit .env — BETTER_AUTH_SECRET, DATABASE_URL, POSTGREST_URL; start Redis
bun run db:migrate      # create the auth + app schemas
bunx corymb jwks        # export postgrest/jwks.json for PostgREST
bun run dev

Use --force to overwrite a non-empty directory.

The scaffold includes sample routes (/api/health, /api/todos) that show how to extend the server, run PostgREST queries scoped to the caller's JWT, record audit events, publish SSE events and enqueue background jobs. See docs/postgrest.md for roles, RLS and PostgREST configuration.

Use as a library

bun add corymb
import {
  createMemoryCache,
  publishRealtimeEvent,
  startServer,
  withRateLimit,
} from 'corymb';

const { server, app, url } = await startServer({
  // Optional: skip Redis for local experiments
  // cache: createMemoryCache(),
  routes: {
    '/api/hello': {
      GET: withRateLimit('relaxed', () => Response.json({ message: 'hello' })),
    },
  },
});

console.log(`listening on ${url.href}`);

await publishRealtimeEvent(app.events, {
  type: 'widget.created',
  data: { id: '1' },
  at: Date.now(),
});

Consumer routes are merged after the built-ins, so your path wins on conflict. Prefer createApp() when you want to own Bun.serve yourself:

import { createApp } from 'corymb';

const app = await createApp({
  /* options */
});

Bun.serve({
  routes: app.routes,
  fetch: app.fetchNotFound,
  error: app.onServeError,
  port: 3000,
});

createApp() returns the app instance, routes, middleware, auth instance, PostgREST client (app.data), cache, tasks, storage, audit recorder, flags, billing, webhooks, logger and an idempotent close() for graceful shutdown. See .env.example for every supported environment variable.

Run the built-in server as-is

bun add corymb
# configure .env (BETTER_AUTH_SECRET, DATABASE_URL, POSTGREST_URL, REDIS_URL)
bunx corymb
# or: bunx corymb start

Built-in endpoints

| Endpoint | Description | | --- | --- | | GET /health | Liveness probe | | GET /ready | Readiness probe (checks cache and PostgREST) | | GET /docs | API docs page (gated by docsAccess / NODE_ENV) | | GET /ui | Minimal auth UI (sign in/up, sign out, passkey management) | | /api/auth/* | Better Auth handlers (sign-in/up, sessions, passkeys, 2FA, JWKS) | | POST /upload | Multipart upload backed by the configured object storage | | GET /realtime/events | Authenticated SSE stream | | /mcp | MCP endpoint when enabled (MCP_ENABLED=true or mcp option) | | GET /robots.txt | Generated robots.txt |

CLI

corymb                    Start the built-in server
corymb start              Same as default
corymb init <dir>         Scaffold a new consumer project (--force to overwrite)
corymb migrate            Apply SQL migrations to DATABASE_URL
corymb migrate:status     Show applied/pending migrations
corymb seed               Migrate then seed demo users
corymb jwks [out]         Export public JWKS for PostgREST

Configuration

Configuration is validated at startup; loadAppConfig() reports every problem in a single ConfigError. The common variables are:

| Variable | Purpose | | --- | --- | | BETTER_AUTH_SECRET | Auth signing secret, at least 32 characters (required) | | BETTER_AUTH_URL | Public base URL used by Better Auth | | DATABASE_URL | PostgreSQL connection for the auth schema and migrations | | POSTGREST_URL | PostgREST endpoint for the app schema | | REDIS_URL | Redis/Valkey URL (VALKEY_URL is accepted as an alias) | | CACHE_DRIVER | redis (default) or memory | | CORS_ORIGINS | Comma-separated browser origin allowlist | | STORAGE_DRIVER | filesystem (default), s3 or memory | | RATE_LIMIT_*_MAX | Strict/standard/relaxed limits per 60s window | | BOT_DETECTION_MODE | block (default), log or off | | FEATURE_FLAGS | JSON map or comma-separated flag list | | MCP_ENABLED / MCP_TOKEN | Enable and secure the /mcp endpoint | | REQUEST_TIMEOUT_MS / MAX_URL_LENGTH | Per-request limits |

The full annotated list lives in .env.example.

Agent skill

This repository ships a coding-agent skill that documents the whole framework — scaffolding, app options, auth, PostgREST data, HTTP/middleware, cache, jobs, storage, audit, idempotency, realtime, WebSockets, security, flags, billing, webhooks, MCP, observability and testing. Install it globally with the skills CLI:

npx skills add streamwhite/corymb -g

It works with OpenCode, Claude Code, Codex, Cursor and other agents. The skill lives in .opencode/skills/framework-development/ and is self-contained: a main SKILL.md plus focused references/*.md.

Develop this repository

bun install
cp .env.example .env        # fill in BETTER_AUTH_SECRET, DATABASE_URL, POSTGREST_URL
bun run db:migrate:prd      # apply auth/app schema migrations
bun run dev                 # watch mode
bun test                    # unit + integration tests (local PostgreSQL; or set TEST_DATABASE_URL)
bun run build               # bundle dist/ (library + CLI + types + migrations)
bun run start               # run the built server
bun run lint                # biome

Publishing (maintainers):

bun run build
bun publish                 # prepack runs the build automatically

The package publishes dist/ (bundled library + CLI + .d.ts types + SQL migrations), plus README.md, LICENSE, .env.example, docs/ and postgrest/.

Status and scope

corymb is in active development. The public API is being stabilised and may change in minor releases until v1.0.0. Expect the largest changes around app options, data helpers and optional modules.

What is intentionally out of scope:

  • Your business logic and domain models.
  • A hosted control plane, dashboard or managed PostgREST/Redis deployment.
  • Encryption/key-management infrastructure (use your platform's KMS/secrets).
  • Full Supabase feature parity. Some adjacent features are not implemented yet.

PostgREST is a first-class requirement for application data access. If you do not want to run it, use the direct-database helpers for your own service layer, but you lose the RLS-per-request model that the framework is built around.

Docs

License

Apache-2.0 © 2026 corymb contributors.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project is licensed under the Apache License 2.0, without additional terms or conditions.