MCPcopy Create free account
hub / github.com/KShivendu/smoldb

github.com/KShivendu/smoldb @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
421 symbols 980 edges 63 files 86 documented · 20% updated 7mo ago★ 10014 open issues

Browse by type

Functions 308 Types & classes 113
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

smoldb

A smol distributed database implemented from scratch. It is heavily inspired by Qdrant's design.

Usage:

# Run with Docker
docker pull smoldot/smoldb

# Or compile locally:
cargo run -r
# Create collection
curl -X PUT http://localhost:9900/collections/test \
  -H "Content-Type: application/json" \
  -d '{
    "params": "..."
  }'

# Add points
curl -X PUT http://localhost:9900/collections/test/points \
  -H "Content-Type: application/json" \
  -d '{
    "points": [ { "id": 0, "payload": { "msg": "hello world" } } ]
  }'

# Get point (response below)
curl -X GET http://localhost:9900/collections/test/points/0

# Response:
{
  "id": 0,
  "payload": {
    "msg": "hello world"
  }
}

# Get collection's cluster info (response below)
curl -X GET http://localhost:9900/collections/test/cluster

# Response:
{
    "peer_id": 0,
    "shard_count": 2,
    "local_shards": [
        {
            "shard_id": 1,
            "point_count": 0,
            "state": "Active"
        },
        {
            "shard_id": 0,
            "point_count": 1,
            "state": "Active"
        }
    ],
    "remote_shards": []
}

Check roadmap for details

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 197
Function 111
Class 92
Enum 15
Interface 6

Languages

Rust100%

Modules by API surface

src/api/grpc/schema.rs52 symbols
src/storage/segment/index/payload_index.rs21 symbols
tools/raft-playground/src/main.rs19 symbols
src/storage/replicas/mod.rs17 symbols
src/storage/collection.rs17 symbols
benches/collection/common.rs17 symbols
src/consensus/mod.rs15 symbols
src/storage/segment/index/text/bm25.rs14 symbols
src/consensus/raft_storage.rs13 symbols
tools/smolbench/src/apis.rs12 symbols
src/storage/segment/mod.rs12 symbols
src/storage/segment/index/vector/mod.rs11 symbols

For agents

$ claude mcp add smoldb \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page