Retiras lets each person create an account and keep salary settings and cash pickup records in a private account. The server loads and changes records only for the signed-in account.
Requires Node.js 20 or newer. No third-party packages are needed.
npm startOpen http://127.0.0.1:8000. Without database environment variables, account data is stored in data/accounts.json, which is ignored by Git. Sessions use an HTTP-only cookie and expire after seven days or when the server restarts.
The app can run as a free Render web service with account data stored in a free Supabase Postgres project. Both services can pause or sleep when unused, so the first visit after inactivity may take about a minute. Supabase may pause a project after a week with too little database activity. The free plans are intended for hobby projects and do not include backups.
- Create a Supabase project and run the SQL in
supabase-schema.sqlin its SQL Editor. - If you already have local accounts, migrate them once before the public app is opened. On the computer that has
data/accounts.json, setSUPABASE_URLto the project URL andSUPABASE_SERVER_KEYto the project's secret API key (sb_secret_...), then runnode scripts/migrate-to-supabase.mjs. The script refuses to overwrite a cloud database row and leaves the local file intact. - Push this repository to GitHub and create a Render Web Service from its
mainbranch. Set the start command tonpm start. - Add these Render environment variables:
SUPABASE_URL— the Supabase project URL.SUPABASE_SERVER_KEY— the Supabase secret API key (sb_secret_...). A legacyservice_rolekey also works. Keep it private; never put it in browser code or Git.TRUST_PROXY—1, so HTTPS cookies work behind Render's TLS proxy.
- Deploy. Render provides a public
onrender.comURL with HTTPS. Share that URL with users; each person registers their own account.
The Supabase server key is used only by the Node server. The Supabase table has row-level security enabled and grants table access only to that server role. Account data is stored in a private database row and exposed to a browser only through the signed-in user's API session.
Each API request uses the account session on the server. Record IDs supplied by a browser are never used to select another user's account, and record edits and deletes are looked up only within the signed-in account. Passwords are stored as scrypt hashes. The hosted data row contains all account data and credential hashes, so protect the Supabase server key and account with strong passwords.
The hosted storage currently keeps the app's account collection in one private JSON database row. This suits a small hobby app on one web-service instance; it is not designed for multiple app instances or high-volume concurrent use. The free database has no automatic backups, so periodically export important ledger records from the app.
Choose Import CSV in the records panel. The CSV must have a header row with date, amount, and payer columns. time, receiver, and note are optional. Dates may use YYYY-MM-DD or MM/DD/YYYY; missing times default to 00:00, and missing receivers default to the account name. Quoted fields and commas inside quoted fields are supported. Imports are limited to 1,000 records at a time.
index.html— account forms and ledger interfacestyles.css— responsive phone-first layout and sticky salary summaryapp.js— browser behavior, CSV parsing, and account API requestsserver.js— account authentication, private data API, and static file serversupabase-schema.sql— private hosted storage tablescripts/migrate-to-supabase.mjs— one-time copy of existing local accounts to SupabaseBGP.jpeg— site background image served from the public site root