
A DOCUMENT GRAPH DATABASE FOR COLLABORATIVE APPLICATIONS
TerminusDB is a multi-model, open-source, distributed document graph database with collaboration, workflow, and revision control tools at its heart.
A document-oriented graph database with version control & collaboration model
TerminusDB is an immutable database, storing changes as deltas. Immutability enables collaboration workflows, version control, diff and patch, time travel, and the ability to branch, clone, and merge your database. Use TerminusDB to model and build data-intensive, collaborative applications. Its features include:
Faster Time to Market
TerminusDB & TerminusX are fast – really fast. Build an application MVP in a single sprint.
Schema First
The flexible and extendable JSON schema syntax acts as a blueprint to model data and develop scalable applications.
Customizable
Automatically generate UIs and forms that have data validation as standard.
Like Git for Data
A versioning first database, fork, clone, branch, and merge, just like Git, to collaborate with colleagues, time travel, and develop with the safety of undo.
Document Oriented
Work with JSON documents and build relationships between documents in a powerful knowledge graph.
Easy
Quick to install, start building your apps in minutes.
CI/CD for your database
Store data as JSON and utilize the power of graph database relationships. TerminusDB’s collaboration model lets you branch, clone, and merge your database and use workflows, approval processes, time travel, and version control to build applications that enable many users to share and use data concurrently.
# Create database
terminusdb db create admin/philosophers
# Add a schema
echo '{ "@type" : "Class",
"@id" : "Philosopher",
"name" : "xsd:string" }' | terminusdb doc insert admin/philosophers -g schema
# Add a JSON document
echo '{ "name": "Socrates" }' | terminusdb doc insert admin/philosophers
# Get the document back
terminusdb doc get admin/philosophers
# Prove that it works, Socrates is there!
# Branch the database
terminusdb branch create admin/philosophers/local/branch/changes --origin admin/philosophers
# Add more philosophers to new branch
echo '{ "name": "Plato" }' | terminusdb doc insert admin/philosophers/local/branch/changes
echo '{ "name": "Aristotle" }' | terminusdb doc insert admin/philosophers/local/branch/changes
# Look at the difference between branches
terminusdb diff admin/philosophers --before-commit main --after-commit changes | jq
# Apply the differences to main
terminusdb apply admin/philosophers --before-commit main --after-commit changes
# Look at the difference again
terminusdb diff admin/philosophers --before-commit main --after-commit changes | jq
#!/usr/bin/env python3
from terminusdb_client import Client
from random import random
client = Client("http://localhost:6363", account="admin", team="admin", key="root")
client.connect()
db_name = "philosophers" + str(random())
client.create_database(db_name)
client.connect(db=db_name)
# Add a philosopher schema
schema = {"@type": "Class",
"@id": "Philosopher",
"name": "xsd:string"
}
# Add schema and Socrates
client.insert_document(schema, graph_type="schema")
client.insert_document({"name": "Socrates"})
# Verify that it added in the DB
print(list(client.get_all_documents()))
# Create new branch and switch to it
client.create_branch("changes")
client.branch = "changes"
# Add more philosophers
client.insert_document({"name": "Plato"})
client.insert_document({"name": "Aristotle"})
# Diff the branches
diff = client.diff_version("main", "changes")
print(diff)
# Apply the differences to main with apply
applied = client.apply("main", "changes", branch='main')
print("Applied:")
print(applied)
# Diff again
diff_again = client.diff_version("main", "changes")
print("Second diff:")
print(diff_again)
const Client = require('@terminusdb/terminusdb-client');
const client = new Client.WOQLClient(
'http://127.0.0.1:6363',
{
user: 'admin',
key: 'root',
},
);
async function main() {
// Create a database
await client.createDatabase('philosophers', {
label: 'Philosophers',
comment: 'Philosophers by name',
schema: true,
});
// Add the philosopher type
const schema = {
'@type': 'Class',
'@id': 'Philosopher',
name: 'xsd:string',
};
await client.addDocument(schema, { graph_type: 'schema' });
// Add Socrates
await client.addDocument({ name: 'Socrates' });
// Get back all documents
const doc = await client.getDocument({ as_list: true });
console.log(doc);
// Create a branch
await client.branch('changes');
// Add more philosophers to the new branch
await client.addDocument({ name: 'Plato' });
await client.addDocument({ name: 'Aristotle' });
// Look at the differences between branches
const diffs = await client.getVersionDiff('main', 'changes');
console.log(diffs);
// Apply the differences to main
client.checkout('main');
await client.apply('main', 'changes', 'apply changes');
// Check the for any remaining differences between branches
const remaining_diffs = await client.getVersionDiff('main', 'changes');
console.log(remaining_diffs);
}
main();
TerminusDB - Build data-intensive apps fast
The TerminusDB schema language connects JSON documents into a graph. It is a distributed database with a collaboration model, designed to be like Git, but for data. Model your data and schema, store data as JSON, and use graph relationships within your queries to build data-first apps.
A data solution for data-intensive applications
For apps that are data-intensive, collaborative, and relationship aware, TerminusDB is a flexible, schema-first document graph database

Feature rich open source document graph database
Technical documentation providing overviews, tutorials, code examples, and how-to-guides to get started with TerminusDB
Use Cases
From application layers to global knowledge banks, learn how TerminusDB is being used.
TerminusDB Internals
Part 1 of TerminusDB Internals, looks at the guts and how we’ve built an in-memory graph database to avoid thrashing and slow performance.
TerminusX: Now TerminusCMS
TerminusX is now TerminusCMS. It is a platform to build headless systems for complex and collaborative applications.
Front-end developers
can build quickly with
JSON and GraphQL
Manage your teams,
access tokens, time
travel, and create
new projects.
Editing frames are
auto-generated from
the schema along with
validation & localixation
Schema modeler,
document explorer,
GraphQL & Datalog
API playground, &
change request
management.
more on terminusdb
6 reasons why TerminusDB is the right toolkit to build collaborative apps
If you are looking to build collaborative applications where users are a primary source of data and content, then this article explains the TerminusDB and
TerminusDB v10.1.0: The Mule
We have recently released TerminusDB v10.1 which we have labeled The Mule. We have added a number of technical features, and performance enhancements, but most
The Semantic Web is Dead – Long Live the Semantic Web!
A technical and in-depth look at the semantic web and where it all went wrong and failed to deliver against the initial hype.
READY TO GET STARTED?
Start building today with TerminusDB. Follow the link below to the installation documentation.