# tonsky/datascript

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

Repository: https://github.com/tonsky/datascript
Canonical: https://ross.abutalabs.com/products/datascript
Language: Clojure
License: EPL-1.0
License Family: copyleft
Topics: clojure, database, memory-database, clojurescript, datascript
Last push: 2026-08-15T16:29:25+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 86, longevity 100
- inputs: {"age_days": 4523, "days_push": 18, "days_rel": 18, "gap_med": 63.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5784, forks 318 (observed 2026-08-28T04:09:29.586034+00:00)

## What it is
DataScript is an immutable, in-memory database with a Datalog query engine for Clojure, ClojureScript, and JavaScript. It is designed to be cheap to create and ephemeral, serving as a lightweight state-management building block for client-side applications.

## Use cases
- manage application state in the browser with an immutable database
- run Datalog queries against client-side data
- implement undo/redo by rewinding database state
- track evolving app state and sync with a server in the background
- replace hand-filtered arrays with indexed in-memory queries
- query structured data in ClojureScript single-page apps

## When to avoid
- you need durable, persistent storage or a real server-side database
- you have large datasets where a full database engine's overhead is justified
- you are not working in Clojure, ClojureScript, or JavaScript
- you need SQL or multi-user concurrent write support

## Facets
- artifact type: library
- maturity: stable
- function: database, search-engine, state-management
- domain: databases, web-development, frontend, developer-tools
- platform: jvm-scripting, browser, cross-platform
- tags: datalog, immutable-database, in-memory-database, clojurescript, client-side-state, persistent-data-structures, nodejs

## Member repositories
- tonsky/datascript (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:29.586034+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:52:49.850951+00:00, confidence not recorded.
  - readme: https://github.com/tonsky/datascript (fetched 2026-08-28T04:09:29.586034+00:00, sha b56cf5171c97)
- Data as of 2026-08-30T08:39:29.467469+00:00.
