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

atmos-sdk

v0.1.4

Published

Unified SDK for Cloudflare D1, Vectorize, and R2

Readme

AtmosDB — Supabase for the Edge

npm version License: Apache-2.0

AtmosDB is a unified SDK-driven backend framework designed exclusively for Cloudflare Workers. It abstracts Cloudflare D1 (SQL), Vectorize (semantic search), and R2 (storage) into a single, developer-friendly interface, bringing the "Supabase" experience strictly to the Edge.

Architecture Overview

AtmosDB follows a clean layered architecture that unifies Cloudflare's edge services (D1, Vectorize, R2, Workers AI) into a single TypeScript SDK. See detailed architecture documentation for complete diagrams and data flow patterns.

AtmosDB Architecture

Core Services:

  • D1 (Relational Store): Handled by AtmosDB. Provides blazing-fast edge CRUD operations without leaving the worker environment.
  • Vectorize (Semantic Store): Handled by AtmosVector. Seamlessly linked with D1 data for semantic lookups.
  • Workers AI (Auto-Embed): Handled by AtmosEmbedder. Automatically parses row inputs into searchable vectors.
  • R2 (Storage): Handled by AtmosStorage. Serves as reliable edge file storage.

⚠️ Current Limitations

Analytics Feature

The analytics functionality (DuckDB integration) is not available in Cloudflare Workers due to Web Worker API restrictions. The analytics example endpoints return appropriate error messages. For analytics capabilities, consider using:

  • Separate Node.js services
  • Serverless functions on other platforms
  • Client-side analytics with DuckDB WASM

Why AtmosDB

  • Zero Egress: Run everything on Cloudflare's edge, eliminating costly cross-region or cross-cloud data transfers.
  • Edge-Native: Purpose-built for Cloudflare Workers. It brings D1, R2, Vectorize and Workers AI under one roof.
  • AI-Native Space: Auto-embedding support out of the box, allowing simple .search() calls over unstructured string data.

Quickstart

import { Atmos } from 'atmos-sdk'
import { Hono } from 'hono'

// Inject the bindings
const app = new Hono<{ Bindings: { DB: any, VECTORIZE: any, AI: any, BUCKET: any } }>()

app.post('/seed', async (c) => {
  const db = new Atmos({ 
    bindings: c.env, 
    ctx: c.executionCtx, // <--- ZERO LATENCY background embeddings!
    options: { autoEmbed: true } 
  })
  await db.set('users', { name: 'PYE', bio: 'Building things.' })
  return c.text('Seeded!')
})

Auto-Embed Magic

With autoEmbed: true, Atmos seamlessly extracts your string fields, asks Workers AI for embeddings, saves vectors, and manages your structured data.

const semanticMatches = await db.search('users', 'people who construct objects')
// Returns 'Aarav'

Documentation

Explore the comprehensive documentation for each module:

API Reference

  • atmos.set(table, data): Insert to D1 (+ Vectorize if autoEmbed=true).

  • atmos.get(table, id): Retrieve from D1.

  • atmos.search(table, query): Embed query, search semantic matches, pull raw D1 records.

  • atmos.remove(table, id): Purge from both DB and Vectors.

  • atmos.store: Proxy for R2 storage APIs.

  • atmos.auth: JWT validation logic.

Cloudflare Setup

To start properly you need these configured locally and on CF dashboard:

wrangler d1 create atmos-local
wrangler vectorize create atmos-vectors --dimensions=768 --metric=cosine
wrangler r2 bucket create atmos-storage

Database Initialization

Before using atmos.set(), you must initialize your tables. AtmosDB provides a simple migration helper:

const atmos = new Atmos({ bindings: env });
const migrations = new AtmosMigrations(atmos.db);
await migrations.up(['users', 'posts', 'products']);

Current State & Roadmap

  • v0.1.0: Unified CRUD, Auto-Embeddings, Semantic Search, KV-based Rate Limiting, JWT & CF Access Auth.
  • v0.2 (Roadmap): CLI tool (atmos init, atmos deploy), built-in Schema validation (Zod).
  • Future Ideas: Edge Analytics (Serverless DuckDB/Parquet integration, currently unsupported due to Workers API limitations).

Author & Contact

Created by Pavan Yellathakota

License

Released under the Apache 2.0 License.