How rokn/vecvec works
vecvec is an in-memory-primary vector database with durable writes and git-like collection versioning. The main workflow is a client or UI request through a transport adapter and shared service into the core, where vectors are indexed, searched, and persisted; version selectors enable snapshot queries and other history operations. The README documents major engine capabilities that the sampled excerpts do not fully expose. Those links are shown as documented rather than inferred from unsampled call sites.
Main entry points: collection.rs Collection operations · service.rs Shared service facade · store.ts UI state and actions · grpc.rs gRPC API
Components 23
Clients and UI
- Admin CLI
crates/vecvec-cli/src/main.rs - Rust client
crates/vecvec-client/src/lib.rs - Go client
sdk/go/client.go - Browser console
vvui/src/App.tsx - UI state and actions
vvui/src/store.ts - Browse and manage
vvui/src/components/Timeline.tsx - Search interface
vvui/src/components/SearchPanel.tsx - Vector graph view
vvui/src/components/GraphScope.tsx
Server API
- REST API
crates/vecvec-server/src/rest.rs - gRPC API
crates/vecvec-server/src/grpc.rs - Shared service facade
crates/vecvec-server/src/service.rs - Collection registry
crates/vecvec-server/src/registry.rs - Blocking work bridge
crates/vecvec-server/src/blocking.rs
Vector engine
- Collection operations
crates/vecvec-core/src/collection.rs - HNSW and exact indexes
crates/vecvec-core/src/index/hnsw/mod.rs - SIMD distance kernels
crates/vecvec-core/src/distance/dispatch.rs - Quantized search
crates/vecvec-core/src/quantization/mod.rs - Payload filtering
crates/vecvec-core/src/index/filter.rs
Segments and durability
- Segment search and storage
crates/vecvec-core/src/segment/search.rs - WAL and checkpoints
crates/vecvec-core/src/durable.rs
Version history
- Snapshots and branches
crates/vecvec-core/src/version/store.rs
Other components
- Operator or app
- External caller
Connections 27
- Operator or app → Admin CLI: runs commands
- Operator or app → Rust client: uses client
- Operator or app → Go client: uses client
- Operator or app → Browser console: opens console
- Browser console → UI state and actions: initializes
vvui/src/App.tsx - UI state and actions → REST API: requests data
vvui/src/store.ts - Browse and manage → UI state and actions: reads actions
vvui/src/App.tsx - Search interface → UI state and actions: reads actions
vvui/src/components/SearchPanel.tsx - Vector graph view → UI state and actions: reads state
vvui/src/components/GraphScope.tsx - Admin CLI → gRPC API: calls gRPC
- Rust client → gRPC API: calls gRPC
- Go client → gRPC API: calls gRPC
- External caller → REST API: sends requests
- External caller → gRPC API: sends requests
- REST API → Shared service facade: dispatches REST
crates/vecvec-server/src/rest.rs - gRPC API → Shared service facade: dispatches RPC
crates/vecvec-server/src/grpc.rs - Shared service facade → Collection registry: looks up collections
crates/vecvec-server/src/service.rs - Shared service facade → Blocking work bridge: offloads work
crates/vecvec-server/src/service.rs - Shared service facade → Collection operations: runs operations
- Collection operations → HNSW and exact indexes: searches vectors
- HNSW and exact indexes → SIMD distance kernels: scores candidates
crates/vecvec-core/src/index/hnsw/mod.rs - HNSW and exact indexes → Quantized search: ranks and rescores
crates/vecvec-core/src/index/hnsw/mod.rs - Collection operations → Payload filtering: filters queries
- Collection operations → Segment search and storage: reads and writes
- Collection operations → WAL and checkpoints: persists changes
- Collection operations → Snapshots and branches: commits snapshots
- Snapshots and branches → Segment search and storage: shares segments