Tables
Manage your database tables and collections
Vector Search
Search by natural language with semantic embeddings
Enter a natural language query above to find semantically similar content
Query Builder
Build and execute advanced queries with filters
Configure query parameters above and click Run to see results
Aggregation Pipeline
Build MongoDB-style aggregation pipelines
Supported stages: match, lookup, group, sort, limit, project, unwind
Define aggregation stages and click Run to see results
Vault
Securely store and use API secrets
Add secrets above to use them in API calls
Users
Manage system users and roles
Settings
Configure your admin dashboard preferences
-
Documentation
js-doc-store API reference and usage guide
js-doc-store is a zero-dependency vanilla JS document database with MongoDB-style queries, indices, joins, aggregation, encryption, and auth.
# Start the server
npm install
npm start
# Server runs on http://localhost:3000
Bootstrap (first admin only):
POST /auth/bootstrap
{
"email": "[email protected]",
"password": "Admin123!",
"name": "Admin"
}
Login:
POST /auth/login
{
"email": "[email protected]",
"password": "Admin123!"
}
> Response: { "token": "eyJ...", "user": {...} }
# List tables
GET /admin/tables
# Create table
POST /admin/create-table
{ "tableName": "products", "columns": [
{ "name": "name", "type": "text" },
{ "name": "price", "type": "number" }
]}
# Insert
POST /admin/insert
{ "tableName": "products", "data": {"name":"Laptop","price":999} }
# Query
POST /admin/query
{ "tableName": "products", "filter": {"price":{"$gte":500}}, "limit": 10 }
# Update
POST /admin/update
{ "tableName": "products", "filter": {"_id":"xxx"}, "update": {"$set":{"price":899}} }
# Remove
POST /admin/remove
{ "tableName": "products", "filter": {"_id":"xxx"} }
# Aggregate
POST /admin/aggregate
{ "tableName": "products", "pipeline": [
{ "stage": "match", "params": {"price":{"$gte":100}} },
{ "stage": "group", "params": {"field":"category","accumulators":{"total":{"$sum":"price"}}} }
]}
Requires EMBEDDING_WORKER_URL and EMBEDDING_API_KEY env vars.
# Generate embedding
POST /admin/embed
{ "text": "machine learning", "dimensions": 768 }
# Index with auto-embedding
POST /admin/vector/index-with-text
{ "collection": "docs", "id": "doc-1",
"text": "AI is transforming...",
"metadata": {"category":"tech"} }
# Search by natural language
POST /admin/vector/search-by-text
{ "collection": "docs", "query": "artificial intelligence", "limit": 10 }
# Hybrid search (vector + BM25)
POST /admin/vector/search-hybrid
{ "collection": "docs", "query": "neural networks", "limit": 5 }
PORT=3000
NODE_ENV=production
DATA_DIR=/opt/js-doc-store-server/data
JWT_SECRET=
VAULT_SECRET=
DB_ENCRYPTION_KEY=
[email protected]
ADMIN_PASSWORD=
EMBEDDING_WORKER_URL=https://worker.your-subdomain.workers.dev
EMBEDDING_API_KEY=your-api-key
- GET /public/tables
- GET /public/query/:table
- POST /auth/bootstrap — create first admin
- POST /auth/register — register new user
- POST /auth/login — get JWT token
- GET /admin/tables — list tables
- POST /admin/create-table
- POST /admin/insert
- POST /admin/query — find with filters
- POST /admin/update — update documents
- POST /admin/remove — delete documents
- POST /admin/aggregate — pipeline aggregation
- POST /admin/embed — generate embedding
- POST /admin/vector/index-with-text
- POST /admin/vector/search-by-text
- GET /admin/vector/collections
- GET /admin/users — list users
- POST /admin/users/create
- POST /admin/users/update
- POST /admin/users/delete
- POST /admin/users/role — assign/remove role
- POST /admin/vault/add — store secret
- GET /admin/vault/list
- POST /admin/vault/execute