The map of Hewn, redrawn from this tree on every push: every file in this repository and in the Leo programs', every rule and threat, every dependency, and how they connect. Open it in 3D · where the data lives · how it's made
Honest books, grounded and true.
Free, open-source bookkeeping and payroll on Aleo. Your books stay encrypted on your own device.
Website · Open the app · Build plan · Progress log · AGPL-3.0
Status: in active development, on Aleo testnet. Don't keep real books in it yet. Nothing here is tax, legal or accounting advice.
Hewn is a small-business bookkeeping and payroll app. It works the way bookkeepers already expect: a chart of accounts, double-entry books, invoices, bills, payroll and reports. The difference is where everything lives:
- Your books never leave your device. They are kept in an encrypted vault in your browser. There is no Hewn server holding your data, no database and no company account to hack.
- Your wallet is your bank feed. Hewn runs on Aleo, and a Shield account is the way in: without one there is nothing to set up. Money moves through that wallet; Hewn reads its history and asks you what each payment was for, instead of having you type transactions in. What happens off chain, at the bank, can be recorded too, as a bonus; the books are the same double-entry books either way.
- Payroll is private by design. Workers are paid in USDCx, a stablecoin, through private Aleo transfers. Wages, withholdings, W-4s and paystubs are private in every case. Only hashes and commitments ever go on chain.
It is free and open source (AGPL-3.0).
Hewn has two sides in one app: a business keeps its books and runs its team, and a worker gets their schedule, clocks hours and keeps their paystubs. A customer has a portal of their own. One Shield account holds one kind of account.
Every business and worker registers a name.hewn, so people find each other by name rather
than by a long wallet address. Anyone can also see the public job board
and the traction map (where people have opened Hewn,
by country, with no account).
Your device Aleo (testnet)
┌──────────────────────────────────────┐ ┌───────────────────────────┐
│ Hewn (web app, runs in the browser) │ │ Leo programs: │
│ │ signed in │ names, agreements, USDCx │
│ Encrypted vault (IndexedDB) │ Shield │ pay, receipts, sealed │
│ books · payroll · hours · paystubs ┼───────────▶│ letters, job board │
│ │ │ │
│ Shield wallet history ──────────────┼◀───────────┤ public state holds only │
│ → "For review" list │ reads │ hashes and commitments │
└──────────────────────────────────────┘ └───────────────────────────┘
- The vault. A random AES-256-GCM key encrypts your books. Your username and passphrase only unlock that key (PBKDF2-SHA256, 600k rounds); they are never sent anywhere. "Stay logged in" keeps an unlocked key on the device for at most 24 hours. A forgotten passphrase can be replaced with a recovery key, if you made one in Settings; otherwise it can't. Keep backups.
- The wallet. Shield is the only wallet. Every on-chain action is signed in Shield, so you always see what you are signing. A Shield account holds one kind of account, a business's or a person's (a person's worker and customer accounts may share one), so business and personal money never share a wallet.
- Payroll. Hewn works out gross pay, withholding and net pay on your device, from the hours on each person's weekly timecard (overtime, callouts and on-call days included, as agreed in their offer). It then pays each worker with a private USDCx transfer from your wallet.
- Letters. Offers, timecards, schedules, paystubs and messages travel between the two parties as sealed letters: private Aleo records, encrypted with a key only the employer and that worker can derive. Team announcements and the team calendar go to a channel whose key only the team holds. Each person on the shared calendar is tagged by a one-way value, never by their key.
- The job board is public on purpose: a posting, its pay range if given, and how to apply. Applications are sealed letters to the business, never on the board.
Hewn has been built on the side, for free, over a few years, alongside a full-time job. In the peak seasons at work, building stopped; when time opened up again, it picked back up where it left off. Joshua Day, who started it, tells it best:
It started as "I want to learn more about blockchain." Then I wanted a say in where this technology goes, instead of leaving it to big businesses to decide for us. Then it became "I wonder if I could build something myself." Slowly, it turned into this.
Learning (late 2023 to 2024). It began around the time Aleo opened up to builders, with months in the developer docs learning how zero-knowledge proofs, Leo and private records actually work: transitions, async finalize code, and how Leo compiles down to Aleo's own instruction language. No course teaches that; the language was only a few years old. AI assistants weren't much help yet either: they had so little to draw on that they kept writing Rust instead of Leo.
Learning by building: Proven National Workers (February 2025). The best way to really learn it was to build something real and figure it out along the way. The first design, PNW, was huge: a union-style network for citizen and immigrant workers, with on-chain payroll, worker-run local DAOs, farm investment co-ops, family trust funds, a farm-to-table marketplace, and bridges to Stellar, Aztec and Ethereum-style chains. Hundreds of commits went into Leo contracts and a whitepaper in its first month.
Narrowing down (2025). Building it taught what mattered. The second version kept two chains: private payroll records on Aleo and USDC payouts on Stellar, with NFT paystubs. More than a thousand commits went in that spring. A sovereign sidechain for governance and a pegged wage token were sketched, then set aside. Every cut made the core clearer: private, honest payroll. Then work's busy season took over: the summer slowed down, and the project rested through the end of the year.
Starting over, on Aleo alone (2026). Back at it in January, with a clean rebuild: Aleo only, paid in USDCx, wages and identities never public, and one adapter as the only path to the chain. A web portal for employers and workers followed in March.
First private payroll on testnet (April 10, 2026), during the Aleo Buildathon. A full run from the portal: check the agreement, pay in USDCx privately, mint paystub receipts for both sides, anchor an audit record, then mint the payroll cycle NFT (transactions below). Shield's in-browser prover handles one program per proof best, so payroll runs as a series of small transactions.
AI tools have come a long way since those first months, and they help a lot now. They don't replace knowing how the system works, though: each step past "vibe coding" came from understanding Aleo well enough to catch what the tools got wrong.
Hewn (October 2026). Payroll alone wasn't enough: small businesses need their books. The portal's libraries were moved into this repository and rebuilt into a full bookkeeping app: wallet-first, kept in an encrypted vault on your device, open source under the AGPL. It keeps PNW's privacy rules, its Leo programs and its tax engine. Within weeks it grew the rest of what a small business runs on: sealed messaging and team announcements, a public job board with applications and resumes, weekly timecards that feed payroll, overtime, on-call pay and callouts, and a shared team calendar. By late October 2026 that came to about 81,000 lines of code (16,000 of them tests) and 9,000 lines of Leo.
Next: mainnet. .hewn names are planned as a top-level domain in the
Aleo Name Service, so they resolve across the Aleo ecosystem. See
docs/MAINNET_NAMES.md.
The first private payroll on testnet (April 10, 2026)
| Step | Program | Transaction |
|:---:|---|
| Verify agreement | employer_agreement_v4 | at1mydsktdsr8pk7d4utzrp6n2rvtgkkpavthukyt4kpdadgyx5lg8sgljea3 |
| Transfer USDCx | test_usdcx_stablecoin | at1yphn8n9zejqnnsktuev7rl9vkv8styq00rjpffa0h7rxnccssyyqdk9ltw |
| Mint receipts | paystub_receipts | at1w86wy80c9sgv0e2ukwlzja4r4km0vkld2tna586t9447q6pjvvrqhuvnw4 |
| Anchor event | payroll_audit_log | at1jp6mertn92hpn79uak8vdy9t4ha2t0f4fwq877uy6rmjl20g0syqdzygp3 |
| Mint cycle NFT | payroll_nfts_v2 | at1d8ht598hqqjgmqfxjwvt0cf47aqafgynzjhazhtreze6j22hzcrq5992r5 |
"PNW" lives on as the company and protocol namespace: the internal packages are named @pnw/*.
| Path | What's there |
|---|---|
apps/business |
The Hewn app (Next.js). Screens in src/app, book logic in src/books, everything that touches Aleo in src/chain |
apps/site |
The marketing site, hewnaccounting.com |
packages/ |
Shared libraries: the ledger, vault, payroll, tax engine, wallet, Aleo adapter and more. Layering map in packages/README.md |
brand/ |
Logo source art and the script that builds the brand assets. The name and colours live in packages/brand |
docs/ |
Design documents with their status: the threat model, letters, the job board, the audit design, and the grant proposal |
memory/ |
What has been decided and what has been learned, one line each, consolidated across the documents (docs/MEMORY.md) |
docs/map/ |
The map of Hewn, drawn in 3D on GitHub Pages: pnwbnw.github.io/hewn. Where the data lives and what crosses between places, each flow with its rule; the whole tree next |
archive/ |
Retired code, kept as it was: the Julia tax engine, the salvage script, four salvaged packages nothing uses |
BUILD_PLAN.md |
The spec: phases, deliverables and exit criteria |
PROGRESS.md, progress/ |
A dated log of every change, with test counts: one file per day, and the index |
CLAUDE.md |
The project's rules: privacy floor, key handling, boundaries |
CONTRIBUTING.md, SECURITY.md |
Running it, the rules in short, forking, and how to report a problem privately |
dev_testing_guide.md |
For developers testing the app by hand: scenarios we're unsure of, with results posted on each area's manual-test issue |
pnw_mvp_v2 (submodule) |
The Leo programs (the on-chain side) and the deployed-program manifest |
pnw_employment_portal_v1 (submodule) |
The original PNW portal, retired on 2026-10-13. Its libraries became packages/; its README points here |
Before you change code, read docs/INVARIANTS.md: every rule that isn't up
for debate, the check that enforces it, and the threats it answers. The two you'll meet first:
chain code stays in apps/business/src/chain (INV-16), and deployed Leo programs are never edited
(INV-20).
You need Node 22 (what CI uses) and pnpm 10.
git clone https://github.com/PNWBNW/hewn.git
cd hewn
pnpm install
pnpm test # the whole test suite (vitest)
pnpm build # strict typecheck of every package, then the app builds
pnpm dev:business # the app on http://localhost:3000
pnpm --filter @pnw/business build:static # the installable app's bundle, in apps/business/outThe app needs no settings to run. The optional ones are the courier's pinning key (see
apps/business/.env.example; copy it to .env.local, which is gitignored) and, on the website,
the Upstash store behind the traction map (KV_REST_API_URL and KV_REST_API_TOKEN, set by
Vercel when the store is connected). Never commit a .env file or any key.
The submodules are fetched over HTTPS and only needed for the chain side:
git submodule update --init pnw_mvp_v2 brings in the Leo programs.
To use the app fully you'll need the Shield wallet on Aleo testnet. Open the app inside Shield's browser on a phone, or with the Shield extension on desktop.
Read docs/THREAT_MODEL.md for what Hewn protects, from whom, and what
it can't. If you find a security problem, please report it privately (the repository's
Security tab, or contact the maintainer) rather than in a public issue.
Copyright (C) 2025-2026 Joshua Daniel Day.
Hewn is free software: you can redistribute it and/or modify it under the terms of the
GNU Affero General Public License, version 3 (AGPL-3.0-only), as published by the Free
Software Foundation. See LICENSE.
In short: anyone may use, study, change and share Hewn. Anyone who runs a changed copy as a website or service for other people must offer those people the source of their copy under the same licence. That is why the app and the site link to the source code.
It is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It is not tax, legal or accounting advice.
The Hewn name and logo are not covered by this licence. A fork should use its own name and art.
