hazo_state
v0.1.2
Published
Generic transactional KV store for the hazo ecosystem — TTL, optimistic CAS, atomic helpers, turnkey route/client
Readme
hazo_state
Generic transactional KV store for the hazo ecosystem. Provides TTL, optimistic CAS (version column), four visibility levels (global / scope / user-global / user), and protected (immutable-after-write) entries.
Install
npm install hazo_state hazo_connectSetup
Run the migration against your database:
- PostgreSQL:
psql -f node_modules/hazo_state/migrations/001_hazo_app_state.sql - SQLite (local dev): apply
node_modules/hazo_state/migrations/001_hazo_app_state_sqlite.sql
- PostgreSQL:
See SETUP_CHECKLIST.md for the full step-by-step.
Peer Dependencies
| Package | Required |
|---|---|
| hazo_connect | yes |
| react | optional (client entry only) |
Exports
| Path | Contents |
|---|---|
| hazo_state | Main entry (server + client-safe utilities) |
| hazo_state/server | Server-only entry (Node.js / Edge only) |
| hazo_state/client | Client-safe entry (React hooks / browser) |
| hazo_state/migrations/* | SQL migration files |
Changelog
See CHANGE_LOG.md.
