{
  "slug": "store/quickstart",
  "title": "Store Quickstart",
  "description": "Install the Store SDK and create your first store in under a minute.",
  "url": "https://cuitty.com/docs/store/quickstart",
  "markdown_url": "https://cuitty.com/docs/store/quickstart.md",
  "json_url": "https://cuitty.com/docs/store/quickstart.json",
  "frontmatter": {
    "title": "Store Quickstart",
    "description": "Install the Store SDK and create your first store in under a minute.",
    "order": 1,
    "section": "Store",
    "updatedAt": "2026-05-12"
  },
  "headings": [
    {
      "depth": 1,
      "slug": "store-quickstart",
      "text": "Store Quickstart"
    },
    {
      "depth": 2,
      "slug": "install",
      "text": "Install"
    },
    {
      "depth": 2,
      "slug": "create-a-store",
      "text": "Create a store"
    },
    {
      "depth": 2,
      "slug": "basic-crud",
      "text": "Basic CRUD"
    },
    {
      "depth": 2,
      "slug": "enable-sync",
      "text": "Enable sync"
    },
    {
      "depth": 2,
      "slug": "enable-encryption",
      "text": "Enable encryption"
    }
  ],
  "body_markdown": "# Store Quickstart\n\n## Install\n\n```bash\n# npm\nnpm install @cuitty/store\n\n# bun\nbun add @cuitty/store\n\n# pnpm\npnpm add @cuitty/store\n```\n\n## Create a store\n\n```ts\nimport { createStore } from \"@cuitty/store\";\n\nconst store = await createStore({\n  name: \"my-app\",\n  adapter: \"sqlite\",\n  path: \"./data/my-app.db\",\n});\n```\n\n## Basic CRUD\n\n```ts\n// Put a record\nawait store.records.put(\"users/alice\", {\n  name: \"Alice\",\n  role: \"admin\",\n});\n\n// Get a record\nconst alice = await store.records.get(\"users/alice\");\n\n// List records by prefix\nconst users = await store.records.list(\"users/\");\n\n// Delete a record\nawait store.records.delete(\"users/alice\");\n```\n\n## Enable sync\n\nAdd a `sync` block to push local writes to a remote backend automatically. Writes never block -- sync runs in the background.\n\n```ts\nconst store = await createStore({\n  name: \"my-app\",\n  adapter: \"sqlite\",\n  path: \"./data/my-app.db\",\n  sync: {\n    remote: \"postgres\",\n    strategy: \"last-write-wins\",\n  },\n});\n```\n\nSee [Sync & Conflict Resolution](/docs/store/sync) for strategies and conflict handling.\n\n## Enable encryption\n\nSet `encrypt: true` to encrypt all data before it leaves the device. The sync server never sees plaintext.\n\n```ts\nconst store = await createStore({\n  name: \"my-app\",\n  adapter: \"sqlite\",\n  path: \"./data/my-app.db\",\n  encrypt: true,\n  sync: {\n    remote: \"postgres\",\n    strategy: \"last-write-wins\",\n  },\n});\n```\n\nSee [End-to-End Encryption](/docs/store/encryption) for key management and zero-knowledge architecture.",
  "links_out": [
    "/docs/store/sync",
    "/docs/store/encryption"
  ]
}