Minimal TypeScript vector search service — embeds text with HuggingFace models, stores in ChromaDB, and serves semantic search via an Elysia HTTP API.
A small reference implementation for building a vector search backend with:
- HuggingFace Inference API (or local models) for text embeddings
- ChromaDB as the vector store
- Elysia (Bun's fast web framework) for the HTTP API
- Runtime: Bun
- Language: TypeScript
- Server: Elysia
- Vector store: ChromaDB
- Embeddings: HuggingFace models
bun install
docker-compose up -d # start Chroma
bun run devHF_API_KEY= # HuggingFace API token
CHROMA_URL=http://localhost:8000src/
├── embedding/ # HF embedding client
├── types/ # shared types
└── index.ts # Elysia server + routes
docker-compose.yml # Chroma
Built as a reference for hooking LLMs into domain data: pick an embedding model, ingest your documents, and query by similarity. Minimal surface area so it's easy to adapt to other vector stores (pgvector, Qdrant, etc.).