git » sdk » commit de93d64

NPM readme

author Stephen Paul Weber
2026-05-27 15:36:02 UTC
committer Stephen Paul Weber
2026-05-27 15:36:02 UTC
parent 98a2231752e87ff8695044bd7264254b50f9d04e

NPM readme

build-misc/Containerfile.image +1 -0
npm/README.md +37 -0

diff --git a/build-misc/Containerfile.image b/build-misc/Containerfile.image
index 23d175c..4c7dd34 100644
--- a/build-misc/Containerfile.image
+++ b/build-misc/Containerfile.image
@@ -89,6 +89,7 @@ RUN make ci
 
 RUN make -j$(nproc)
 RUN cd cpp && make clean
+RUN rm -rf npm/node_modules npm/package-lock.json npm/api-extractor.json npm/tsconfig.json
 
 FROM docker.io/debian:stable-slim
 
diff --git a/npm/README.md b/npm/README.md
new file mode 100644
index 0000000..e6d33cc
--- /dev/null
+++ b/npm/README.md
@@ -0,0 +1,37 @@
+# Borogove
+
+Borogove is a high-level headless chat SDK for building chat apps or chat experiences into other apps, backed by any [Snikket](https://snikket.org)-compatible server.
+
+## Browser Workaround
+
+There is a known bug in one of our JavaScript dependencies for browser builds, if xmpp.js is <= 0.14.0 then you may need something like this vite.config.js example
+
+```js
+resolve: {
+	alias: {
+		// https://github.com/xmppjs/xmpp.js/issues/1093
+		"node:dns": "./src/dns-stub.js",
+	},
+},
+```
+
+And then the stub:
+
+```js
+export default {
+	lookup: (x, y, cb) => cb(null, []),
+	resolveSrv: (x, cb) => cb(null, []),
+};
+```
+
+## Browser Sqlite
+
+To use the sqlite persistence (rather than the default IndexedDB persistence) in a browser build, you will need the `@sqlite.org/sqlite-wasm` package and this additional import:
+
+```js
+import { borogove_persistence_Sqlite as borogoveSqlite } from "borogove/sqlite-wasm";
+```
+
+## Documentation
+
+See https://borogove.dev/docs/js/