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

baas-frontend-client

v1.0.0

Published

BAAS Frontend Client - Direct API calls for React/Vue/Angular apps

Readme

🚀 BAAS Frontend Client

Direct API calls for React/Vue/Angular apps - No backend setup required!

📋 Overview

BAAS Frontend Client lets you use BAAS services directly from your frontend applications without setting up any backend server. Just provide your API key and Project ID!

🎯 Features

  • Zero Setup: No backend server required
  • Direct API Calls: Calls deployed BAAS backend directly
  • Browser Compatible: Works in React, Vue, Angular, vanilla JS
  • TypeScript Ready: Full TypeScript support
  • Error Handling: Built-in error handling and validation
  • All APIs: Auth, Database, Storage, Analytics

🚀 Quick Start

Installation

npm install @darshan022/baas-client

Basic Usage

import BAASClient from "@darshan022/baas-client";

// Initialize client
const baas = new BAASClient("pk_live_your_api_key", "your_project_id");

// Use APIs directly
const result = await baas.signup("[email protected]", "password123");
console.log(result);

📱 React Example

import React, { useState } from "react";
import BAASClient from "@darshan022/baas-client";

const MyComponent = () => {
  const [baas] = useState(new BAASClient("your-api-key", "your-project-id"));
  const [loading, setLoading] = useState(false);
  const [result, setResult] = useState(null);

  const handleSignup = async () => {
    setLoading(true);
    try {
      const result = await baas.signup("[email protected]", "password123");
      setResult(result);
    } catch (error) {
      console.error("Signup failed:", error.message);
    } finally {
      setLoading(false);
    }
  };

  return (
    <div>
      <button onClick={handleSignup} disabled={loading}>
        {loading ? "Signing up..." : "Sign Up"}
      </button>
      {result && <pre>{JSON.stringify(result, null, 2)}</pre>}
    </div>
  );
};

🔧 API Reference

Authentication

// Signup
await baas.signup("[email protected]", "password123", "username");

// Login
await baas.login("[email protected]", "password123");

Database

// Query
await baas.queryDatabase("users", 10);

// Insert
await baas.insertData("users", { name: "John", email: "[email protected]" });

// Update
await baas.updateData("users", { id: 1 }, { name: "John Updated" });

// Delete
await baas.deleteData("users", { id: 1 });

Storage

// Upload
await baas.uploadFile("document.pdf", "base64-content", "application/pdf");

// List files
await baas.listFiles();

// Download
await baas.downloadFile("document.pdf");

Analytics

// Usage stats
await baas.getUsageStats();

// Performance metrics
await baas.getPerformanceMetrics();

// Project stats
await baas.getProjectStats();

System

// API info
await baas.getApiInfo();

// Health check
await baas.healthCheck();

// Test connection
await baas.testConnection();

⚙️ Configuration

const baas = new BAASClient(apiKey, projectId, {
  baseUrl: "https://your-custom-backend.com", // Optional
  timeout: 10000, // Optional, default 10s
});

🔍 Error Handling

try {
  const result = await baas.signup("[email protected]", "password123");
  console.log("Success:", result);
} catch (error) {
  console.error("Error:", error.message);
  // Handle error appropriately
}

🌐 Browser Support

  • ✅ Chrome 60+
  • ✅ Firefox 55+
  • ✅ Safari 12+
  • ✅ Edge 79+

📦 Bundle Size

  • Minified: ~5KB
  • Gzipped: ~2KB

🔗 Links

  • Backend Package: @darshan022/baas-platform (for Node.js apps)
  • Documentation: [Coming Soon]
  • Support: [GitHub Issues]

📄 License

MIT License - see LICENSE file for details.


Ready to build amazing frontend apps with BAAS! 🚀