The problem
Shops that let regulars pay later keep the running balance in a notebook. Purchi keeps it per customer: every debit and credit, what is due, and a statement or invoice the customer can open from a link.
What I built
- Per-customer ledgers where the balance is always recomputed from the entries, so it heals itself after any edit or restore.
- Invoices and statements, downloadable as PDF and shareable through a private link.
- Clearing a ledger first saves a statement snapshot with a document number and a hash of what was cleared.
- Each shop sees only its own customers; deleted records go to an admin-only trash.
How it works
- Next.js 15 with Payload CMS 3 on MongoDB.
- Payload's native trash for soft deletes; balances exclude trashed entries.
Stack
- Next.jsPurchi uses Next.js
- Payload CMS 3Purchi uses Payload CMS 3
- MongoDBPurchi uses MongoDB
- TypeScriptPurchi uses TypeScript