Skip to content

Repository files navigation

keepsake

Let it be forgotten, as a flower is forgotten, Forgotten as a fire that once was singing gold.

— Sara Teasdale, "Let It Be Forgotten" (1920)

keepsake remembers relations with an end: a trusted tag, a 24-hour mute, an entitlement, a hold, a risk flag. Writes are idempotent, expiry runs on a schedule you choose, and every lifecycle change produces a typed audit event.

I kept writing versions of this pattern in compliance-heavy services, where an expiry that mostly works is still wrong. Keepsake is the version I wanted to stop rewriting.

Keepsake owns relation lifecycle state. Your application still owns its users, display data, tenant choice, and authorization rules. Gatekeep can turn active relations into authorization facts; Dovecote stores the audit events and their delivery state.

Install

Keepsake 6.0 adds caller-owned lifecycle transactions and effective relation observations. See the versioning guide when upgrading an existing service.

For Postgres:

cargo add keepsake@6 keepsake-sqlx@6
cargo add dovecote-sqlx-postgres@0.2
cargo add sqlx --features postgres,runtime-tokio,tls-rustls
cargo add time@0.3

SQLite and MySQL use the matching keepsake-sqlx feature and Dovecote adapter. The installation guide covers all three backends and schema setup.

Start with the quickstart, browse the guides and reference, or read the API docs for keepsake and keepsake-sqlx.

The repository includes complete Postgres examples for tags and sanctions.

Licensed under MIT OR Apache-2.0.

About

A better model for policy-held, expireable lifecycle relationships

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages