DocLite is a database that fits inside your app. One file, zero setup.
Store anything, query everything โ in a language you already know.
No server to install. No schema to define. No migration to run.
Just drop it in and go.
If you know SQL, you know DocLite. SELECT, INSERT, JOINs, GROUP BY, HAVING, subqueries, UNION, CASE WHEN โ the syntax you're used to, with no learning curve.
Crash mid-write? No problem. The Write-Ahead Log recovers automatically. Every byte is CRC32 integrity-checked. ACID-compliant.
Persistent B+ Tree indexes give you O(log n) lookups out of the box. The query planner picks the right strategy โ you just write SQL.
INNER, LEFT, RIGHT JOINs with automatic strategy: Hash Join O(n+m), Index Lookup O(nยทlogย m), or Nested Loop fallback. DocLite picks the fastest path.
Store nested documents, dynamic fields, mixed types, arrays. Use dot-notation for deep access: user.address.city. Native JSON insert support.
BEGIN / COMMIT / ROLLBACK with undo log. Single-writer isolation, multi-reader concurrency. Either everything succeeds, or nothing changes.
EXPLAIN shows cardinality, selectivity, and cost estimation. Need more control? Use Oracle-style hints like /*+ INDEX_LOOKUP */ to tune manually.
Lumen (Vueย 3 + Tailwind) gives you a SQL editor, collection browser, schema viewer, LRU cache stats, and full SQL export โ no extra tools needed.
C shared library (cgo) with native wrappers: Python (ctypes), Node.js (ffi-napi), Java (JNA). One line to connect, one line to query.
Pick your language. Open a file. Start querying. It really is that simple.
db, _ := api.Open("app.dlite")
defer db.Close()
// Insert documents
db.Exec(`INSERT INTO users VALUES (name="Alice", age=30)`)
db.Exec(`INSERT INTO users VALUES (name="Bob", age=25)`)
// Query with JOIN
res, _ := db.Exec(`SELECT u.name, o.total
FROM users u
JOIN orders o ON u.name = o.user
WHERE o.total > 50
ORDER BY o.total DESC`)
// Transactions
tx, _ := db.Begin()
tx.Exec(`UPDATE accounts SET balance = balance - 100 WHERE id = 1`)
tx.Exec(`UPDATE accounts SET balance = balance + 100 WHERE id = 2`)
tx.Commit()
from doclite import DocLite
with DocLite("app.dlite") as db:
# Insert and query
db.exec('INSERT INTO users VALUES (name="Alice", age=30)')
result = db.exec("SELECT * FROM users WHERE age > 25")
for doc in result["docs"]:
print(doc["name"], doc["age"])
# Native JSON insert
db.insert_json("users", '{"name": "Bob", "tags": ["vip"]}')
# Aggregations
result = db.exec("SELECT COUNT(*), AVG(age) FROM users")
print(result["docs"])
const { DocLite } = require('./doclite');
const db = new DocLite('app.dlite');
// Insert and query
db.exec('INSERT INTO users VALUES (name="Alice", age=30)');
const result = db.exec('SELECT * FROM users');
console.log(result.docs);
// JSON insert
db.insertJSON('users', '{"name": "Bob", "age": 25}');
// Collections list
console.log(db.collections());
db.close();
try (DocLite db = new DocLite("app.dlite")) {
// Execute SQL
String result = db.exec("SELECT * FROM users");
System.out.println(result);
// Insert JSON
long id = db.insertJSON("users",
"{\"name\": \"Alice\", \"age\": 30}");
// List collections
System.out.println(db.collections());
}
$ ./doclite mydata.dlite
doclite> INSERT INTO users VALUES (name="Alice", age=30)
OK โ 1 row(s) affected, last ID: 1
doclite> SELECT * FROM users
[#1] name="Alice", age=30
--- 1 document(s)
doclite> .schema
users (1 document(s))
โโ name string (1/1 = 100%)
โโ age int64 (1/1 = 100%)
doclite> .tables
users
One library. Four languages. Same simple API. Connect in one line.
Native. No wrapper needed.
api.Open("db.dlite")
Zero dependencies. Just import.
from doclite import DocLite
npm install and go.
const db = new DocLite()
AutoCloseable. Try-with-resources.
new DocLite("db.dlite")
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
โ Go โ โ Python โ โ Node.js โ โ Java โ
โ (native) โ โ (ctypes) โ โ(ffi-napi)โ โ (JNA) โ
โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ
โ โ โ โ
โโโโโโโโโโโโโโโดโโโโโโโฌโโโโโโโโดโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโผโโโโโโโโโ
โ doclite.dll โ
โ (C shared lib) โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโผโโโโโโโโโ
โ DocLite Core โ
โ (Go engine) โ
โโโโโโโโโโโโโโโโโโโ
No credit card. No trial limits. Just download and build.
Join developers who chose simplicity over complexity.
One file. One minute. You're live.