Skip to Content
Introduction

tsproxy

Early release — APIs are stabilizing but may still change between minor versions.

A search proxy framework for Typesense  with caching, rate limiting, an ingestion queue, and headless React components.

Why tsproxy?

Typesense is a fast, typo-tolerant search engine. But exposing it directly to frontend clients creates challenges:

  • API key exposure — Typesense search-only keys still reveal your cluster details
  • No caching layer — every keystroke hits your search cluster
  • No rate limiting — bad actors can overwhelm your search backend
  • No ingestion queue — bulk writes can spike resource usage
  • InstantSearch compatibility — Typesense needs a translation layer for InstantSearch widgets

tsproxy solves all of these with a single proxy server and CLI.

Quick Start

npx @tsproxy/cli init docker compose up -d npx tsproxy dev

That’s it. Three commands and you have a running search proxy.

Architecture

Frontend (React) tsproxy API Typesense ┌─────────────────┐ ┌──────────────────┐ ┌──────────┐ │ @tsproxy/react │────▶│ HonoJS Proxy │───▶│ Typesense│ │ @tsproxy/js │ │ - LRU Cache │ │ Server │ │ InstantSearch │◀────│ - Rate Limiting │◀───│ │ └─────────────────┘ │ - BullMQ Queue │ └──────────┘ │ - Transform │ └──────────────────┘

Packages

PackageDescription
@tsproxy/cliCLI — init, dev, start, migrate, seed, health
@tsproxy/apiHonoJS proxy server with search, ingest, caching, rate limiting
@tsproxy/jsInstantSearch-compatible searchClient adapter
@tsproxy/reactHeadless React components with BaseUI-style overrides

CLI Commands

tsproxy init # Interactive project setup tsproxy dev # Start proxy in dev mode (hot reload) tsproxy start # Start proxy in production mode tsproxy build # Build for production tsproxy seed <file> # Seed data via the ingest API tsproxy migrate # Sync Typesense schema with config tsproxy health # Check Typesense + Redis status
Last updated on