Edge-native · End-to-end encryption

One script tag. A real-time backend.

Add shared, real-time storage to any static HTML page. No server, no database, no sign-up. Changes sync worldwide in milliseconds and can be encrypted in the browser.

AES-256-GCMClient-side encryption
128-bitCapability tokens
CloudflareGlobal edge network

Create a room

No sign-up

3–48 characters: letters, numbers, hyphen or underscore.

How it works

From idea to shared in three steps.

  1. Create a room

    Pick a name above. You get three tokens: read, write and admin.

  2. Add the script tag

    Paste the snippet into any HTML file, with the room name and write token.

  3. Share the file

    Send it on Telegram or host it anywhere. Everyone who opens it sees the same live data.

index.html
<script src="https://stash.devlabs.uz/stash.js"
        data-room="my-project"
        data-token="wrt_your_write_token"></script>

<form data-stash-form="messages">
  <input name="text" placeholder="Write something…" required />
  <button>Send</button>
</form>

<ul data-stash-list="messages"></ul>
Features

Built for static pages, hardened for production.

End-to-end encryption

Provide a secret and every item is encrypted in the browser with AES-GCM 256 before it leaves the device. The server only ever stores ciphertext.

Real-time sync

WebSocket fan-out from the nearest edge, with automatic reconnects.

Capability tokens

Separate read, write and admin tokens, bound to a per-room random salt.

Proof-of-work

Room creation needs a small SHA-256 puzzle. Bots pay, humans barely notice.

Works from file://

No hosting needed. Open the HTML file straight from disk or Telegram.

Offline-first

Reads come from an IndexedDB cache and writes are queued while offline. They sync automatically when the connection returns.

Documentation

Learn it in two minutes.

Connect forms and lists with plain HTML attributes. No JavaScript required. Content is always rendered with textContent, so user input can never inject markup.

index.html
<script src="https://stash.devlabs.uz/stash.js"
        data-room="my-project"
        data-token="wrt_your_write_token"></script>

<form data-stash-form="comments">
  <input name="name" placeholder="Your name" required />
  <input name="text" placeholder="Your comment" required />
  <button>Send</button>
</form>

<p><span data-stash-count="comments">0</span> comments</p>

<ul data-stash-list="comments">
  <template>
    <li><b data-field="name"></b>: <span data-field="text"></span></li>
  </template>
</ul>
Live demo

Two clients, one encrypted room.

This is the real service, not a simulation. We create a temporary room and connect two independent clients to it. Messages are encrypted in the browser before they are sent.

Starts a temporary encrypted room that expires after 30 days of inactivity.

Limits

Free for prototypes and small apps.

No account and no card. These limits keep the service fast and fair for everyone.

Active items per room500
Item size8 KB
Writes per IP address5 / s (burst 15)
Live connections per room100
Room creation10 / min per IP
Idle expiry30 days
Can anyone read my data?

Only holders of a token can. For anything sensitive, enable end-to-end encryption so even the server cannot read it.

What happens after 30 days of inactivity?

The room and all its data are permanently deleted, and the name becomes available again.

Can I self-host it?

Yes. The whole backend is one Cloudflare Worker plus a D1 database. The README has the full deploy guide.

For AI coding agents

One prompt for Cursor, Claude or ChatGPT.

Paste this prompt together with your HTML. The agent wires StashJS in correctly on the first try.

agent-prompt.txt
ROLE: You are an expert front-end engineer. Integrate StashJS v2 (a real-time backend for static HTML/JS pages) into the user's code.

RULES
1. Load the SDK: <script src="https://stash.devlabs.uz/stash.js"></script>. It also works on file:// pages.
2. Access is token-based. Ask the user for their room name and WRITE token (wrt_...); create them at https://stash.devlabs.uz if needed. Never put an admin token (adm_...) in client code.
3. Choose one mode:
   A) Declarative: add data-room and data-token to the script tag, data-stash-form="collection" on forms (inputs need name attributes), data-stash-list="collection" on lists (optional <template> with [data-field] children), data-stash-count="collection" on counters.
   B) Programmatic:
      const room = await Stash.connect("ROOM", { token: "wrt_...", secret: optionalSecret });
      await room.push("collection", { ...data });
      room.on("collection", (items) => { /* item: { id, data, lamport, createdAt, mine, pending } */ });
      await room.remove(id);            // own items only
      room.onStatus((s) => {});         // "connecting" | "online" | "offline"
4. Sensitive data: pass { secret } (or let the SDK read #key=... from the URL) to enable end-to-end AES-GCM encryption.
5. Always render user data with textContent, never innerHTML. Keep each item under 8 KB. Do not store images as base64.
6. Return complete, runnable single-file HTML.