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

fabrico-sdk

v1.1.0

Published

The official SDK for Fabrico Cloud

Readme

fabrico-sdk

Version License: MIT

The Developer-First Backend-as-a-Service (BaaS) SDK for Cloudflare.

fabrico-sdk is a type-safe, unified client for interacting with Fabrico Cloud. It provides a single interface for Authentication, Serverless Databases (Turso), Storage (R2), and managed AI models (Workers AI) — all pre-configured and scoped to your project.


🚀 Quick Start

1. Installation

npm install fabrico-sdk
# or
pnpm add fabrico-sdk

2. Initialization

import { createClient } from "fabrico-sdk";

// Scoped to your project's multi-tenant infrastructure
const fabrico = createClient({
  publishableKey: "project_id_...", // Found in your Dashboard
  apiKey: process.env.FABRICO_API_TOKEN, // Required for secure server-side ops (DB, Storage, AI)
});

🔐 1. Authentication (fabrico.auth)

A production-ready auth system powered by Better-Auth, supporting Email OTP and OAuth.

// Sign up a new user (Frontend)
const { user, session } = await fabrico.auth.signUp.email({
  email: "[email protected]",
  password: "secure-password",
  name: "Fabrico Developer"
});

// Get current session
const session = await fabrico.auth.getSession();

💾 2. Database (fabrico.db)

Direct SQL access to your project's isolated Turso (libSQL) database. No connection strings required.

// Execute raw SQL
const { rows } = await fabrico.db.query(
  "SELECT * FROM posts WHERE status = ?", 
  ["published"]
);

// High-level select helper
const posts = await fabrico.db.select("posts", { limit: 10 });

📦 3. Storage (fabrico.storage)

Seamlessly manage files in your project's Cloudflare R2 buckets.

const bucket = fabrico.storage.bucket("uploads");

// Upload a file (Blob, File, or Buffer)
await bucket.upload("profile.png", fileBlob);

// Get a fast, unauthenticated public URL for frontend display
const url = bucket.getPublicUrl("profile.png");

🤖 4. AI Gateway (fabrico.ai)

Direct access to Cloudflare Workers AI (Llama 3, SDXL, etc.) via a secure gateway.

import { AI_MODELS } from "fabrico-sdk";

const { text } = await fabrico.ai.chat.completions.create({
  model: AI_MODELS.chat.LLAMA_3_8B,
  messages: [{ role: "user", content: "Write a SQL query to..." }]
});

⚡ 5. Realtime (fabrico.realtime)

Pub/Sub and Presence powered by Cloudflare Durable Objects.

// Subscribe to a channel (Frontend)
const channel = fabrico.realtime.channel("public:updates");
channel.on("new_post", (payload) => console.log(payload));

// Broadcast from your backend
await fabrico.realtime.broadcast("public:updates", { id: 1, title: "New Release!" });

🛠️ Framework Integrations

React

Use the official hooks and premium UI components for a 10-minute "Zero-to-Auth" experience.

import { FabricoProvider, SignIn, UserButton } from "fabrico-sdk/react";

function App() {
  return (
    <FabricoProvider client={fabrico}>
      <header>
        <UserButton />
      </header>
      <SignIn />
    </FabricoProvider>
  );
}

🛡️ Security Best Practices

| Environment | Keys Required | Allowed Operations | | :--- | :--- | :--- | | Frontend (Browser) | publishableKey | Auth (Client-side), Realtime (Public) | | Backend (Worker/Node) | publishableKey + apiKey | Full Access: DB, Storage, AI, Admin Auth |

Note: Never expose your apiKey in client-side code (environment variables starting with VITE_ or NEXT_PUBLIC_).


📚 Documentation

For full documentation, visit docs.fabrico.diy.


📄 License

MIT © Fabrico