Skip to content

ZhenyuanPAN822/return-window-desk

Repository files navigation

Return Window Desk

English | 中文

Hero Section

Return Window Desk is a local-first deadline desk for purchases that may need returns, refunds, or warranty claims.

  • Import order CSV exports, pasted receipt text, or manual purchases.
  • Calculate return and warranty deadlines from editable merchant policy rules.
  • Get a priority queue with evidence checklists before the return window closes.

Screenshot/GIF to be added before launch.

Quick demo:

python server.py

Open http://127.0.0.1:8788, click Load sample, then Run analysis.

Problem

People often know an item might need to be returned, but the practical work is scattered: find the order confirmation, check the store policy, calculate the last return day, locate the receipt, take photos, and decide which item needs action first. By the time the user gets around to it, the return window may have closed.

Why Existing Approaches Are Not Enough

Email search finds receipts but does not calculate deadlines. Spreadsheets work only if the user manually enters each purchase and policy. Store accounts show their own orders but do not give a cross-merchant queue. Calendar reminders help only after the user already knows the right date.

Return Window Desk focuses on the missing middle: turn purchase evidence into a deadline and evidence checklist.

What This Project Does

order CSV / pasted receipt text / manual purchase -> normalized purchase review -> return/warranty deadline analysis -> action priority queue -> Markdown/JSON report

Key Features

  • Flexible CSV mapping for order exports with purchase_date, date, merchant, store, item, product, amount, and order_id style fields.
  • Pasted receipt/order text parser for copied email or PDF text.
  • Manual purchase entry for quick one-off items.
  • Editable merchant policy JSON for return and warranty windows.
  • Return deadline, warranty deadline, policy method, review flags, and priority score.
  • Evidence checklist for each action item.
  • Markdown and JSON export.

Why this is useful

This turns scattered purchase records into a return-window action board: which items are still returnable, which warranties are close to expiring, which receipts are missing, and what evidence to gather before contacting the merchant.

Demo / Screenshots

Screenshot/GIF to be added before launch.

The sample includes 20+ purchases across Amazon, Best Buy, Apple, Target, Walmart, Costco, and IKEA with near deadlines, closed windows, missing receipts, defective items, wrong-item cases, opened-item risk, and high-value warranty issues.

Quick Start

cd products/product-021/repo
python server.py

Then open:

http://127.0.0.1:8788

No internet access, account login, API key, or email connection is required.

Example Input / Output

Sample CSV:

purchase_date,merchant,item,order_id,amount,status
2026-04-20,Best Buy,USB-C Monitor,BBY-2201,329.99,return
2026-04-18,Amazon,Running Shoes,AMZ-8821,89.95,wrong_item

Output files:

outputs/return-window-report.md
outputs/return-window-report.json

Example output:

Best Buy - USB-C Monitor: start_return_now
Return deadline: 2026-05-05
Evidence: receipt, item photos, merchant policy, payment proof

Use Cases

  • Review purchases before return windows close.
  • Prepare evidence for defective or wrong-item claims.
  • Track warranty deadlines for expensive electronics or appliances.
  • Audit missing receipts before contacting a merchant.
  • Compare return urgency across multiple stores.

How It Works

The analyzer maps flexible CSV headers into a normalized purchase model, parses pasted receipt text with conservative field extraction, applies merchant policy rules, calculates return and warranty deadlines, scores priority using deadline proximity, item value, missing evidence, and action status, then exports the result as Markdown and JSON.

Project Structure

return_window_desk/analyzer.py  Parser, policy rules, deadline analysis, exports
server.py                       Local HTTP server
web/                            Browser UI
samples/                        Realistic purchase fixture
examples/                       Pasted receipt text example
tests/                          Unit tests
scripts/smoke_test.py           User-perspective smoke test

Roadmap

  • Source-specific presets for Amazon, Shopify, Apple, Best Buy, Target, Walmart, and PayPal exports.
  • PDF/email attachment text extraction helper.
  • User-editable policy table in the UI.
  • Calendar export for return and warranty deadlines.
  • Local encrypted purchase history.

Limitations

Return Window Desk does not connect to email, stores, banks, or shipping systems. It does not submit returns or warranty claims. Merchant policies vary by item, membership, region, seller, and condition, so deadlines are estimates that should be verified before action. PDF/image OCR is not implemented; users can paste extracted receipt text.

License

MIT

Language

中文版本: README.zh-CN.md

Releases

No releases published

Packages

 
 
 

Contributors