Paywell

Open code

Take it. It’s yours too.

Every line of Paywell is public and free to copy, change and use, for any reason, with no permission needed. The code, the database, the designs, the logo and the full pay model are all here. We give it away on purpose: fair pay should be easy for every company to start.

A laptop on a workbench showing code beside a notebook with a hand-drawn diagram of the bonus formula

What’s open

FileWhat it doesGet it
paywell-app.jsTeam app server: passkey sign-up and sign-in (WebAuthn checked on our server), teams, setup links, daily check-ins, scores, daily bonus math, chat, rating links, and the test-network Bitcoin proxy.Read it here · Source
paywell-api.jsCustomer rating links (signed, one use, 14 days) and the wallet vault that stores a passkey-locked backup we cannot open.Read it here · Source
schema.sqlThe whole database: teams, people, passkeys, sessions, check-ins, ratings, chat, vault.Read it here · Source
app.jsThe team app in the browser: screens, passkeys, wallet lock (PRF + HKDF + AES-GCM), check-ins, payments, chat.Read it here · Source
wallet-src.jsThe wallet: BIP39 words, BIP84 addresses, building and signing payments, QR codes. Built with audited open libraries (@scure).Read it here · Source
rate.jsThe customer rating page.Read it here · Source
bonus_diagram.htmlThe daily bonus diagram used on this site and on every brand’s fair pay page.Read it here · Source
logo.svgOur logo: a gold coin with a rating star, over a smile.Read it here · Source
build.pyBuilds every page of this website.Read it here · Source

Everything is dedicated to the public domain (CC0 for words and pictures, the Unlicense for code). You don’t need to credit us.

How it fits together

  1. A website, nothing to installThe site, the team app and the rating pages are plain web pages served from the edge. They work on any phone or computer, and you can add the app to your home screen.
  2. Passkeys onlySign-in uses WebAuthn passkeys: your face, fingerprint or screen lock. There are no passwords to steal. Our server checks every passkey signature itself.
  3. A small databaseOne SQLite database (Cloudflare D1) holds teams, people, check-ins, ratings and chat. Sessions are stored only as a fingerprint (hash) of the token.
  4. A wallet we can’t openThe wallet is made in your browser. Its backup words are locked with a key that only your passkey can produce (the WebAuthn PRF extension), then stored with us as a sealed box.
  5. Signed rating linksEach visit gets a link signed by the server (HMAC-SHA256). It works once, for 14 days, and can’t be faked or reused.
  6. The math is publicScore = customer reviews 60% + peer check-ins 40%, from 0 to 100. Daily bonus = score × tier shares × the value of one share. Tiers: Explorer 1, Builder 1½, Guide 2.

Run your own copy

  1. Copy the domain-sites folder and the tools/paywell-gen folder from the repository.
  2. Create a D1 database and load schema.sql into it.
  3. Deploy to Cloudflare Pages with that database bound as PAYWELL_DB.
  4. Change the domain name in paywell-app.js (it’s the passkey website ID), and you have your own Paywell.
Before real money moves. Test mode uses Bitcoin’s test network. Paying real wages needs a licensed payroll provider, normal tax withholding and reporting, and the money transmitter rules in each state. Our research page lists the sources.