Keyward
Self-hosted licensing for my own apps, verified offline with Ed25519
SnapPrompt
- People
- Licenses
SNAP-7KQ2M-WD4XH-9TPQC-R3VNE-6YB8J
Active Pro · 3 computers Paid order
ELErik Lindqvisterik@example.se · issued Nov 18, 2026
Seats3 of 3
Perpetual license
Activations3 active, 1 released
Audit logthis license
14:02:31 machine.activated ubuntu-ws-erik · 3be19d07…
Nov 30 machine.deactivated DESKTOP-OLD9K2 · from the app
Nov 21 machine.authorize_offline Eriks-MacBook-Pro · 51ad0e93…
Nov 19 machine.activated DESKTOP-OLD9K2 · e71c40aa…
Nov 18 order.fulfilled license issued · SNAP-7KQ2M-…
Nov 18 order.paid Paddle · plan pro
Activation token Signed
- alg
- EdDSA · typ KWLT
- kid
- snapprompt-2026-11-c4f8h2kx
- lic
- b81d03f6… · prod snapprompt
- mid
- 3be19d07…
- ent
- pro · typ paid · src online
- iat
- 1796194951 · Dec 2, 2026
- rfr
- 1797404551 · Dec 16, 2026
- exp_lic
- null (perpetual)
eyJhbGciOiJFZERTQSIsInR5cCI6IktXTFQiLCJraWQiOiJzbmFwcHJvbXB0LTIwMjYtMTEtYzRmOGgya3gifQ.eyJpc3MiOiJrZXl3YXJkIiwicHJvZCI6InNuYXBwcm9tcHQiLCJsaWMiOiJiODFkMDNmNg.q8Zk2wV0rTnX4yPf7LcA1sBd9GmEhJu3…
Private key stays on the server. The app ships the public keys.
Rust SDK · verifyoffline
- public keysproduct keys shipped in the app
- headerEdDSA, kid snapprompt-2026-11-c4f8h2kx
- signaturevalid
- fingerprint3be19d07… = this machine
- expiryexp_lic null · rfr not reached
- entitledpro
Comp licenseNo payment
SNAP-Q8R2T-HV6MW-3KDPA-7CNXE-VF4RB
1 computer · "Beta tester, macOS" · issued by thuan via CLI
The problem
Selling a desktop app means issuing keys, limiting seats and checking entitlement on machines that are sometimes offline. SnapPrompt first checked licenses live against a third-party store: a network call for each check, and an offline grace period that could be forged. I wanted signed tokens the app verifies on its own.
What I built
Keyward is a modular monolith with hexagonal boundaries. The same HTTP API and core run on a Cloudflare Worker with D1, or on Node with Postgres in Docker.
Keys are typo-checked, activations are bound to a machine fingerprint with a seat limit, and the server signs an Ed25519 token that the app verifies with the product's public keys. The private keys never leave the server.
Payments sit behind one PaymentProvider interface, with Paddle in production and a mock for development. An admin API, a CLI, an audit log, rate limits and an outbox cover operations.
How it runs
From purchase to an offline check
- Checkout Paddle, behind PaymentProvider
- Issue key Base32 groups, check symbol
- Activate Machine fingerprint, seat limit
- Sign token Ed25519, private key stays put
- Verify offline Rust SDK inside the app
Details worth a look
-
Offline authorization
A machine code can be turned into a machine-bound token for a computer that never goes online.
-
Comp licenses
Give a license away without a payment, with its own note and machine limit.
-
Two SDKs, one contract
A TypeScript client for browsers, Workers and Node, and a Rust crate that SnapPrompt uses inside its Tauri app.
-
Boring operations
Audit log, rate limits per IP and per key, and each payment event stored once, so a retried webhook cannot issue a second key.