@thescaffold/chat-addons
v0.2.52
Published
Reference adapters and opt-in features for X Chat (memory/postgres stores, redis pubsub/presence, s3 storage, jwt auth, threads/reactions/receipts/...)
Readme
@thescaffold/chat-addons
The batteries for X Chat — reference implementations of every @thescaffold/chat-core
adapter, plus opt-in features. The core library never depends on a specific
database, queue, or cloud; everything concrete lives here.
Implemented (Milestone 1 — in-memory tier)
| Subpath | Exports | Notes |
| ----------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| store/memory | InMemoryRoomStore, InMemoryMessageStore, InMemoryUserStore, createMemoryStores | Zero-dependency stores over Maps; pass the same contract suite as Postgres |
| pubsub/memory | InMemoryPubSub | Synchronous single-process fan-out |
| presence/memory | InMemoryPresence | TTL'd presence with lazy sweep |
| storage/memory | InMemoryStorage | Pseudo-presigned URLs; bytes held in memory |
| auth/dev | DevAuthAdapter, issueDevToken | Dev only — no signature verification |
| content | registerBuiltinContent, createBuiltinContentRegistry | Validators for the six built-in content parts |
Planned (later milestones)
store/postgres— TypeORM stores (Milestone 2)auth/jwt,auth/header-passthrough(Milestone 2)storage/s3,storage/local-disk(Milestone 3)pubsub/redis,presence/redis(Milestone 5)features/{threads,reactions,receipts,typing,mentions,edits}(Milestone 6)observability/{pino,prom-client,otel}
Subpath exports (@thescaffold/chat-addons/store/memory, …) are a planned packaging
optimization; today everything is re-exported from the package root.
