Practical overview
When it fits
Use it when a browser application needs local vector storage and semantic search over text documents, with OpenAI generating the embeddings.
Who it is for
- Developers building browser-based notes or document applications.
- Developers adding semantic retrieval to a small personal document collection.
Documented uses
- Store vectors for text documents in IndexedDB.
- Find documents similar to a text query or supplied vector.
- Filter retrieval results using metadata or text content.
Requirements & limits
- The documented storage backend is browser IndexedDB, not a hosted database.
- An OpenAI API key is required for embedding generation.
- The README describes LRU removal when the storage limit is reached, prioritizing documents with fewer hits and older timestamps.
- The repository identifies the package as MIT-licensed.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add and search a text document
Install the package, store a text document, then retrieve similar content using a text query.
Before you start
- npm
- A browser environment with IndexedDB
- An OpenAI API key for generating embeddings
Steps
Install the package with the command below.
npm i vector-storageImport
VectorStoragefromvector-storageand create an instance with anopenAIApiKey.Call
addTextwith the document text and a metadata object.Call
similaritySearchwith a text query; optionally provide a result count or filter options.
Expected outcome
The documented methods return the stored document and an array of similar documents for the query.
Guide limitations
- The guide follows the README example and does not establish execution or compatibility testing.
- Vector storage is in browser IndexedDB; OpenAI is used to generate embeddings.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- nitaiaharoni1/vector-storage · Official homepage title · retained in its source language

