S3WORM

    S3 Wrapped ORM

    ๐Ÿชฃโ†’๐Ÿ›โ†’๐Ÿ‘ฉโ€๐Ÿ’ป

    Once you go WORM, that's what you'll YEARN!

    Use any S3-compatible bucket as a typed JSON document database. Entity/Repository pattern, worm CLI for schema management, and local-first sync for offline development.

    S3
    Wrapped ORM
    TypeScript
    Full Type Safety
    CLI
    worm init / dev / lint
    Local-First
    OPFS + IndexedDB Sync

    Why S3 Wrapped ORM?

    Turn your S3 buckets into a typed document database with an ORM you already know how to use

    ๐Ÿ—‚๏ธ

    Entity / Repository

    Define Entity classes, get typed Repositories with findById, findAll, save, delete โ€” backed by S3 JSON documents.

    โšก

    worm CLI

    Schema management via path DSL. worm init, worm import (AI-powered), worm lint, worm dev.

    ๐Ÿ”—

    Any S3 Provider

    Works with AWS S3, Storj, MinIO, Cloudflare R2, DigitalOcean Spaces โ€” anything S3-compatible with path-style addressing.

    ๐Ÿ“ฑ

    Local-First Sync

    Offline-capable with OPFS + IndexedDB via @decoperations/bucket-sync. Service worker support, multi-tab coordination.

    See the Wrapped ORM in Action

    Real API โ€” this is how you actually use it

    example.ts
    import { S3Worm, Entity } from '@decoperations/s3worm'
    
    // Connect to any S3-compatible bucket
    const worm = new S3Worm({
      bucket: 'my-app',
      endpoint: 'https://gateway.storjshare.io',
      credentials: { accessKeyId: '...', secretAccessKey: '...' },
    })
    
    // Define an Entity class
    class User extends Entity {
      static getBasePath() { return 'users' }
      name: string = ''
      email: string = ''
    }
    
    // Get a typed Repository
    const users = worm.getRepository(User)
    
    // CRUD โ€” it's just S3 under the hood
    const user = new User()
    user.name = 'Alice'
    user.email = 'alice@example.com'
    await users.save(user)          // PUT users/{id}.json
    
    const found = await users.findById(user.id)
    const all = await users.findAll({ limit: 10 })
    await users.delete(user.id)     // DELETE users/{id}.json

    Install

    pnpm add @decoperations/s3worm

    Binary Uploads

    Browser-safe binary upload with progress tracking:

    await worm.putBytes('files/video.mp4', blob, 'video/mp4')

    Metadata Listings

    List objects with size, content type, and timestamps:

    const entries = await worm.listWithMetadata('users/') // [{ key, size, contentType, lastModifiedIso }]

    The Toolkit

    Everything ships in the monorepo

    โšก

    worm CLI

    Schema management, AI-powered import, linting, and local dev mode with filesystem transport.

    worm init && worm dev
    ๐Ÿ“ฆ

    @decoperations/s3worm

    TypeScript SDK with Entity/Repository, CRUD, binary uploads, metadata listings. Browser, Node, and Edge exports.

    pnpm add @decoperations/s3worm
    ๐Ÿ”„

    @decoperations/bucket-sync

    Local-first offline sync engine. OPFS + IndexedDB storage, service worker, multi-tab coordination, client-side encryption.

    pnpm add @decoperations/bucket-sync
    ๐Ÿ›+๐Ÿชฃ=๐Ÿš€

    Ready to WORM?

    S3 Wrapped ORM โ€” use S3 buckets as typed JSON document databases with an ORM pattern you already know.