node-sqlite3

Asynchronous, non-blocking SQLite3 bindings for Node.js with prebuilt native binaries.

Library
npm
v6.0.1
6,409 stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
55 /100 Fair
Development Activity 12
Maintenance 20
Community 88
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
69 /100 Good
Architecture 75
Code Quality 76
Innovation 55
Learning Curve 68

node-sqlite3 (published as the sqlite3 npm package) provides asynchronous, non-blocking bindings to SQLite3 for Node.js, implemented as a native C++ addon on top of node-addon-api. It exposes Database and Statement classes for running queries, prepared statements, and transactions without blocking the event loop, and ships prebuilt binaries via prebuild-install so most installs skip a local native compilation step.

Originally created by Mapbox and now maintained under Ghost’s TryGhost organization, it is one of the longest-standing Node.js SQLite drivers and is used as the underlying SQLite engine by numerous higher-level ORMs and query builders (including Ghost itself).

What You Get

  • Database and Statement classes for running queries, prepared statements, and parameterized SQL
  • Serialized and parallel execution modes for controlling concurrent query scheduling
  • Prebuilt native binaries via prebuild-install, falling back to node-gyp rebuild when no matching prebuild exists
  • TypeScript type definitions (lib/sqlite3.d.ts) bundled with the package
  • Verbose/tracing mode for debugging SQL execution during development

Common Use Cases

  • Embedding a lightweight, file-based SQL database directly inside a Node.js application or CLI tool
  • Serving as the underlying SQLite driver for a higher-level ORM or query builder
  • Local development and testing databases that don’t require a separate database server process
  • Small to medium production services (like Ghost) that use SQLite as their primary datastore

Under The Hood

Architecture The package is a native Node.js addon: src/node_sqlite3.cc defines the addon entry point, with database.cc/database.h and statement.cc/statement.h implementing the Database and Statement classes as thin async wrappers around the bundled SQLite3 C library (vendored under deps/). lib/sqlite3.js is the small JavaScript layer that loads the compiled binding (sqlite3-binding.js) and exposes the public API and TypeScript types.

Tech Stack A mix of C++ (native binding code, using node-addon-api), vendored C (the SQLite3 amalgamation under deps/), and a thin JavaScript wrapper layer; distributed via prebuild/prebuild-install so consumers get a matching prebuilt binary for their platform/Node ABI instead of compiling from source on install.

Code Quality The test/ directory (35 files) exercises the API extensively via Mocha, including a dedicated test/support/createdb.js fixture step before the suite runs, covering serialized/parallel execution modes, prepared statements, and error paths. As a mature, widely-depended-upon native binding, its C++ layer is battle-tested across a broad range of platforms and Node versions via the prebuild binary matrix.

API Design The API follows Node’s traditional callback-based database driver conventions (db.run(), db.get(), db.all(), db.each()), which keeps it compatible with a large ecosystem of ORMs and query builders built against the same interface shape, at the cost of feeling dated next to newer Promise-first SQLite bindings.

Used by 15 apps in this directory

TypeScript
77%
Other

Joplin

Note Taking

56,853

The privacy-first, open-source note-taking app with end-to-end encrypted sync, AI assistance, and a powerful plugin ecosystem across every platform.

View details
93
Repo Health
87
Technical
60
Dependency
Built with
TypeScript 77%
JavaScript 14%
Updated 1 weeks ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

208,437

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 92%
Updated 1 weeks ago
TypeScript
49%
MIT

Nginx Proxy Manager

Developer Tools · Networking · Security

34,517

Manage Nginx reverse proxies and free Let's Encrypt SSL through a beautiful web interface — no Nginx expertise required.

View details
92
Repo Health
77
Technical
72
Dependency
Built with
TypeScript 49%
JavaScript 47%
Updated 1 weeks ago
TypeScript
65%
Other

NocoDB

Databases · Low Code Platforms · No Code Platforms

65,340

Turn any SQL database into a collaborative no-code spreadsheet with automatic REST APIs and real-time views.

View details
91
Repo Health
77
Technical
63
Dependency
Built with
TypeScript 65%
Vue 30%
Updated 6 days ago
TypeScript
91%
MIT

SerpBear

Analytics · Marketing

2,128

Self-hosted keyword rank tracker with Google Search Console integration, multi-provider SERP scraping, and a built-in REST API.

View details
48
Repo Health
67
Technical
68
Dependency
Built with
TypeScript 91%
Updated 5 months ago
TypeScript
41%
AGPL 3.0

Wiki.js

Collaboration · Knowledge Management

29,081

A modern, self-hosted wiki platform built on Node.js with a rich plugin ecosystem for authentication, search, storage, and rendering that adapts to any team's infrastructure.

View details
95
Repo Health
67
Technical
60
Dependency
Built with
TypeScript 41%
Vue 39%
JavaScript 16%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers