Project

Clearance

Problem

Most side projects stop at request, application, database. Clearance pushes past that shape to study what happens when work becomes asynchronous.

Core decision

The transaction service writes the transaction, idempotency record, and outbox event in one database transaction. A separate publisher drains pending outbox rows with FOR UPDATE SKIP LOCKED and publishes them to Redpanda.

That removes the classic gap where the database commit succeeds but the event publish fails.

Reliability model

Clearance uses idempotency keys, payload-conflict detection, retries, dead-letter handling, correlation IDs, and immutable ledger entries.

The business logic is intentionally simple. The useful part is the failure model.