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

cocobase

v1.5.3

Published

The Official cocobase sdk

Downloads

280

Readme

🥥 Cocobase - The Backend That Just Works

Build faster. Ship sooner. Scale effortlessly.

Cocobase is a modern Backend-as-a-Service (BaaS) platform that eliminates the complexity of backend development. Focus on creating amazing user experiences while we handle your data, authentication, and infrastructure.

🚀 Why Cocobase?

Lightning Fast Setup

Go from idea to MVP in minutes, not weeks. No server configuration, no database setup, no authentication headaches.

// This is literally all you need to start
const db = new Cocobase({
  apiKey: "your-key",          // From cocobase.buzz
  projectId: "your-project-id" // From cocobase.buzz
});
await db.createDocument("users", { name: "John" });

🛡️ Authentication Made Simple

Built-in user management that actually works. Registration, login, sessions, and user profiles - all handled seamlessly.


// User registration + automatic login in one line
await db.auth.register("[email protected]", "password", { role: "admin" });

💡 New in v1.3.1: All auth methods now use the db.auth.* namespace for better organization. Old methods still work but are deprecated. See our Migration Guide.

📊 Real-time Data Management

Store, retrieve, and manage your application data with a clean, intuitive API. No SQL knowledge required.

🔥 Developer Experience First

TypeScript-native, excellent error handling, and documentation that doesn't make you cry.

🎯 Perfect For

🚀 Rapid Prototyping

Need to validate an idea quickly? Cocobase gets you from concept to working prototype in hours.

📱 Mobile & Web Apps

Build modern applications without worrying about backend complexity. Works seamlessly with React, Vue, Angular, React Native, and Flutter.

🏢 Startups & MVPs

Scale from zero to thousands of users without changing a single line of backend code.

👨‍💻 Solo Developers

You're a frontend wizard but backend feels like dark magic? We've got you covered.

🏫 Learning Projects

Students and bootcamp graduates can focus on learning frontend skills without backend overwhelm.

✨ Key Features

🗄️ Instant Database

  • NoSQL Collections: Store any JSON data structure
  • Advanced Query Filtering: 12 operators, AND/OR logic, multi-field search
  • File Uploads: Simple file handling with automatic storage
  • Real-time Updates: Changes sync instantly across all clients
  • Automatic Indexing: Fast queries without database optimization headaches
  • Type Safety: Full TypeScript support with generic types

🔍 Powerful Query System

Build complex queries with ease:

// Simple filtering
await db.listDocuments("users", {
  filters: { status: "active", age_gte: 18 },
});

// Advanced multi-field OR search
await db.listDocuments("users", {
  filters: {
    name__or__email_contains: "john",
    status: "active",
  },
});

// Complex queries with named OR groups
await db.listDocuments("products", {
  filters: {
    "[or:availability]inStock": true,
    "[or:availability]preOrder": true,
    "[or:pricing]onSale": true,
    "[or:pricing]price_lt": 50,
    category: "electronics",
  },
  sort: "price",
  order: "asc",
  limit: 50,
});

Supported Operators:

  • Comparison: eq, ne, gt, gte, lt, lte
  • String: contains, startswith, endswith
  • List: in, notin
  • Null: isnull

→ View Complete Query Guide

📤 Easy File Uploads

Upload files to any document field with a simple API:

// Create user with avatar
await db.createDocumentWithFiles(
  "users",
  { name: "John Doe", email: "[email protected]" },
  { avatar: avatarFile, cover_photo: coverFile }
);

// Register user with profile picture
await db.registerWithFiles(
  "[email protected]",
  "password123",
  { username: "johndoe" },
  { avatar: avatarFile }
);

// Update user avatar
await db.updateUserWithFiles(undefined, undefined, undefined, {
  avatar: newAvatarFile,
});

Supported:

  • Single files: { avatar: file }
  • Multiple files: { gallery: [file1, file2, file3] }
  • Works with collections and user authentication
  • Automatic cloud storage and URL generation

→ View File Upload Guide

🔐 Complete Authentication System

  • User Registration & Login: Email/password authentication out of the box
  • Session Management: Automatic token handling and refresh
  • User Profiles: Extensible user data with custom fields
  • Secure by Default: Industry-standard security practices built-in

