
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
World's First Production-Grade Hybrid Graph/Vector Database for the Browser
High-performance Vector + Graph database REST API server. Qdrant-compatible with graph extensions.
# Run with default settings (port 6333)
cargo run -p lattice-server
# Run with custom address
cargo run -p lattice-server -- 127.0.0.1:8080
# Run with OpenAPI/Swagger UI
cargo run -p lattice-server --features openapi
# Visit http://localhost:6333/docs
GET /collections
Response:
{
"status": "ok",
"result": {
"collections": [
{ "name": "my_collection" }
]
}
}
PUT /collections/{name}
Content-Type: application/json
{
"vectors": {
"size": 128,
"distance": "Cosine"
},
"hnsw_config": {
"m": 16,
"ef_construct": 200
}
}
Parameters:
vectors.size - Vector dimensionality (required)vectors.distance - Distance metric: Cosine, Euclid, or Dot (required)hnsw_config.m - Max connections per node (optional, default: 16)hnsw_config.ef_construct - Construction-time search queue size (optional, default: 100)Response:
{
"status": "ok",
"result": { "result": true }
}
GET /collections/{name}
Response:
{
"status": "ok",
"result": {
"status": "green",
"vectors_count": 1000,
"points_count": 1000,
"config": {
"params": {
"vectors": { "size": 128, "distance": "Cosine" }
},
"hnsw_config": { "m": 16, "ef_construct": 200 }
}
}
}
DELETE /collections/{name}
Response:
{
"status": "ok",
"result": { "result": true }
}
PUT /collections/{name}/points
Content-Type: application/json
{
"points": [
{
"id": 1,
"vector": [0.1, 0.2, 0.3, ...],
"payload": { "city": "London", "price": 100 }
},
{
"id": 2,
"vector": [0.4, 0.5, 0.6, ...],
"payload": { "city": "Paris", "price": 200 }
}
]
}
Response:
{
"status": "ok",
"result": {
"operation_id": 0,
"status": "completed"
}
}
POST /collections/{name}/points
Content-Type: application/json
{
"ids": [1, 2, 3],
"with_payload": true,
"with_vector": false
}
Response:
{
"status": "ok",
"result": [
{ "id": 1, "payload": { "city": "London" } },
{ "id": 2, "payload": { "city": "Paris" } }
]
}
POST /collections/{name}/points/delete
Content-Type: application/json
{
"points": [1, 2, 3]
}
Response:
{
"status": "ok",
"result": {
"operation_id": 0,
"status": "completed"
}
}
POST /collections/{name}/points/search
Content-Type: application/json
{
"vector": [0.1, 0.2, 0.3, ...],
"limit": 10,
"with_payload": true,
"with_vector": false,
"score_threshold": 0.5,
"params": {
"ef": 128
}
}
Parameters:
vector - Query vector (required)limit - Number of results (required)with_payload - Include payload in results (default: true)with_vector - Include vector in results (default: false)score_threshold - Filter results by score (optional)params.ef - Search queue size (optional, overrides collection default)Response:
{
"status": "ok",
"result": [
{ "id": 1, "score": 0.95, "payload": { "city": "London" } },
{ "id": 5, "score": 0.89, "payload": { "city": "Berlin" } }
]
}
POST /collections/{name}/points/scroll
Content-Type: application/json
{
"limit": 100,
"offset": null,
"with_payload": true,
"with_vector": false
}
Response:
{
"status": "ok",
"result": {
"points": [
{ "id": 1, "payload": { "city": "London" } },
{ "id": 2, "payload": { "city": "Paris" } }
],
"next_page_offset": 100
}
}
POST /collections/{name}/graph/edges
Content-Type: application/json
{
"from_id": 1,
"to_id": 2,
"relation": "similar_to",
"weight": 0.95
}
Response:
{
"status": "ok",
"result": { "status": "created" }
}
POST /collections/{name}/graph/traverse
Content-Type: application/json
{
"start_id": 1,
"max_depth": 3,
"relations": ["similar_to", "related_to"]
}
Parameters:
start_id - Starting point ID (required)max_depth - Maximum traversal depth (required)relations - Filter by relation types (optional, null = all relations)Response:
{
"status": "ok",
"result": {
"visited": [2, 5, 8],
"edges": [
{ "from_id": 1, "to_id": 2, "relation": "similar_to", "weight": 0.95 }
],
"max_depth_reached": 2
}
}
POST /collections/{name}/graph/query
Content-Type: application/json
{
"query": "MATCH (n:Person) WHERE n.age > 25 RETURN n.name",
"params": { "min_age": 25 }
}
Response:
{
"status": "ok",
"result": {
"columns": ["n.name"],
"rows": [["Alice"], ["Bob"]],
"stats": { "nodes_scanned": 100, "rows_returned": 2 }
}
}
Binary import/export for collection backup and migration.
GET /collections/{name}/export
Response:
application/octet-streamX-Lattice-Format-Version, X-Lattice-Point-Count, X-Lattice-DimensionPOST /collections/{name}/import?mode={mode}
Query Parameters:
mode (required): create, replace, or mergeImport Modes:
create - Fail if collection exists (409)replace - Drop existing, create newmerge - Add points to existing (skip duplicates)Request:
application/octet-streamResponse:
{
"status": "ok",
"result": {
"points_imported": 1000,
"points_skipped": 0,
"dimension": 128,
"mode": "create"
}
}
cURL Examples:
# Export
curl http://localhost:6333/collections/test/export -o backup.lattice
# Import (create)
curl -X POST "http://localhost:6333/collections/new/import?mode=create" \
-H "Content-Type: application/octet-stream" \
--data-binary @backup.lattice
# Import (merge)
curl -X POST "http://localhost:6333/collections/test/import?mode=merge" \
-H "Content-Type: application/octet-stream" \
--data-binary @backup.lattice
All endpoints return errors in this format:
{
"status": "error",
"error": "Collection 'test' not found"
}
HTTP Status Codes:
200 - Success400 - Bad Request (invalid JSON, validation error)404 - Not Found (collection or point not found)500 - Internal Server Error| Feature | Description |
|---|---|
native | Enable native HTTP server (default) |
wasm | Enable WASM/Service Worker transport |
openapi | Enable OpenAPI/Swagger UI at /docs |
# Build with specific features
cargo build -p lattice-server --features "native,openapi"
This API is designed to be compatible with the Qdrant vector database API. Most Qdrant client libraries should work with LatticeDB with minimal changes.
Supported Qdrant endpoints:
LatticeDB Extensions:
Enable via environment variables:
# API Key authentication
LATTICE_API_KEYS=key1,key2,key3
# Bearer token authentication
LATTICE_BEARER_TOKENS=token1,token2
Usage:
curl -H "Authorization: ApiKey your-key" http://localhost:6333/collections
curl -H "Authorization: Bearer your-token" http://localhost:6333/collections
Enable rate limiting for production:
LATTICE_RATE_LIMIT=1 # Any value enables it
Defaults: 100 requests/second, burst capacity 200
Response Headers:
X-RateLimit-Limit: Requests per secondX-RateLimit-Remaining: Available tokensX-RateLimit-Reset: Reset window (1s)FAQs
World's First Production-Grade Hybrid Graph/Vector Database for the Browser
The npm package lattice-db receives a total of 1 weekly downloads. As such, lattice-db popularity was classified as not popular.
We found that lattice-db demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.