Key/value & list storage, no accounts

Storage that outlives the browser it was born in.

localStorage disappears the moment a tab, a device, or a factory reset does. PrefsDB doesn't. Hash a phrase into a key, and read the same data back from any device — no server to run, no account to create.

Claim ticket for this demo — correct-horse-battery-staple 7f3a…e918
0X7F3A · ONE KEY, ANY DEVICE VALID
// before — trapped in this browser
localStorage.setItem("theme", "dark");
localStorage.getItem("theme");

// after — same shape, works everywhere
const db = await PrefsDB.getkey("my-app", [yourPhrase]);
db.setItem("theme", "dark");
const { value } = await db.getItem("theme");
// value === "dark", from any browser on any device

Why PrefsDB?

PrefsDB bridges the gap between ease of localStorage and a flexibility of a backend.

01

Key/Value Storage

I created PrefsDB because not all projects warrant a full fledged backend or require centralized control over their users' data.

02

Cross-Device Data

PrefsDB never sees your phrase, only its hash. No email, no password, nothing stored about who you are.

03

No-Accounts / No-Logins

* You are a dev developing an app. You do not want to manage a backend, to handle users accounts, but still need to store user specific data somewhere. * As a dev you also don't want the burdern of creating and managing your user's accounts. PrefsDB allows you to save user specific data securely, under no-login, no-accounts model. PrefsDB is a localStorage alternative that supports:
  • Document data types: key/value, list, file data type
  • No logins, no accounts: devs or their user do not create accounts to work with the data.
  • Cross-device: restore data on any device or browser.
  • Security: - API key bound per-user isolation, - RLS via key isolation - Credentials never leave client/browser, - End-to-end encryption, - No accounts to hack.
  • No limits: no 5 MB or other limitations associated with localStorage.
  • Offline mode: your apps work when your users go offline
  • Optimistic updates: straight out of the box.
  • Real-time sync: change a value on one device, get a callback on another
  • Magic links: Users still have access to their data when.
  • No vendor lock-in: users can import/export their data.
  • No-cost: free to devs, free to dev's users, power-user-pays model
  • Self-hosted: coming soon
  • Developer tools: collect console output from multiple devices/browsers in one place

PrefsDB vs. localStorage vs. traditional backend

PrefsDB was built to fill the gap that exists between localStorage convenience and a power of a backend.

 localStorageYour own backendPrefsDB
Works across devices No Yes Yes
Survives a wiped device No Yes Yes
Storage ceiling ~5–10MB / origin whatever you provision no practical cap
Servers you maintain 0 1+ 0
Accounts your users create0 usually 1 0
Cost to developer 0 High @ scale 0
Off-line mode Yes No Yes
Optimistic updates No No Yes
Multi-device console.log No No Yes

Get started

Add PrefsDB to your project

Domains, lists, filters and expiry are opt-in — use the plain drop-in shape above, or reach for these when your data grows up.

<script src="https://prefsdb.com/prefsdb.v1.min.js"></script>

Initialize the client

Credentials are never stored anywhere and never leave the client. Ideally provided by your user on as-needed basis.

await db = PrefsDB.createkey("name",["s1", "s2"]);


All done. We now read+write data

Settings unique for your user can now be read across multiple devices and browsers.

await db.setValue("theme", "dark");
        
const R = await db.getValue("theme");
const theme = R.success ? R.value : defaultValue

Beyond setItem() / getItem()

Structure it when you need to.

Manage your data by with grouping commands, lists, filters and TTL — All data is accessible to your users with UUID links generated on the fly and returned with each response.

Namespaces and data grouping
await db.domain("prefs").key("theme").write("dark");
Lists and collections
await db.list("recent-searches").add("tape delay pedals");
Data Import / Export
const all = await db.domain("prefs").readAll();
Time-to-live
await db.ttl(7).key("invite-code").write(code);
File uploads
const R = await db.putObject(file)
Optimistic updates
const R = await db.project("my-game")
              .subdomain("game-stats")
              .key("score")
              .write(200)
Works Off-line
const R = await db.putObject(file)
Secure
RLS, API token isolation, end-to-end encryption, no accounts

Why teams reach for it

Everything localStorage promised, minus the catch.

Cross-device

Write on your phone, read on your laptop

The same key resolves to the same data anywhere — five minutes or five years later.

Durable

Survives a wipe

Data lives on PrefsDB's servers, not in a browser profile a factory reset or cache clear can erase.

No ceiling

Outgrows 5–10MB

That's localStorage's per-origin cap. Store a handful of settings or thousands of list entries — the browser stops being the limit.

No backend

Call it straight from client JS

Nothing to provision, deploy, or patch at 2am. The API is the backend.

No accounts

No login stands in the way

A key comes from hashing a phrase you choose. No email, no password, no signup screen between a user and their data.

Secure by design

Nothing to phish

There's no password database to breach and no account to take over — just an opaque key that only works because you already know the phrase behind it.