# buzzcasting-storage

> This is a wrapper class to use multiple storage options with BuzzCasting.

Latest version **3.21.8** (published 2026-09-10) · 0 weekly downloads

## Install

```sh
npm install buzzcasting-storage
pnpm add buzzcasting-storage
yarn add buzzcasting-storage
bun add buzzcasting-storage
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 3.21.8 |
| Published | 2026-09-10 |
| First published | 2024-02-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mark Tamis, TouchFlows SAS |
| Maintainers | marktamis |

## Links

- npm: https://www.npmjs.com/package/buzzcasting-storage
- Repository: https://github.com/TouchFlows/buzzcasting-storage
- Homepage: https://github.com/TouchFlows/buzzcasting-storage#readme
- Issues: https://github.com/TouchFlows/buzzcasting-storage/issues
- npm.io page: https://npm.io/package/buzzcasting-storage

## Recent versions

- 3.21.8 (latest) — 2026-09-10
- 3.21.5 — 2026-08-05
- 3.21.4 — 2026-07-01
- 3.21.2 — 2026-03-20
- 3.21.1 — 2026-03-11
- 3.21.0 — 2026-03-11
- 3.20.0 — 2026-02-27
- 3.19.4 — 2026-02-27
- 3.19.3 — 2026-02-27
- 3.19.2 — 2026-02-27
- 3.19.1 — 2026-02-27
- 3.18.4 — 2026-02-10
- 3.18.3 — 2026-02-10
- 3.18.1 — 2026-02-05
- 3.17.5 — 2026-01-07
- … 237 more at https://npm.io/package/buzzcasting-storage/versions

## README

# BuzzCasting Storage

This is a wrapper class to use multiple storage options with BuzzCasting.

BuzzCasting Social Media Wall & Dataviz [More info](https://www.touchflows.com/services-buzzcasting-social-media-wall/).

Currently supported are: Local Storage, Session Storage, IDB Keyval, Dexie, Window object

## Documentation

`docs/` is typedoc-generated API reference (regenerated by `npm run docs`, overwritten every time — don't hand-edit it). Hand-written architecture guides live in [`documentation/`](documentation/) instead:

- [documentation/architecture.md](documentation/architecture.md) — the `BuzzcastingStorageManager`/`Widget`/`BuzzcastingStorageReader` pipeline, the subscribe → fetch → hash-diff → broadcast → re-read data flow, and why a `Widget` can only ever render `cloud`/`series`/`messages` data.
- [documentation/storage-backends.md](documentation/storage-backends.md) — the five interchangeable storage backends, the Dexie schema, and the staleness/expiry model (there isn't much of one).
- [documentation/known-issues.md](documentation/known-issues.md) — confirmed bugs and inconsistencies in the current codebase (e.g. `ApiClient.loadDashboards` actually fetching the widgets endpoint, not a dashboards one) worth knowing about before you hit them yourself.
- [documentation/moderation.md](documentation/moderation.md) — `hideMessage`/`hideLabels`: a soft `visible` flag in Dexie plus a remote call for messages, a remote-only call with no local implementation at all for cloud labels, and the separate, deployment-time `MODERATION` enum that gates which messages are ever fetched in the first place.

## Features

- ✨ Fully customized [eslint](https://eslint.org/) configuration based on the config by [Antfu](https://github.com/antfu/eslint-config)
- 🧪 Write tests quickly and conveniently with [vitest](https://vitest.dev/)
- 🤝 Supports [conventional commits](https://www.conventionalcommits.org/)
- 💅 Generate beautiful changelogs with [changelogen](https://github.com/unjs/changelogen)
- ♾️ GitHub CI for your build
- 🤖 Ready configuration for [renovatebot](https://github.com/apps/renovate) with [renovate-config](https://github.com/hywax/renovate-config)
- 🚀 Library releases with just one command

## Get started

This package has two entry points, used by two different kinds of consumer — see [documentation/architecture.md](documentation/architecture.md) for the full picture.

**A rendered widget component** (e.g. a `cards-widget`/`series-widget`/`cloud-widget` in `buzzcasting-app`) uses `Widget`, keyed off its own `data-*` attributes:

```ts
import { Widget } from 'buzzcasting-storage'
import type { IResponse } from 'buzzcasting-utils'

// element.dataset.{widget,dashboard,type} become the query; window.__bc.opts
// must already be set up by the host app (it supplies `presentation`).
const setData = (response: IResponse) => {
  if (!response.success) return
  // ...update component state from response.data
}

const widget = new Widget(element, [setData])
widget.subscribe() // registers with the app-level BuzzcastingStorageManager
```

`Widget` only supports `series`, `cloud`, and `messages` query types — nothing else (this is a hard architectural constraint, see [documentation/architecture.md](documentation/architecture.md)).

**The host app itself** (once, at startup) constructs the orchestrator every `Widget` rendezvouses with over a shared `BroadcastChannel`:

```ts
import { BuzzcastingStorageManager } from 'buzzcasting-storage'
import type { IStorageOptions } from 'buzzcasting-utils'

const options: IStorageOptions = {
  app: 'my-subdomain',
  version: 'v4',
  presentation: 'presentation_id',
  locale: 'en-US',
  bearer: 'bearer_token',
  storage: 'dexie', // the only backend actually exercised in production - see documentation/storage-backends.md
}

const storageManager = new BuzzcastingStorageManager(options)
storageManager.startBroadcastListener() // begins listening for widget SUBSCRIBE/UPDATE events

// on whatever interval/event the host app decides:
await storageManager.update()
```

### Git Clone

```shell
git clone https://github.com/TouchFlows/buzzcasting-storage.git
cd buzzcasting-storage
pnpm install
```

## Usage

The project contains the following scripts:

- `dev` - Start the development server
- `build` - Build for production
- `release` - Generate changelog and npm publish
- `lint` - Checks your code for any linting errors
- `test` - Run all tests
- `test:watch` - Run all tests with watch mode
- `test:coverage` - Run all tests with code coverage report
- `prepare` - Script for setting up husky hooks

## Useful Links

- [IndexedDB Reference](https://app.studyraid.com/en/read/11356/355143/optimizing-database-schema-design)

## License

This template was created under the [MIT License](LICENSE).

---
_Source: https://npm.io/package/buzzcasting-storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
