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

orbit-storage

v1.0.0

Published

Unified storage abstraction for TitanPL. Seamlessly switch between local filesystem and cloud providers like S3 or Cloudflare R2.

Readme

🪐 Orbit-Storage

TitanPL License: MIT

Orbit-Storage is a powerful, production-ready storage abstraction designed specifically for the TitanPL Gravity Runtime.

It allows developers to write storage logic once and switch seamlessly between Local Filesystem and Cloud Storage (S3, Cloudflare R2) without changing application code.

Built to be lightweight, Orbit-Storage relies on Titan's native drift() boundary engine via orbit-http and @titanpl/native APIs, ensuring zero Node.js dependencies and maximum performance.


🔥 Features

  • Unified API: Identical methods across all drivers (put, get, delete, exists).
  • Titan-Native: Synchronous execution model compatible with Titan's architecture.
  • Security-First: Built-in protection against Path Traversal Attacks in the local driver.
  • Cloud-Ready: Native support for S3 and Cloudflare R2 using secure Presigned URLs.
  • Zero Configuration Overload: No complex authentication setup; it just works.
  • Enterprise JSDoc: Full TypeScript support with detailed IntelliSense.

⚡ Installation

Install into your Titan project via npm:

npm install orbit-storage

🏗️ Usage

1. Local Filesystem Driver

The local driver is perfect for development or simple persistent storage. It resolves all paths safely relative to your project root.

import storage from "orbit-storage";

const disk = storage.create({
  driver: "local",
  dir: "storage/uploads" // Automatically created if it doesn't exist
});

// Storing a file
disk.put("users/profile_1.json", JSON.stringify({ name: "Titan Programmer" }));

// Checking if it exists
if (disk.exists("users/profile_1.json")) {
    const data = disk.get("users/profile_1.json");
    console.log(data);
}

2. Cloud Storage (S3 & Cloudflare R2)

Orbit-Storage uses Presigned URLs to stay lightweight. This approach is highly secure as it avoids storing long-term credentials in your runtime and leverages temporary access tokens.

import storage from "orbit-storage";

const cloud = storage.create({
  driver: "s3" // or "r2"
});

// Uploading to a presigned URL
cloud.put(presignedPutUrl, fileData);

// Downloading from a presigned URL
const fileContent = cloud.get(presignedGetUrl);

🛡️ Path Traversal Protection

The local driver includes strict validation. Attempts to use paths like ../../etc/passwd or ../my-titan-app/.env will be proactively blocked by Orbit-Storage to keep your server safe.


📚 API Reference

storage.create(config)

Initializes the driver.

  • driver: "local" | "s3" | "r2"
  • dir: (Local only) The storage directory.

instance.put(path, data)

Persists data to the storage provider.

  • Returns { path: string }.

instance.get(path)

Retrieves data from the storage provider.

  • Returns the content as a string.
  • Throws Error if file not found.

instance.delete(path)

Removes the file from storage.

instance.exists(path)

Returns boolean.


🤝 Community & Support

Orbit-Storage is a community package for the TitanPL ecosystem. It follows the principles of the Orbit Ecosystem:

  1. Minimal code surface (< 400 lines).
  2. Predictable, synchronous APIs.
  3. Native performance without Node shims where possible.

📄 License

MIT License. Created for the Titan Planet community.