Storage Adapters
Adapters bind the generic Sobj API to specific storage backends.
Because adapters live in separate packages, your application's bundle size only includes the dependencies of the storage engine you are actively targeting.
📦 Official Adapters
Sobj maintains multiple official adapters for testing and production environments:
In-Memory Adapter
@sobj/memory — A mock storage adapter that holds files in memory. Ideal for writing quick unit tests or running local sandboxes without live clouds.
Cloudflare R2 Adapter
@sobj/r2 — Directly interacts with the Cloudflare R2 bucket S3-compatible endpoints using native fetch APIs and Web Crypto.
🌐 Cloud Providers & S3 Compatibility
Each cloud operator has its own dedicated adapter to assure maximum performance and compatibility:
- AWS S3 (
@sobj/s3): For connecting to Amazon Simple Storage Service (S3). - Backblaze B2 (
@sobj/b2): For Backblaze Cloud Storage. - MinIO (
@sobj/minio): For self-hosted MinIO object storage.
Each adapter handles region endpoints, authorization header signatures, and custom endpoints under the hood.
🔌 Custom Integrations
If you need to connect to other databases, local filesystems, or cache nodes, you can implement Sobj's standard interface in your codebase.
Read the Custom Adapters guide to learn how to build one.