tonsky/datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 3 minutes ago
Added to GitGenius on September 11th, 2026
Created on April 15th, 2014
Open Issues & Pull Requests: 76 (+0)
GitHub issues: Enabled
Number of forks: 318
Total Stargazers: 5,791 (+0)
Total Subscribers: 141 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 20.7 hours
Mean response time: 113.3 days
90th percentile: 27.6 days
Tracked items: 15

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 338 days
Stale 30+ days: 2
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

DataScript is an immutable in-memory database and Datalog query engine for Clojure, ClojureScript, and JavaScript.

DataScript addresses the problem of managing complex application state in the browser by providing a lightweight, queryable data store that operates like a persistent data structure rather than a traditional database. It uses immutable, persistent data structures and a Datalog query engine to enable efficient lookups and complex queries without the overhead of a real SQL database. The core insight is that database operations reduce to hashmap lookups or array iteration, making the tool fast for small datasets and indexed for larger ones.

DataScript suits client-side applications that need to track substantial state throughout their lifetime. It works well for scenarios requiring a central, uniform approach to state management where rendering, server synchronization, undo/redo, and background operations must remain decoupled and independent. The immutability model simplifies reasoning about state evolution, enables time-travel debugging, and allows consistent rendering without locking concerns. Developers should choose this tool when they need to query application state using Datalog rather than imperative filtering, and when they want a structured format for tracking data flowing in and out of the application. The tool is ephemeral by design—databases are created on page load and discarded when the user closes the page.

The project maintains active engagement with its community through a dedicated Slack channel and provides comprehensive documentation including API references, query guides, storage documentation, and tutorials. Development activity shows ongoing attention to integration issues, particularly with build tools like shadow-cljs, indicating responsiveness to real-world usage patterns. The project includes substantial supplementary resources in the form of blog posts explaining architectural decisions and internals, demonstrating a commitment to helping developers understand both how to use and how the tool works.