Durable, SQLite-backed implementation of the @basaltkit/commentsCommentStore — per-resource threads with @mentions and resolve/reopen — built on Node's built-in node:sqlite. Zero external dependencies.
Swap it in for the in-memory store and comment threads survive a restart — no ORM, no migration tool, no service. The single-node reference backend; the production (Postgres/MySQL) counterpart is @basaltkit/comments-prisma.
import { commentsPlugin } from '@basaltkit/comments'import { sqliteCommentsStore } from '@basaltkit/comments-sqlite'const c = sqliteCommentsStore('./data/comments.db') // ':memory:' by defaultconst app = await createApp({ plugins: [commentsPlugin({ store: c.store })],}).boot()
SqliteCommentStore is also exported and takes a DatabaseSync, so it can share a handle with the other *-sqlite stores. openCommentsDatabase() and migrate() are exported too.
Package reference
Mirrors the package README (single source). Install
@basaltkit/comments-sqlitev1.0.5— npm · source.<p align="center"> <a href="https://basaltkit-docs.pages.dev"> <img src="https://basaltkit-docs.pages.dev/social-card.png" alt="Basalt" width="440"> </a> </p>
@basaltkit/comments-sqlite
Durable, SQLite-backed implementation of the
@basaltkit/commentsCommentStore— per-resource threads with @mentions and resolve/reopen — built on Node's built-innode:sqlite. Zero external dependencies.Swap it in for the in-memory store and comment threads survive a restart — no ORM, no migration tool, no service. The single-node reference backend; the production (Postgres/MySQL) counterpart is
@basaltkit/comments-prisma.> Requires Node 22.5+. Stable and flag-free on Node 24; on 22.x run with >
--experimental-sqlite.Use it
SqliteCommentStoreis also exported and takes aDatabaseSync, so it can share a handle with the other*-sqlitestores.openCommentsDatabase()andmigrate()are exported too.Notes
commentstable, keyed by(tenant_id, id)and indexed by resource; threads list oldest-first, exactly as in the in-memory store.undefinedclears the column (reopen), an absent key is left untouched.mentionsare stored as JSON and round-trip unchanged.node:sqliteis synchronous; the methods stayasyncto honor the contract.License
MIT