npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sovereigns3nc

v2.0.1

Published

A decentralized, offline-first data storage and synchronization library designed to connect client applications directly to any S3-compatible object storage (AWS S3, Oracle OCI, MinIO, Garage, etc.).

Downloads

181

Readme

SovereignS3nc

A decentralized, offline-first data storage and synchronization library designed to connect client applications directly to any S3-compatible object storage (AWS S3, Oracle OCI, MinIO, Garage, etc.).

Overview

SovereignS3nc empowers developers to build local-first, decentralized applications. Data is stored locally (via IndexedDB in the browser or SQLite/Filesystem in Node.js) and synced with remote S3 buckets using a robust, hash-based "last-write-wins" approach.

Key Features

  • Offline-First: Operates seamlessly on local storage and syncs changes only when network connectivity is available.
  • End-to-End Encrypted (E2EE): True asymmetric E2EE identity using tweetnacl (X25519 identity keys + AES-256-GCM symmetric encryption).
  • Pluggable Module Architecture: Granular modules for specialized use cases:
    • Profile: Manage identity, public profiles, and following graphs.
    • Messaging: Secure, E2EE Direct Messaging with image support.
    • Feed: Public social feeds with nested comments, likes, and attachments.
  • Global Discovery: Automatically discover and follow users through a global registry.
  • Multi-writer Groups: Support for shared group stores with symmetric encryption.
  • Universal Storage: Seamlessly transition between Browser (IndexedDB) and Node.js (SQLite/FileSystem) environments.

Installation

npm install sovereigns3nc

Basic Usage

import { SovereignS3nc } from 'sovereigns3nc';

// 1. Configure SovereignS3nc
const sovereign = new SovereignS3nc({
  s3: {
    region: 'us-east-1',
    endpoint: 'https://...', // For Garage/Minio/OCI/S3
    credentials: {
      accessKeyId: '...',
      secretAccessKey: '...'
    },
    bucketName: 'my-bucket',
    forcePathStyle: true
  },
  paths: {
    appId: 'my-app',
    userId: 'user-123',
    storeId: 'main'
  },
  password: 'my-super-strong-password', // Used to derive E2EE Identity Keys
  debug: true
});

// 2. Initialize (generates E2EE keypairs and connects to local storage)
await sovereign.init();

// 3. Sync changes (Pull updates from followed users & Push local changes)
await sovereign.sync();

Module System

SovereignS3nc includes high-level modules to handle common application logic:

import { FeedModule, MessagingModule, ProfileModule } from 'sovereigns3nc';

// Profile Management
const profile = new ProfileModule(sovereign);
await profile.updateProfile({ displayName: "Alice", bio: "Hello World" });

// E2EE Messaging
const messaging = new MessagingModule(sovereign);
await messaging.sendMessage("bob-123", "Hey Bob, check this out!", "feed");

// Social Feeds
const feed = new FeedModule(sovereign);
await feed.createPost("My first decentralized post!");

Storage Adapters

The library automatically selects the best storage adapter for your environment:

  • Browser: IndexedDBStorage (High performance, large capacity).
  • Node.js: NodeStorage (File-system based) or SQLiteNodeStorage (Consolidated SQLite database).

Architecture

SovereignS3nc operates on a Daily-DB pattern:

  1. Every day, a new local SQLite database is created for active modules.
  2. During sync(), these databases are hashed, encrypted (if private), and uploaded to S3.
  3. Followed users' databases are downloaded and cached locally for lightning-fast offline access.
  4. Conflicts are resolved via timestamps and SHA-256 hash comparisons.

Security

  • Private GUID: Your private data is stored at a deterministic path derived from your password, making it "unfindable" by others.
  • Identity Keys: Uses tweetnacl to generate X25519 keys from your password.
  • Shared Secrets: DMs use Diffie-Hellman Key Exchange to derive shared secrets, ensuring only the sender and recipient can read the content.