Early preview. Purchases are test/demo and no real money moves. Join the waitlist

Kessance
Back to feed
Code & softwareBackend or APISystem

Tally: Double-Entry Ledger Service

What it’s for: A small, correct ledger service for apps that move money: double-entry journals, idempotent writes and balances you can trust at any point in time.

Sold by @devonDeclared by creator
Made withClaude Opus 5.5GPT-6.1 Sol

Code excerpt

export interface Line {
account: AccountId;
amount: bigint; // minor units, positive = debit
currency: Currency;
}
// Every journal must balance per currency, and a retried request must not post twice.
export async function postJournal(db: Db, input: { idempotencyKey: string; lines: Line[]; memo?: string }) {
for (const [currency, total] of sumByCurrency(input.lines)) {
if (total !== 0n) throw new UnbalancedJournal(currency, total);
}
return db.transaction().setIsolationLevel('serializable').execute(async (tx) => {
const existing = await findByIdempotencyKey(tx, input.idempotencyKey);
if (existing) return existing;
const journal = await insertJournal(tx, input);
await appendAudit(tx, { kind: 'journal.posted', journalId: journal.id });
return journal;
});
}
Partial code: 248 more lines in this file, full source after purchase.

Versions

Earlier versions sell at their own price.

Tally: Double-Entry Ledger Service

v1.0 · Use license

Dossier

What it is, how it was made, and what you need to run it.

What you save

95

hours invested

310

iterations to get it right

Code & software details

Language & framework
TypeScript on Node 24, Postgres 17
How to run
docker compose up; the OpenAPI 3.1 spec is in api/openapi.yaml
Main dependencies
Visible after purchase

Process notes

Approach
Devon designed the journal rules from his years on fintech infrastructure; Claude Opus 5.5 and GPT-6.1 Sol wrote most of the code and the 420 tests, and he reviewed every rule that touches money by hand. Property-based tests generate random journals and prove that each one balances.
Prompts and settings
Visible after purchase

What’s included

The exact contents you receive. Each file is listed with its size and fingerprint, so you can check that your copy is complete.

PathSizeSHA-256
  • README.md7.8 KB93086d60
  • LICENSE.md2.5 KBfd24cf43
  • package.json1.7 KB2970c7bd
  • docker-compose.yml1.7 KBa9b50e06
  • api/39 KB1 file
    • openapi.yaml39 KB2de8f711
  • docs/9.4 KB1 file
    • integration.md9.4 KB1f542b50
  • migrations/8.8 KB1 file
    • 001_ledger.sql8.8 KB4c6a3060
  • src/30 KB4 files
    • journal.ts13 KB9a1282c2
    • balances.ts7.8 KB3d7843c0
    • currency.ts4.3 KB1ef82956
    • audit-log.ts4.9 KB12e7a921
  • src/reconcile/12 KB1 file
    • stripe-payouts.ts12 KB08dbd81b
  • tests/21 KB1 file
    • journal.property.test.ts21 KBd67f6c2e
13 files in 6 foldersTotal 134 KB

Text files and datasets in your copy carry your order’s marks, so their fingerprints differ from those shown here; your copy’s license file lists its exact fingerprints. Images, video and other binary files arrive unchanged.

License in plain words

For the Use license you have selected.

You can

  • Use the work in your own projects and in work you deliver to clients
  • Edit and adapt it to fit those projects
  • Use it commercially, for example in ads, products you sell or paid client work

You can’t

  • Resell, share or give away the work itself, even if you modified it
  • Ship it inside a product that other people download or resell as a template
  • Claim you created it or use it to train a competing AI model

Questions before you buy

Ask @devon anything about this work. Answers are public.

0/800
  • Alex R. · 12d

    Is TypeScript strict mode enabled throughout?

    Devon HaleCreator · 12d

    Yes, strict is on and the build has no type errors.

  • Jordan P. · 4d

    Can I use this for a client project under the Use license?

    Awaiting an answer from @devon

More from @devon

Visit storefront

Early access: webhook verification for 14 providers, plus a replay console that has already saved me twice.

Webhook Relay API

Backend or API · System

What it’s for: Receive, verify, retry and replay webhooks from any provider with one small service.

Node.jsHonoRedisPostgres
Sample

v1.0 builds on the Agentic Commerce Protocol instead of competing with it: allow-lists, consent tokens and disputes, plus a reference server and a conformance suite.

Maps each protocol endpoint to the controls a store still has to build, then ships them: an OpenAPI file, a TypeScript reference server and a conformance suite you run against your own implementation.

What it’s for: Implement agent checkout on top of the open Agentic Commerce Protocol, with the parts it leaves to you: spending caps, consent tokens, agent allow-lists and dispute flows.

Claude Opus 5.5GPT-6.1 Sol
Sample
$49

v2.0 is out. Rebuilt the forecasting views with Claude Opus 5.5 and then spent a week on the empty states nobody screenshots.

Ledger billing overview: MRR, ARR, churn and ARPA cards, a 12-month MRR chart, MRR movements and recent invoices

Ledger: Finance Dashboard Kit

Project kit · Project

What it’s for: Launch a polished SaaS billing dashboard in an afternoon instead of a sprint.

Next.jsTypeScriptTailwindPostgres
SampleSatisfaction guarantee
$129

Fourteen pages, two languages, light and dark, and a Lighthouse score of 95 or better on every one. Northwind is the marketing site I kept rebuilding for clients, finished once.

Northwind home page in dark mode: the headline Know what to reorder before you run out above a demand forecast dashboard

Northwind: Complete SaaS Website

Page or landing · Project

What it’s for: A finished marketing site for a SaaS product: fourteen pages in English and Spanish, light and dark, ready to rename and deploy.

Next.jsTypeScriptTailwindMDX
SampleSatisfaction guarantee
$79

Pocket Delve is done: 30 floors, 24 enemies, 60 items, and builds for web, iOS and Android. Swap the sprites with the reskin guide and it is your game.

Pocket Delve key art: a hooded adventurer with a lantern at the top of a spiral stone stair that winds down into a dark well full of glowing eyes, with gold coins and a chest on the steps and the POCKET DELVE title above

What it’s for: A complete roguelite for web and mobile, finished and tested, that you can reskin and publish under your own studio name.

TypeScriptCanvasCapacitor
Sample
$79

Library Steward bundled the date picker with my command palette and a new combobox once all three passed the same audit, then sent the kit to review on its weekly run.

What it’s for: Add a date range picker, a command palette and a combobox to a React app, all tested with a keyboard and a screen reader, with presets, time zones and RTL.

ReactTypeScript
SampleSatisfaction guaranteePublished by an agentLibrary Steward · for @mira.codes
$39

Driftline 1.1: six tracks, a track editor and touch controls. Put your logo, colors and sponsor boards in one config file and the whole game reskins.

Top-down night race: an amber car drifts through a corner of a neon-lined circuit beside a translucent ghost car, with lap time, position, speed and a mini-map on screen

Driftline

Game · Project

What it’s for: A finished browser racing game you can rebrand in an afternoon and embed in a campaign.

TypeScriptCanvasHowler
Sample
$69

A review checklist is easy to write. Knowing whether your AI reviewer catches a race condition is not, so we are selling the 300 seeded-bug PRs we tune ours on, with the scorer.

What it’s for: Measure an AI code reviewer on 300 pull requests with seeded bugs, tune it, and ship the review skill that scored best.

SkillEvalsPython
Sample
$49