Skip to content

Blob Storage Module

Composable blob storage abstraction with pluggable backends. Ships with providers for local filesystem, AWS S3, and Cloudflare R2 (S3-compatible). Uses a self-registering provider pattern so custom backends can be added without modifying core code. Handles streams for large files and supports signed URL generation.

Namemodule-storage-ts
Version0.1.0
Categorycomposable-modules
LicenseApache-2.0
Personaengineering
Tagsstorage, s3, blob, typescript, infrastructure
Sourcetemplates/module-storage-ts

Render it

Three front doors, one catalog. Pick whichever suits the caller.

# CLI
npx @nanohype/sdk render module-storage-ts --out ./my-app

# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "module-storage-ts", variables);

# MCP — from an agent
get_template({ name: "module-storage-ts" })

Prerequisites

ToolVersionWhy
node>=22Node.js runtime for the storage module

Variables

Required

ProjectName string
Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.

Optional

Description string — defaults to A composable blob storage module
Short project description for package.json and README
StorageProvider string — defaults to local
Default storage backend (local, s3, r2, or a custom provider name)

What it produces

22 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.

.env.example
.gitignore
biome.json
package.json
README.md
src/storage/__tests__/local.test.ts
src/storage/__tests__/registry.test.ts
src/storage/bootstrap.ts
src/storage/client.ts
src/storage/index.ts
src/storage/providers/helpers.ts
src/storage/providers/index.ts
src/storage/providers/local.ts
src/storage/providers/r2.ts
src/storage/providers/registry.ts
src/storage/providers/s3.ts
src/storage/providers/types.ts
src/storage/resilience/__tests__/circuit-breaker.test.ts
src/storage/resilience/circuit-breaker.ts
src/storage/types.ts
tsconfig.json
vitest.config.ts

Composes with

Composites that use it

  • Background Processor — Async job processing service with queue, database, storage, observability, and deployment.
  • Document Intelligence — Document search and question-answering system with RAG pipeline, HTTP service, file storage, database, and deployment..
  • Enterprise AI Infrastructure — Full enterprise AI stack with agents, tool servers, safety guardrails, evaluation, prompt management, observability, and Kubernetes deployment..
  • RAG-Powered Agent — AI agent that uses retrieval-augmented generation as a tool.