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 devThat’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
| Package | Description |
|---|---|
@tsproxy/cli | CLI — init, dev, start, migrate, seed, health |
@tsproxy/api | HonoJS proxy server with search, ingest, caching, rate limiting |
@tsproxy/js | InstantSearch-compatible searchClient adapter |
@tsproxy/react | Headless 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 statusLast updated on