How sakejaswanth/indexforge-db works
IndexForge-DB is a multidimensional nearest-neighbor search and benchmarking product: users submit 2D queries or audio/image files, then compare KD-Tree and R-Tree results against a linear-search baseline across several embedding dimensions. The FastAPI app coordinates query feature extraction, engine searches, metadata lookup, and result delivery to the React dashboard. The README documents the index and storage layers; source excerpts confirm API and fallback behavior, but do not expose all native bindings or preprocessing internals, so uncertain call links are omitted.
Main entry points: app.py FastAPI service · buffer_pool_manager.cpp Buffer pool · data_file.cpp Vector data file · kdtree_disk.cpp Disk KD-Tree
Components 24
Dashboard
- React dashboard
frontend/src/App.jsx
API and preprocessing
- FastAPI service
app.py - Audio features
scripts/extract_audio_features.py - Image features
scripts/extract_image_features.py - Audio preprocessing
scripts/preprocess.py - Image preprocessing
scripts/preprocess_images.py - Dataset indexing
scripts/load_dataset.py - Media metadata
app.py
Search engines
- KD native binding
src/bind_kdtree.cpp - R-Tree native binding
src/bind_rtree.cpp - Disk KD-Tree
src/kdtree_disk.cpp - R-Tree
src/rtree.cpp - Linear baseline
src/search_engine.cpp - Python fallback engines
python_core.py
Paged storage
- Vector data file
src/data_file.cpp - R-Tree file layer
src/rtree_file.cpp - Buffer pool
src/buffer_pool_manager.cpp - LRU replacer
src/lru_replacer.cpp - Disk manager
src/disk_manager.cpp - Page files
Other components
- Dashboard user
- Audio query
- Image query
- 2D point query
Connections 27
- Dashboard user → React dashboard: uses
- React dashboard → FastAPI service: sends queries
- Audio query → FastAPI service: uploads audio
- Image query → FastAPI service: uploads image
- 2D point query → FastAPI service: submits point
- FastAPI service → Audio features: extracts features
- FastAPI service → Image features: extracts features
- Audio preprocessing → Audio features: projects queries
- Image preprocessing → Image features: projects queries
- Dataset indexing → Vector data file: stores vectors
- FastAPI service → KD native binding: runs KD search
- FastAPI service → R-Tree native binding: runs R-Tree search
- FastAPI service → Media metadata: maps results
- KD native binding → Disk KD-Tree: dispatches
- R-Tree native binding → R-Tree: dispatches
- Disk KD-Tree → Vector data file: reads vectors
- Disk KD-Tree → Buffer pool: fetches pages
- R-Tree → R-Tree file layer: reads and writes
- R-Tree → Buffer pool: fetches pages
- R-Tree file layer → Buffer pool: fetches pages
- Vector data file → Buffer pool: fetches pages
- Buffer pool → LRU replacer: evicts frames
- Buffer pool → Disk manager: reads and writes
- Disk manager → Page files: page I/O
- FastAPI service → Python fallback engines: uses if selected
- Python fallback engines → Vector data file: stores vectors
- Linear baseline → Vector data file: scans records