etsy-finance-tracker/server
dlawler489 a789f01bb4 Fix duplicate ledger fees: explicit idempotency + auto-dedupe
The unique expense index can silently fail to build over pre-existing
duplicate data, so re-syncs were re-adding ledger fees every run.

- syncLedgerEntries now explicitly checks existing references (and
  de-dupes within the batch) instead of trusting the unique index
- dedupeLedgerExpenses keeps one row per etsy-ledger-<entry_id> and
  deletes the rest; runs automatically at the start of each sync so
  existing duplicates self-heal. Distinct entries sharing a date/amount
  are untouched (each has its own reference).
- Sync response/toast report deduped and already-imported counts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 17:23:01 +10:00
..
src Fix duplicate ledger fees: explicit idempotency + auto-dedupe 2026-06-13 17:23:01 +10:00
.env.example Add Etsy shared secret for API calls 2026-06-13 11:12:50 +10:00
.env.production Add Nginx reverse proxy for production deployment 2026-04-21 06:30:44 +10:00
package-lock.json Initial commit: Complete Etsy Business Tracker with Profit Analysis Dashboard 2026-04-20 09:44:54 +10:00
package.json Initial commit: Complete Etsy Business Tracker with Profit Analysis Dashboard 2026-04-20 09:44:54 +10:00
tsconfig.json Initial commit: Complete Etsy Business Tracker with Profit Analysis Dashboard 2026-04-20 09:44:54 +10:00