Skip to content

IgnitionAI/ignite-vec-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ ignite-vec-db

A lightweight and educational vector database written in TypeScript, powered by ONNX Runtime, RocksDB, and modern indexing algorithms like HNSW.

πŸš€ Project Goals

This project is built for learning purposes. It helps developers understand how vector databases work by providing a minimal but extensible implementation using familiar tools from the Node.js ecosystem.

✨ Features

  • Embedding text with ONNX models (e.g., all-MiniLM-L6-v2)
  • Persistent storage using RocksDB or SQLite
  • Vector similarity search (brute-force, HNSW)
  • Metadata filtering support
  • CLI and programmatic API
  • Type-safe validation with Zod
  • Optional GPU acceleration via ONNX Runtime (CUDA)

🧱 Stack

Component Tech
Language TypeScript
Embedding Engine ONNX Runtime (onnxruntime-node)
Storage Engine RocksDB (node-rocksdb)
Indexing Brute-force, hnswlib-node
CLI Interface commander
Validation zod
Testing vitest

πŸ“¦ Installation

pnpm install

Add runtime dependencies:

pnpm add onnxruntime-node hnswlib-node rocksdb zod commander

Add dev dependencies:

pnpm add -D typescript tsx vitest @types/node

Optional: for GPU support (requires CUDA 11.8+):

pnpm add onnxruntime-node-gpu

πŸ—‚ Project Structure

ignite-vec-db/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ cli/          # Command-line interface (commander)
β”‚   β”œβ”€β”€ db/           # Persistence (RocksDB / SQLite)
β”‚   β”œβ”€β”€ index/        # Indexing algorithms
β”‚   β”œβ”€β”€ models/       # ONNX Runtime embedder
β”‚   β”œβ”€β”€ core/         # Vector math, engine core
β”‚   └── utils/
β”œβ”€β”€ onnx/             # ONNX models
β”œβ”€β”€ tests/            # Vitest-based test suite
β”œβ”€β”€ scripts/          # Helpers for data ingestion, etc.
└── README.md

πŸ§ͺ Examples

Add a document

pnpm tsx src/cli/index.ts add "Artificial intelligence is transforming the world."

Search for similar documents

pnpm tsx src/cli/index.ts search "Machine learning innovations"

πŸ›  Future Features

  • Web UI with React
  • WebAssembly support for browser-side DB
  • Advanced filtering (facets, tags)
  • Vector quantization (PQ / IVFPQ)
  • Embedding model loading from HuggingFace

πŸ‘¨β€πŸ« Educational Focus

This project is not meant to compete with Pinecone, Weaviate, or FAISS β€” it's a clean-room reimplementation to demystify vector databases and give developers hands-on experience with embeddings, indexing, and similarity search at a low level.


Made with ❀️ for learning.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published