Add a flips ledger with fee presets, sales record and limit tracking #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/flip-ledger"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on #20 (migration numbering and shared files). Merge #20 first, then switch this PR's base to
main.Step 3 of the reseller roadmap: a private Flips page for what you buy and resell.
What's in it
Ledger: each flip records the buy (date, platform, price, extra costs such as shipping in, buyer fees or repairs), where it's listed, and the sale (date, platform, price, fee, your selling costs). Net profit is computed per flip.
Seller fee presets, editable. Defaults are private-seller rates as of 2026-09:
The fee is stored with each sale, so editing a preset never rewrites past sales, and an entered fee always wins.
Delist checklist: Mark sold lists the other platforms the item is still up on. The page warns about sold items that are still listed somewhere.
Działalność nierejestrowana:
Listing drawer: a Sell on select, so the expected profit subtracts that platform's fee, and an I bought this button that adds a prefilled flip.
Boundaries
server/flips.ts,src/profit.ts)./api/exportand backups.DENY), and emptied in debug snapshots.Verification
npm run typecheck,npm test(258/258, with newtests/flips.test.tsand a debug-exclusion test),npm run build, andnpm audit --omit=dev(0 vulnerabilities) all pass.flipsreturned 403, and the table isn't in the debug schema./flipsserves the app.🤖 Generated with Claude Code