A high-performance LSM-tree document database written in Go — with REST API, S3-compatible blob storage, and a beautiful admin panel.
Custom skip-list memtable, WAL with CRC32, SSTable segments, Bloom filters, and LRU block cache — all from scratch.
Databases → Collections → Documents. Supports String, Number, Boolean, Array, Object, and Blob types.
Full S3 API compatibility: buckets, objects, ETag (MD5), multipart copy, and metadata headers.
Roles: admin, readwrite, readonly. HMAC-SHA256 tokens with auto-refresh.
Next.js 14 + glassmorphism UI. Browse databases, run queries, manage blobs and users in real-time.
Built-in key-value cache with a REST API for sessions, hot lookups, and ephemeral computed state.
Automatic HTTPS via ACME HTTP-01, bring-your-own certs (including wildcards), HTTP→HTTPS redirect.
Export to native .void archives (tar+gzip+NDJSON). Scheduled backups via cron or Task Scheduler.
voidcli — manage databases, collections, and documents from the terminal.
Type-safe clients for TypeScript (@voiddb/orm) and Go, shipped as separate companion repositories.
Every running VoidDB server exposes a machine-readable markdown guide for AI agents and automation tools.
# Fetch the live server guide
curl http://localhost:7700/skill.md
# Alternate well-known path
curl http://localhost:7700/.well-known/voiddb-skill.md
The repository copy lives here: SKILL.md.
# Clone and run the interactive setup wizard
git clone https://github.com/Nopass0/void.git
cd void
.\scripts\setup.ps1
# Or start directly (builds automatically)
.\scripts\run.ps1
# With admin panel
.\scripts\run.ps1 -WithAdmin
git clone https://github.com/Nopass0/void.git && cd void
chmod +x scripts/*.sh
./scripts/setup.sh # interactive wizard
# Or start directly
./scripts/run.sh
./scripts/run.sh --with-admin # server + admin panel
git clone https://github.com/Nopass0/void.git && cd void
cp .env.example .env # edit JWT_SECRET + ADMIN_PASSWORD
docker compose up -d
# API at http://localhost:7700
# Admin at http://localhost:3000
# Log in with CLI
voidcli login # default: admin / admin
# Create a database and collection
voidcli db create myapp
voidcli col create myapp users
# Insert a document
voidcli doc insert myapp users '{"name":"Alice","age":30,"active":true}'
# Query documents
voidcli doc find myapp users '{"where":[{"field":"age","op":"gt","value":18}]}'
# Backup
voidcli backup
Base URL: http://localhost:7700 | All endpoints return JSON | Auth via Authorization: Bearer <token>
| Method | Path | Description |
|---|---|---|
| POST | /v1/auth/login | Login → {access_token, refresh_token} |
| POST | /v1/auth/refresh | Refresh tokens |
| GET | /v1/auth/me | Current user info |
| Method | Path | Description |
|---|---|---|
| GET | /v1/databases | List all databases |
| POST | /v1/databases | Create database {name} |
| GET | /v1/databases/:db/collections | List collections |
| POST | /v1/databases/:db/collections | Create collection {name} |
| Method | Path | Description |
|---|---|---|
| POST | /v1/databases/:db/:col | Insert document → {_id, ...} |
| GET | /v1/databases/:db/:col/:id | Get document by ID |
| PUT | /v1/databases/:db/:col/:id | Replace document |
| PATCH | /v1/databases/:db/:col/:id | Patch (merge) document |
| DELETE | /v1/databases/:db/:col/:id | Delete document |
| POST | /v1/databases/:db/:col/query | Query with filters/sort/pagination |
| GET | /v1/databases/:db/:col/count | Count matching documents |
// POST /v1/databases/myapp/users/query
{
"where": {
"AND": [
{ "field": "age", "op": "gte", "value": 18 },
{ "field": "active", "op": "eq", "value": true },
{ "field": "name", "op": "starts_with", "value": "A" }
]
},
"order_by": [{ "field": "age", "dir": "asc" }],
"limit": 25,
"skip": 0
}
Supported operators: eq ne gt gte lt lte contains starts_with in
| Method | Path | Description |
|---|---|---|
| GET | /s3/ | List buckets |
| PUT | /s3/:bucket | Create bucket |
| GET | /s3/:bucket | List objects |
| PUT | /s3/:bucket/:key | Upload object |
| GET | /s3/:bucket/:key | Download object |
| HEAD | /s3/:bucket/:key | Object metadata |
| DELETE | /s3/:bucket/:key | Delete object |
{
"_blob_bucket": "media",
"_blob_key": "assets/123/original/photo.jpg",
"_blob_url": "https://db.example.com/s3/media/assets/123/original/photo.jpg"
}
| Method | Path | Description |
|---|---|---|
| POST | /v1/databases/:db/:col/:id/files/:field | Upload a file and store a Blob ref in the document field |
| DELETE | /v1/databases/:db/:col/:id/files/:field | Remove the file field and delete the stored object |
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /v1/backup | admin | Export to .void archive (streamed) |
| POST | /v1/backup/restore | admin | Import from raw .void body |
| Method | Path | Description |
|---|---|---|
| GET | /v1/cache/:key | Read cached value |
| POST | /v1/cache/:key | Write cached JSON value |
| DELETE | /v1/cache/:key | Delete cached value |
Build with go build ./cmd/voidcli or run .\scripts\setup.ps1 which adds it to your PATH automatically.
voidcli [--url http://host:7700] [--token JWT] COMMAND
# Authentication
voidcli login [--user admin]
voidcli logout
voidcli status
# Database management
voidcli db list
voidcli db create <name>
voidcli db drop <name>
# Collection management
voidcli col list <db>
voidcli col create <db> <name>
voidcli col drop <db> <name>
# Document operations
voidcli doc insert <db> <col> '{"field":"value"}'
voidcli doc insert <db> <col> @myfile.json # from file
voidcli doc find <db> <col> [filter-json]
voidcli doc get <db> <col> <id>
voidcli doc delete <db> <col> <id>
# Backup
voidcli backup # all databases
voidcli backup mydb # specific database
voidcli restore backup.void
Install: npm install @voiddb/orm or bun add @voiddb/orm
import { VoidClient, query } from '@voiddb/orm';
const client = new VoidClient({ url: 'http://localhost:7700' });
await client.login('admin', 'admin');
const users = client.db('myapp').collection<User>('users');
// Insert
const id = await users.insert({ name: 'Alice', age: 30, active: true });
// Get by ID
const user = await users.get(id);
// Query (builder passed into find)
const results = await users.find(
query()
.where('age', 'gte', 18)
.where('active', 'eq', true)
.orderBy('age', 'asc')
.limit(10)
);
// Update
await users.patch(id, { age: 31 });
// Cache
await client.cache.set('session:alice', { loggedIn: true }, 3600);
// Delete
await users.delete(id);
Repository: Nopass0/void_go
import voidorm "github.com/voiddb/void/orm/go"
client, _ := voidorm.New(voidorm.Config{
URL: "http://localhost:7700",
Username: "admin",
Password: "admin",
})
col := client.DB("myapp").Collection("users")
// Insert
id, _ := col.Insert(voidorm.Doc{
"name": "Alice", "age": 30,
})
// Query
res, _ := col.Query().
Where("age", voidorm.Gte, 18).
OrderBy("age", voidorm.Asc).
Limit(10).
Execute()
// Get / Delete
doc, _ := col.GetByID(id)
col.Delete(id)
Edit config.yaml or set VOID_* environment variables (env vars take precedence).
| Env Variable | Default | Description |
|---|---|---|
| VOID_HOST | 0.0.0.0 | Bind address |
| VOID_PORT | 7700 | API port |
| VOID_DATA_DIR | ./data | Storage directory |
| VOID_BLOB_DIR | ./blob | Blob storage directory |
| VOID_JWT_SECRET | — | Required. HMAC signing key (min 32 chars) |
| VOID_ADMIN_PASSWORD | admin | Initial admin password |
| VOID_LOG_LEVEL | info | debug | info | warn | error |
| VOID_TLS_MODE | off | off | file | acme |
| log.output_path | ./logs/voiddb.log | Rotated file logs retained for 7 days |
| VOID_DOMAIN | — | Public domain (required for acme mode) |
| VOID_ACME_EMAIL | — | Let's Encrypt contact email |
| VOID_TLS_CERT | — | Certificate PEM path (file mode) |
| VOID_TLS_KEY | — | Private key PEM path (file mode) |