Free launches are open: 12 a day, and open-source projects get a dofollow link with no badge.

Submit

capri

Type-safe Gleam bindings for the Khepri distributed database

Developer ToolsOpen sourceOpen source (repo not verified)#gleam#database#beam

Listed by the ProductPerch team from lobste.rs · not launched here yet

What is capri?

Capri provides type-safe, atomic Gleam bindings for Khepri, a modern distributed database built for the BEAM virtual machine. It replaces the active record pattern with a repository approach, allowing developers to define persistence layers that match traditional domain-driven design principles. The library handles path resolution, type decoding, and validation automatically.

The package includes built-in support for schema and data migrations. These migrations are atomic, versioned, and reversible, requiring each step to increment the repository version by exactly one. Decoders are attached to every version so schemas evolve in lockstep with the data. Developers can also create unsafe migrations, though the documentation strongly advises against them.

Capri manages derived views through projections, which store typed data in local ETS tables as ephemeral caches. It supports both set projections for single values and bag projections for multiple records sharing a key. The library also provides functions to join and reset nodes within a Khepri cluster, ensuring consistent state distribution across distributed environments.

capri features

  • Type-safe atomic bindings for Khepri database operations
  • Repository pattern implementation for structured persistence
  • Atomic, versioned, and reversible data migrations
  • Typed projections cached in local ETS tables
  • Cluster joining and local state reset utilities
  • Automatic path validation and type decoding

Who uses capri and for what

  • Building distributed BEAM applications with type-safe data access
  • Managing schema evolution through reversible database migrations
  • Creating ephemeral cached views using typed projections
  • Implementing repository patterns without active record overhead
  • Synchronizing local node state across a Khepri cluster

capri FAQ

Is Capri free?

Yes, Capri is released under the GNU Affero General Public License version 3 or later, making it free to use and modify.

What programming language does Capri support?

Capri is written for Gleam, a functional language that compiles to Erlang bytecode and runs on the BEAM virtual machine.

Does Capri work with other databases besides Khepri?

The documentation states that Capri is designed exclusively as bindings for Khepri. The website does not mention support for other databases.

How does Capri handle database migrations?

Capri supports atomic, versioned, and reversible migrations. Each migration step must increment the repository version by exactly one and includes decoders for both target and previous versions.

Is Capri open source?

Yes, the project is licensed under the AGPL-3.0-or-later license, and the source code is available under the Software Freedom Conservancy copyright notice.

Comments (0)

Comments and upvotes open when this product launches on ProductPerch.

More Developer Tools launches

All Developer Tools tools

Launch packs

Buy paid launches