edgebase / core
EdgeBase Core SDK — shared types, HTTP client, table, storage.
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^10.0
README
EdgeBase PHP Core SDK
Shared low-level PHP primitives for EdgeBase.
edgebase/core is the foundation used by edgebase/admin. It provides the HTTP client, database references, table query builder, storage helpers, field operations, error types, and the server-side room client.
Most application code should install edgebase/admin instead. Use this package directly when you are building custom wrappers, generated bindings, or internal integrations.
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 fast overview, then jump into the docs when you need depth:
- SDK Overview Install commands and the public SDK matrix
- Database Admin SDK Table queries, filters, pagination, batch writes, and raw SQL
- Storage Uploads, downloads, metadata, and signed URLs
- Admin SDK Reference Cross-language examples that sit on top of this core package
For AI Coding Assistants
This package includes an llms.txt file for AI-assisted development.
Use it when you want an agent or code assistant to:
- keep Service Key logic on the server
- use the actual PHP class and method names
- avoid copying JavaScript promise-based examples into PHP
- remember which surfaces are low-level helpers versus admin-only clients
You can find it:
- in this repository: llms.txt
- in your environment after install, inside the
EdgeBase\Corepackage directory asllms.txt
Installation
composer require edgebase/core
Quick Start
<?php use EdgeBase\Core\FieldOps; use EdgeBase\Core\HttpClient; use EdgeBase\Core\StorageClient; $http = new HttpClient( 'https://your-project.edgebase.fun', getenv('EDGEBASE_SERVICE_KEY') ?: '' ); $storage = new StorageClient($http); $bucket = $storage->bucket('avatars'); $bucket->upload('user-1.jpg', 'binary-data', 'image/jpeg'); $marker = FieldOps::increment(1);
Included Surfaces
HttpClientDbRef,DocRef,TableRefStorageClient,StorageBucketFieldOps::increment()andFieldOps::deleteField()ListResult,UpsertResult,BatchResultEdgeBaseExceptionRoomClient
Choose The Right Package
| Package | Use it for |
|---|---|
edgebase/core |
Low-level PHP primitives for custom wrappers and internal integrations |
edgebase/admin |
Trusted server-side code with Service Key access |
License
MIT