Happy Vertical SDK

TypeScript toolkit with pluggable adapters

Build applications that outlast your infrastructure choices. Switch AI providers, databases, or storage without touching business logic.

View on GitHub
import { AI, Database, Storage } from '@happyvertical/sdk';

// Initialize with any provider
const ai = new AI({ provider: 'openai', model: 'gpt-4' });
const db = new Database({ provider: 'postgres', url: process.env.DATABASE_URL });
const storage = new Storage({ provider: 's3', bucket: 'my-bucket' });

// Switch providers without changing application code
const ai = new AI({ provider: 'anthropic', model: 'claude-3' });

Built for Adaptability

Design patterns that protect your code from vendor decisions.

Factory & Adapter Patterns

Standardized interfaces with pluggable adapters. Swap implementations without touching application code.

Zero Vendor Lock-in

Your code depends on our interfaces, not third-party APIs. Switch on your terms.

Incremental Migration

Migrate to better tools one component at a time. No big rewrites.

Single API, Many Providers

One interface for OpenAI, Anthropic, Google. Same for databases, caching, storage.

Prototype to Production

Start with SQLite. Scale to PostgreSQL. Same code works everywhere.

Predictable APIs

Every package follows consistent conventions. Learn one, know them all.

Core Packages

Modular packages for common infrastructure needs.

@happyvertical/ai

AI

Standardized AI interface supporting OpenAI, Anthropic, Google Gemini, AWS Bedrock, and Hugging Face with unified API

@happyvertical/sql

Database

Database interface with support for SQLite, PostgreSQL, and DuckDB

@happyvertical/files

Storage

File system utilities for local and remote file operations

@happyvertical/cache

Performance

Standardized caching interface supporting Memory, File, and Redis backends

@happyvertical/spider

Data

Lightweight web scraping and HTML content extraction using cheerio, happy-dom, and undici for high-performance server-side operations

@happyvertical/pdf

Data

Modern PDF processing utilities with text extraction and OCR support using unpdf and @happyvertical/ocr

@happyvertical/ocr

AI

Standardized OCR interface with support for multiple providers including Tesseract.js and ONNX (PaddleOCR)

@happyvertical/documents

Data

Multi-part document processing with support for PDF, HTML, and Markdown

@happyvertical/geo

Geo

Standardized geographical information interface supporting Google Maps and OpenStreetMap

@happyvertical/translator

AI

Standardized translation interface supporting Google Translate, DeepL, and LibreTranslate

@happyvertical/weather

Data

Weather data provider abstraction for HappyVertical SDK

@happyvertical/logger

Development

Structured logging for HappyVertical SDK with signal adapter

@happyvertical/utils

Core

Foundation utilities for ID generation, date parsing, URL handling, string conversion, error handling, and logging

@happyvertical/github-actions

Development

Reusable GitHub Actions utilities for issue triage, PR validation, and workflow automation

@happyvertical/sdk-mcp

Development

MCP server for HappyVertical SDK - Routes queries to package experts using CLAUDE.md files

@happyvertical/email

Communication

Email utilities (stub)

@happyvertical/languages

AI

Language detection and processing (stub)