sobj

Installation โ€‹

Sobj features a decoupled architecture made of a tiny core package and provider-specific adapters. This structure keeps your bundle light by only importing code for the backends you actually use.

๐Ÿ“ฆ Core Package โ€‹

To begin, install the core sobj package in your project:

bash
pnpm add sobj

Or using your preferred package manager:

bash
# npm
npm install sobj

# Yarn
yarn add sobj

# Bun
bun add sobj

๐Ÿ”Œ Storage Adapters โ€‹

Next, install the adapter corresponding to the storage provider you wish to use. Each provider has its own dedicated package.

ProviderPackageUse Case
In-Memory@sobj/memoryTesting, local development, mocking
AWS S3@sobj/s3Production Amazon Web Services storage
Cloudflare R2@sobj/r2Production Cloudflare storage
Backblaze B2@sobj/b2Production Backblaze cloud storage
MinIO@sobj/minioSelf-hosted object storage

For example, to install both the in-memory adapter and Cloudflare R2:

bash
pnpm add @sobj/memory @sobj/r2

๐Ÿงช Verify Installation โ€‹

Once packages are installed, verify the setup by importing the client factory and your chosen adapter:

ts
import { sobj } from 'sobj'
import { memory } from '@sobj/memory'

const storage = sobj(memory())

Your environment is now configured. Proceed to the Quick start to run your first storage operations.