MiniSearch

Tiny, dependency-free in-memory full-text search engine for browser and Node

Library
npm
v7.2.0
6,151 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
38 /100 Needs Attention
Development Activity 0
Maintenance 0
Community 52
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
79 /100 Good
Architecture 78
Code Quality 82
Innovation 75
Learning Curve 80

MiniSearch is a lightweight, in-memory full-text search engine for JavaScript and TypeScript that runs comfortably in both Node and the browser, including memory-constrained mobile browsers. It supports exact match, prefix search, fuzzy matching, field boosting, and auto-suggestion, making it a popular choice for client-side “search as you type” experiences that need to work offline without a server round-trip.

With zero external runtime dependencies and a compact, well-tested codebase built around an efficient SearchableMap trie-like index, MiniSearch trades the scale of a hosted search service for speed, offline capability, and simplicity — documents can be added or removed from the index at any time, and the whole index can be serialized to JSON for persistence or transfer.

What You Get

  • The MiniSearch class for building, updating, and querying an in-memory full-text index
  • Exact match, prefix search, and fuzzy (edit-distance-based) matching, each independently configurable
  • Field boosting and per-term/per-document custom boost functions for tuning result ranking
  • An auto-suggestion engine (autoSuggest) for query auto-completion
  • JSON serialization/deserialization of the whole index via toJSON/loadJSON for persistence or transfer between processes

Common Use Cases

  • Real-time ‘search as you type’ in web and mobile apps, keeping the index client-side to avoid server round-trips
  • Offline-capable search in Progressive Web Apps or Electron apps where no search backend is available
  • Adding full-text search to static sites (docs, blogs) by shipping a prebuilt JSON index to the browser
  • Auto-complete/auto-suggest features that need typo tolerance and field-weighted ranking without a hosted search service

Under The Hood

Architecture MiniSearch centers on a single ~2,300-line MiniSearch class (src/MiniSearch.ts) composed with a custom SearchableMap (src/SearchableMap/SearchableMap.ts), a radix-tree-like structure optimized for prefix and fuzzy lookups over string keys. Documents are tokenized per configured fields, terms are inserted into the SearchableMap alongside per-document term frequency data, and search queries combine exact/prefix/fuzzy matching strategies (each independently weighted) with a TF-IDF-style scoring and boosting pipeline (field boost, term boost, document boost) before results are ranked and returned. The whole index can be serialized to and rehydrated from JSON via toJSON/loadJSON, letting a prebuilt index be shipped to a browser instead of built client-side.

Tech Stack Written entirely in TypeScript with zero runtime dependencies, bundled via Rollup into ESM, CommonJS, and UMD builds (dist/es, dist/cjs, dist/umd) so it can be dropped into either bundler-based projects or loaded directly via unpkg/jsdelivr in a browser. Types are hand-authored and exported from dist/es/index.d.ts, and API docs are generated with TypeDoc (typedoc.json).

Code Quality The project has an 80KB Jest-style test file (src/MiniSearch.test.js) alongside dedicated tests for SearchableMap, and CI badges show coverage tracking via Coveralls — indicating a genuinely well-tested core rather than a thin smoke-test suite. The single large MiniSearch.ts file is dense but consistently documented with JSDoc comments on nearly every public option and method, which keeps the surface navigable despite its size.

API Design The public API centers on one class with a small number of well-named methods (add, addAll, remove, search, autoSuggest) and richly typed options objects (SearchOptions, Options) that let simple use cases work with defaults while exposing deep customization (custom tokenizers, term processors, per-term/per-document boost functions) for advanced needs — a classic ‘simple things simple, complex things possible’ design that keeps the getting-started boilerplate to a single new MiniSearch({ fields: [...] }) call.

Used by 14 apps in this directory

TypeScript
99%
Other

byterover-cli

AI Agents · AI Code Assistants · AI Memory

4,966

A portable memory layer for AI coding agents — curate structured project knowledge into a version-controlled context tree that syncs across tools, machines, and teammates.

View details
50
Repo Health
83
Technical
70
Dependency
Built with
TypeScript 99%
Updated 3 months ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,049

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
73
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 6 days ago
Python
58%
MIT

Docglow

Data Engineering

147

A next-generation documentation site generator for dbt Core projects — lineage explorer, health scoring, and full-text search for teams without access to dbt Cloud's built-in docs features.

View details
67
Repo Health
65
Technical
82
Dependency
Built with
Python 58%
TypeScript 42%
Updated 1 weeks ago
TypeScript
94%
Apache 2.0

flue

AI Agents · Developer Tools

8,383

Build autonomous AI agents and powerful workflows with a programmable TypeScript harness that gives any model sessions, tools, sandboxes, and durable execution.

View details
80
Repo Health
82
Technical
70
Dependency
Built with
TypeScript 94%
Updated 1 weeks ago
TypeScript
97%
Other

GrowthBook

Ab Testing Experimentation · Analytics · Developer Tools

8,446

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
63
Dependency
Built with
TypeScript 97%
Updated 5 days ago
Go
86%
MIT

Hatchet

AI Development · Automation · Developer Tools

8,014

A Postgres-backed orchestration engine for background tasks, AI agents, and durable workflows that replaces Redis queues and multi-datastore durable execution platforms with a single self-hostable service.

View details
88
Repo Health
83
Technical
67
Dependency
Built with
Go 86%
Updated 6 days ago
TypeScript
67%
MIT

Hoppscotch

Developer Tools

80,529

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
91
Repo Health
83
Technical
65
Dependency
Built with
TypeScript 67%
Vue 25%
Updated 1 weeks ago
JavaScript
55%
Other

Lokus

Knowledge Management · Note Taking

802

Local-first note-taking with graph view, canvas & AI plugins—your Markdown files, zero telemetry, blazing-fast Rust performance.

View details
78
Repo Health
75
Technical
65
Dependency
Built with
JavaScript 55%
HTML 21%
Rust 12%
Updated 1 months ago
TypeScript
92%
Apache 2.0

Apache Maka

AI Agents · AI Development · Developer Tools

5,668

An Apache-incubated agent workspace that treats every model call, tool run, and permission decision as an append-only, replayable event log instead of disposable chat history.

View details
81
Repo Health
85
Technical
81
Dependency
Built with
TypeScript 92%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers