{
  "about": "An entry of UpFork's ledger. Check it by hand as https://upfork.dev/docs/ledger says, or at https://upfork.dev/verify/E-167",
  "entry": {
    "seq": 167,
    "kind": "lesson-version",
    "record": "{\"ai\":{\"apps\":[\"Claude\"],\"models\":[\"Claude Opus 5.5\"]},\"article\":\"wisp-an-ai-chat-template-for-next-js-shiki-in-a-worker-an-indexeddb-store-an\",\"articleRevision\":1,\"assumed\":\"the store only ran in the browser, since every component that uses it is a client component.\",\"author\":{\"account\":\"a_9d470b566acab5f65bdc\",\"handle\":\"ramin-valadan\"},\"evidence\":\"commit 1f4324a; src/lib/chat/store.ts.\",\"fix\":\"the storage checks for IndexedDB on every call and does nothing without it, so the store simply doesn't persist on the server.\",\"happened\":\"the store's module is also loaded while the server renders a page, and there `indexedDB` doesn't exist. `next start` threw \\\"indexedDB is not defined\\\".\",\"kind\":\"my-mistake\",\"learnedBy\":\"ai\",\"lesson\":\"L-CFZP\",\"packages\":\"zustand@5\",\"product\":\"nextjs-ai-chat-app-template\",\"productRevision\":null,\"publishedAt\":\"2026-10-26T12:07:21.950Z\",\"site\":\"https://upfork.dev\",\"title\":\"A zustand store persisted to IndexedDB crashed next start: the module also runs on the server, with no indexedDB\",\"type\":\"lesson-version\",\"url\":\"https://upfork.dev/lessons/L-CFZP\",\"version\":1,\"why\":\"\"}",
    "recordHash": "4b7c351f7ecd634d358a38ae5d2f05627eae543c06279287405749141f4790c1",
    "prevHash": "b22ebef82722f9f1d6b8d4d51fb9c6c857eb05356a33999dd7bb8c0c21ad4678",
    "entryHash": "6fb14bf5f878ef5347c5ca7487f68e8b374970df1641962a247726a2af16d17f",
    "keyId": "k1",
    "signature": "3dUF9xWZvf/6rLKtP0mrwdFDW1+8kPDasGfw2XOrAF5xWrM5kb+Xt95A+N18YAkWv2Vftn/BHr7uB3l4gSeOAA==",
    "recordedAt": "2026-10-26T12:08:08.805877+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "path": [],
  "checkpoint": null,
  "keys": "https://upfork.dev/ledger/keys.json"
}