refactor: rename library from pocketbook to atomsync

This commit is contained in:
Florian Schroedl
2026-04-16 20:18:45 +02:00
parent bcf7e03332
commit b68f97247a
20 changed files with 73 additions and 73 deletions

View File

@@ -1,10 +1,10 @@
# Pocketbook
# Atomsync
A Clojure-native synced atom. Offline-first key-value store with an `atom` interface that syncs to a SQLite-backed server over Transit.
```clojure
(def conn (<! (pocketbook/open "my-app")))
(def todos (pocketbook/synced-atom conn "todo" {:server "http://localhost:8090/sync"}))
(def conn (<! (atomsync/open "my-app")))
(def todos (atomsync/synced-atom conn "todo" {:server "http://localhost:8090/sync"}))
(swap! todos assoc "todo:1" {:text "Buy milk" :tags #{:groceries}})
@todos ;=> {"todo:1" {:text "Buy milk" :tags #{:groceries}}}
@@ -26,13 +26,13 @@ clj -M:server
# or: clj -M:server 8090 my-data.db
```
Starts on `http://localhost:8090` with a SQLite file at `pocketbook.db`.
Starts on `http://localhost:8090` with a SQLite file at `atomsync.db`.
### Client (CLJS)
```clojure
(ns my-app.core
(:require [pocketbook.core :as pb]
(:require [atomsync.core :as pb]
[cljs.core.async :refer [go <!]]))
(go
@@ -94,7 +94,7 @@ Client passes token:
```bash
# All server tests
clj -M:dev -e '(require (quote pocketbook.db-test) (quote pocketbook.transit-test) (quote pocketbook.server-test) (quote pocketbook.auth-test)) (clojure.test/run-all-tests #"pocketbook\..*")'
clj -M:dev -e '(require (quote atomsync.db-test) (quote atomsync.transit-test) (quote atomsync.server-test) (quote atomsync.auth-test)) (clojure.test/run-all-tests #"atomsync\..*")'
```
## License