Vibeleaderboard
Index / tool
Category
Developer Tools
Rank
No. 1530Tools index

Previous survey · No. 1538 ·

Pricing
Open Source
Type
TOOL
GitHub
554 stars
Date

About

Starter kit for scalable, monetizable backend APIs with Hono on Cloudflare Workers. Includes better-auth, Drizzle ORM, and Cloudflare D1.

What it does

Users sign in with GitHub, receive encrypted API credentials, and access subscription-gated routes. The kit records request counts per user and endpoint, applies separate free and paid limits, processes signed subscription webhooks, and serves a basic account landing page.

Why it's ranked here

It assembles the unglamorous parts of selling a small API into one understandable codebase. Authentication, key handling, billing state, persistence, and throttling are already connected. The verdict is mixed, however, because the documented test command is missing from the package scripts, and the token issuance route appears inconsistent with token validation.

What's good

The implementation supports both browser sessions and Bearer credentials. Rate limits persist in the database and vary by subscription tier. Billing webhooks receive signature checks before changing account state. The schema covers users, sessions, provider accounts, verification records, subscriptions, and per-endpoint request counters.

Tradeoffs

The choices are tightly coupled to GitHub sign-in, Lemon Squeezy billing, Cloudflare Workers, and D1. Adding other identity, payment, or database providers requires custom work. Usage-based pricing is explicitly unfinished. The documented test command has no corresponding package script, despite testing dependencies being installed.

How to use it well

Use it when launching a small paid API and these infrastructure choices already fit. Replace the example response with business logic, then review tier limits, credential behavior, webhook secrets, and migrations before production. It does not provide usage-based billing, broad provider choice, or a full application frontend.

Technical notes+

src/index.tsx mounts authMiddleware, authRouter, paymentRouter, and apiRouter, then renders Landing. src/auth.ts validates Bearer tokens by decrypting a user ID and generation timestamp, loading the user, and comparing that timestamp with lastKeyGeneratedAt. Its /api/auth/token handler generates a fresh timestamp but does not persist it, so the returned token can fail that comparison. src/utils/cipher.ts uses AES-GCM with a 128-bit key derived from SHA-256 and a deterministic IV derived from plaintext plus secret. src/middleware/rateLimit.ts stores counters in D1, but its separate read and update operations are not atomic, and first requests receive no rate-limit headers. src/payment/lemonsqueezy.ts verifies an HMAC-SHA-256 hex signature and updates subscription state by matching webhook email. package.json includes Vitest tooling but defines no test script, while docs/tests.md instructs users to run one.

Observed

License
MIT
Primary language
TypeScript, including TSX for the landing interface
Install surface
Cloneable source starter installed with Bun
Interface
HTTP API with session authentication, Bearer credentials, webhooks, and an HTML landing page
Platform support
Cloudflare Workers with Cloudflare D1
Core dependencies
Hono, better-auth, and Drizzle ORM
Tooling
Wrangler deployment, Biome linting, Drizzle migrations, and Vitest dependencies

Read from README.md, package.json, src/index.tsx, src/api.ts, src/auth.ts, src/db/schema.ts, src/utils/key.ts, src/ui/landing.tsx, src/utils/cipher.ts, src/payment/types.ts, src/middleware/rateLimit.ts, src/payment/lemonsqueezy.ts, docs/tests.md, docs/drizzle.md, docs/ratelimits.md.

What it can do

  • Generate scalable backend API starter code

    Project requirements and configurationComplete API codebase with Hono framework

  • Set up user authentication system

    Authentication requirementsWorking auth system with better-auth integration

  • Configure database schema and ORM

    Database structure requirementsDrizzle ORM setup with schema definitions

  • Deploy API to Cloudflare Workers

    API code and deployment configurationLive, scalable API endpoint on Cloudflare infrastructure

  • Connect to Cloudflare D1 database

    Database connection parametersConfigured database connection for API operations

  • Implement API monetization features

    Pricing and billing requirementsAPI with usage tracking and payment integration

Tags

honocloudflare-workersbetter-authdrizzlestarter

Tech Stack

Node.jsTypeScript

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.