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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@g-1/core

v2.0.0

Published

G1 Studio API Framework - A plugin-first, high-performance TypeScript API framework built on Hono for Cloudflare Workers

Readme

G1 Core API

The G1 API Core - A high-performance, enterprise TypeScript API boilerplate built for maximum scale and security. Powered by Hono, Cloudflare Workers, D1, and Better Auth. The foundation for your next profitable venture.

🚀 Quick Start

# 1. Install dependencies
bun install

# 2. Start development server
bun run dev                # http://localhost:8787

# 3. Run tests
bun run test

# 4. Check types and linting
bun run typecheck && bun run lint

⭐ Key Features

  • 🚀 Cloudflare Workers + Hono - Lightning-fast edge API with optimized middleware stack
  • 🔐 Better Auth - Enterprise auth with anonymous login, email/password, OTP, multi-org support
  • 🗄️ Drizzle ORM + D1 - Type-safe database layer with automated migrations
  • 📚 OpenAPI Documentation - Auto-generated docs with Scalar UI and Zod validation
  • 🧪 Enterprise Testing - Vitest with Workers test pool, isolated environments
  • 🛡️ Security First - Rate limiting, CORS, security headers, input validation
  • 📦 Production Ready - Battle-tested patterns and enterprise architecture

Quickstart

bun install
bun run dev            # http://localhost:8787
# in another tab
bun run test           # runs vitest in workers pool
bun run typecheck      # tsc --noEmit
bun run lint           # eslint

🏗️ Architecture Overview

┌──────────────────────────────────────────────────────────────────┐
│ 🚀 Cloudflare Workers API (Hono Framework)                      │
│                                                                  │
│  🛡️ Middleware Stack:                                             │
│  ├─ favicon → health → env → ctx → security →                   │
│  │  validation → CORS → rate-limit → logging → auth → session   │
│                                                                  │
│  📁 API Routes:                                                  │
│  ├─ /, /protected, /api/auth/*, /v1/*                           │
│  ├─ /v1/early-access-requests, /v1/auth-docs                   │
│  └─ Error handling & not-found                                  │
│                                                                  │
│ 🔐 Authentication: Better Auth (Cloudflare adapter)             │
│  ├─ DB: D1 via Drizzle (users, sessions, accounts, orgs)        │
│  └─ KV: High-performance session management                      │
│                                                                  │
│ 🗄️ Data Layer: Drizzle ORM → Cloudflare D1 (SQLite)             │
└──────────────────────────────────────────────────────────────────┘

📚 Documentation

Core Documentation

Development Guides

Quick Navigation

  • Getting Started: You're reading it! (README.md)
  • API Documentation: Visit /doc when running locally
  • Database Schema: Check src/db/tables/ for table definitions
  • Environment Setup: See .env.example and wrangler.jsonc

Tests

  • Uses Vitest with @cloudflare/vitest-pool-workers
  • Cookie-aware helpers live in test/utils.ts (see TESTING.md)
  • Migrations applied automatically during test setup