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

backend-cuecue

v0.0.1

Published

Hono + TypeScript SaaS backend for Cloudflare Workers.

Readme

Backend Cuecue

Hono + TypeScript SaaS backend for Cloudflare Workers.

It keeps the reusable foundation:

  • Cloudflare D1 user/session/order storage
  • Google OAuth login and Google One Tap
  • JWT session cookies with D1 session revocation
  • Current-user settings
  • Stripe Checkout subscriptions
  • Stripe subscription webhook
  • OpenAPI docs and Scalar UI
  • CORS, logging, and shared response helpers

Development

pnpm install
cp .env.example .dev.vars
pnpm dev

Wrangler runs the Worker on http://localhost:8787 by default.

The D1 binding is configured in wrangler.jsonc:

  • Binding name: DB
  • Database name: vibesdk-db
  • Database id: 5efcae1d-ad5a-4559-9169-db1906768a53
  • Migrations directory: migrations

Because the D1 binding is marked as remote, pnpm dev uses the shared remote D1 database. Use pnpm dev:local when you want Wrangler local storage instead, then apply local migrations with pnpm db:migrate:local.

Useful D1 commands:

pnpm db:list
pnpm db:info
pnpm db:migrations:list:remote
pnpm db:migrate:remote

Useful routes:

  • GET /api/health
  • GET /api/auth/google
  • GET /api/auth/callback/google
  • POST /api/auth/google/one-tap
  • POST /api/auth/logout
  • GET /api/auth/me
  • GET /api/auth/profile
  • GET /api/auth/providers
  • GET /api/auth/sessions
  • DELETE /api/auth/sessions/:sessionId
  • GET /api/settings/user/me
  • PATCH /api/settings/user/me
  • POST /api/order-management/checkout
  • POST /api/order-management/cancel
  • GET /api/order-management
  • POST /api/webhook
  • GET /api/doc
  • GET /api/reference

Required Setup

Use the shared vibesdk-db D1 database, create a Google Cloud OAuth Web client, and create a Stripe account.

Google OAuth redirect URI:

${API_URL}/api/auth/callback/google

Stripe webhook endpoint:

${API_URL}/api/webhook

Subscribe the Stripe webhook to:

  • checkout.session.completed
  • customer.subscription.updated
  • customer.subscription.deleted

Database

This project reuses the users, sessions, and oauth_states tables already present in the vibesdk D1 database. Apply migrations/0005_backend_cuecue_orders.sql when the shared database does not have orders yet:

pnpm db:migrate:remote

The order migration creates:

CREATE TABLE IF NOT EXISTS `orders` (
  `id` text PRIMARY KEY NOT NULL,
  `user_id` text NOT NULL,
  order_no text unique not null,
  ...
);