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.
| Name | module-storage-ts |
| Version | 0.1.0 |
| Category | composable-modules |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | storage, s3, blob, typescript, infrastructure |
| Source | templates/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
| Tool | Version | Why |
|---|---|---|
node | >=22 | Node.js runtime for the storage module |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toA composable blob storage module- Short project description for package.json and README
StorageProviderstring — defaults tolocal- 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.tsComposes with
- Pairs with
ts-service - Pairs with
rag-pipeline - Pairs with
agentic-loop - Nests inside
monorepo
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.