🛠️ Developer-Friendly API

  • Intuitive Methods: CRUD operations that make sense
  • Error Handling: Detailed error messages with actionable suggestions
  • Local Storage Integration: Automatic session persistence
  • Zero Configuration: Works immediately after installation

📈 Built to Scale

  • Global CDN: Fast response times worldwide
  • Auto-scaling Infrastructure: Handles traffic spikes automatically
  • 99.9% Uptime: Reliable infrastructure you can count on
  • Performance Monitoring: Built-in analytics and monitoring

🏗️ Use Cases

📝 Content Management

Build blogs, portfolios, or documentation sites with dynamic content management.

// Create a blog post
await db.createDocument("posts", {
  title: "My Amazing Post",
  content: "...",
  author: currentUser.id,
  published: true,
});

🛒 E-commerce Applications

Manage products, orders, and customer data effortlessly.

// Add product to cart
await db.createDocument("cart", {
  userId: user.id,
  productId: "prod-123",
  quantity: 2,
});

👥 Social Applications

Build social features like user profiles, posts, comments, and messaging.

// Create a social post
await db.createDocument("posts", {
  content: "Just shipped a new feature! 🚀",
  author: user.id,
  likes: 0,
  timestamp: new Date(),
});

📊 Analytics Dashboards

Store and visualize application metrics and user data.

// Track user events
await db.createDocument("events", {
  userId: user.id,
  event: "button_click",
  metadata: { button: "signup", page: "landing" },
});

🎨 Framework Integration

Cocobase works beautifully with all modern frameworks:

⚛️ React/Next.js

const [posts, setPosts] = useState([]);

useEffect(() => {
  db.listDocuments("posts").then(setPosts);
}, []);

🖖 Vue/Nuxt

const posts = ref([]);

onMounted(async () => {
  posts.value = await db.listDocuments("posts");
});

📱 React Native

// Same API, works everywhere
const posts = await db.listDocuments("posts");

🌟 Success Stories

"Cocobase saved us 3 months of backend development. We launched our MVP in 2 weeks and now serve 10,000+ users."
- Sarah Chen, Startup Founder

"As a frontend developer, I was always intimidated by backend work. Cocobase made it feel natural and intuitive."
- Marcus Rodriguez, Full-stack Developer

"We migrated from a custom Node.js backend to Cocobase and reduced our infrastructure costs by 60% while improving reliability."
- Alex Thompson, CTO

🚀 Getting Started

Ready to build something amazing? Here's how to get started:

1. Get Your Credentials

  1. Visit cocobase.buzz and sign up for a free account
  2. Create your first project in the dashboard
  3. Copy your credentials from the project dashboard:
    • API Key - Used to authenticate your requests
    • Project ID - Identifies your project

💡 Where to find your credentials: After creating a project on cocobase.buzz, you'll find your API Key and Project ID in your project's dashboard. Keep these secure and never commit them to version control!

2. Install the SDK

npm install cocobase

3. Start Building

import { Cocobase } from "cocobase";

const db = new Cocobase({
  apiKey: "your-api-key",        // Get from cocobase.buzz
  projectId: "your-project-id"   // Get from cocobase.buzz
});

// You're ready to build! 🎉

🆕 What's New in v1.3.1

New Authentication Handler Architecture

All authentication methods are now organized under the db.auth.* namespace for better code organization and maintainability:

// ✅ New way (recommended)
await db.auth.login("[email protected]", "password");
const user = db.auth.getUser();
const token = db.auth.getToken();

// ❌ Old way (deprecated but still works)
await db.login("[email protected]", "password");
const user = db.user;
const token = db.getToken();

Benefits:

  • 🏗️ Better code organization
  • 📚 Comprehensive JSDoc documentation
  • 🔄 Enhanced state management
  • 🛡️ Improved error handling

Migration: Old methods still work but are deprecated. See our Migration Guide for easy upgrade instructions.

📚 Resources

🤝 Community & Support

  • 💬 Discord: Join our community for real-time help
  • 🐦 Twitter: @CocobaseHQ for updates
  • 📧 Email: [email protected] for direct support
  • 🐛 Issues: Report bugs on GitHub

🏆 Built With Love

Cocobase is crafted by developers, for developers. We understand the pain of backend complexity because we've lived it. Our mission is to make backend development as enjoyable as frontend development.

Join thousands of developers who've already made the switch to Cocobase.


Ready to eliminate backend complexity forever?

Start Building Now →

Free tier available. No credit card required.