JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q74776F
  • License MIT

EdgeBase core SDK — platform-agnostic client for auth, database, storage, and functions

Package Exports

  • @edge-base/core

Readme

EdgeBase Logo

@edge-base/core

Shared building blocks for EdgeBase SDKs
HTTP transport, query builders, storage helpers, field ops, functions, errors, and generated API layers

npm  Docs  MIT License

Library authors · wrappers · internal tooling · custom runtimes


@edge-base/core is the low-level foundation used by the public EdgeBase SDKs.

Use it when you are:

  • building a custom runtime wrapper on top of EdgeBase
  • reusing the query builder, storage layer, or HTTP transport in internal tooling
  • implementing environment-specific SDK surfaces that should not depend on the browser or admin entry points

If you are building an application, you usually want a higher-level package instead:

EdgeBase is the open-source edge-native BaaS that runs on Edge, Docker, and Node.js.

This package is one part of the wider EdgeBase platform. For the full platform, CLI, Admin Dashboard, server runtime, docs, and all public SDKs, see the main repository: edge-base/edgebase.

Documentation Map

Use this README for the package boundary and shared primitives, then jump into the runtime docs:

  • SDK Overview Public package matrix and install entry points
  • Client SDK Higher-level browser query patterns built on these primitives
  • Admin SDK Reference Trusted-server APIs that reuse the same transport and storage layers
  • Database Admin SDK Query, pagination, batch writes, and raw SQL context
  • Storage Upload, download, metadata, and signed URL flows

For AI Coding Assistants

This package ships with an llms.txt file for AI-assisted development.

Use it when you want an agent or code assistant to:

  • stay on the low-level @edge-base/core surface instead of assuming browser or admin entry points
  • use the real HttpClient, DbRef, TableRef, and StorageClient APIs
  • keep custom wrappers aligned with the generated EdgeBase transports

You can find it:

  • in this package after install: node_modules/@edge-base/core/llms.txt
  • in the repository: llms.txt

Installation

npm install @edge-base/core

Quick Start

import {
  ContextManager,
  DbRef,
  FunctionsClient,
  HttpClient,
  StorageClient,
} from '@edge-base/core';

const contextManager = new ContextManager();
const http = new HttpClient({
  baseUrl: 'https://your-project.edgebase.fun',
  contextManager,
});

const db = new DbRef('app', undefined, http);
const posts = await db.table('posts').limit(10).getList();

const storage = new StorageClient(http);
const bucket = storage.bucket('avatars');
const url = bucket.getUrl('user-1.jpg');

const functions = new FunctionsClient(http);
const health = await functions.get('health');

console.log(posts.items, url, health);

Core API

These are the main primitives exported by @edge-base/core:

  • HttpClient Shared authenticated transport with token refresh and service-key support
  • DbRef, TableRef, DocRef Low-level database query builders and CRUD surfaces
  • StorageClient, StorageBucket Shared storage bucket primitives
  • FunctionsClient Function invocation helper
  • increment, deleteField Field operation helpers
  • ContextManager Shared request/user context container
  • EdgeBaseError Common SDK error type

Choose The Right Package

Package Use it for
@edge-base/core Custom wrappers, low-level integrations, shared SDK primitives
@edge-base/web Browser and untrusted client apps
@edge-base/react-native React Native apps
@edge-base/admin Trusted server-side code with admin access

License

MIT