What it does
Returns Automation is a Shopify app with a public customer-facing return portal and a full admin dashboard for processing returns. Customers look up their order by number + email, select items to return, choose a resolution (Refund/Exchange/Store Credit), and submit — all without contacting support.
Features a security-conscious portal design with rate limiting (in-memory token bucket), strict input validation to prevent GraphQL injection, an inventory ledger system that prevents double-claiming, and a return state machine with automatic timestamp tracking per milestone. RMA number generation uses a clean alphabet (no I/O/0/1).
Features
- 01 Customer Return Portal Shareable, unauthenticated portal with branded UI. Customers enter order number + email to look up their order, select items to return with quantity, choose resolution, and submit.
- 02 Security-First Design In-memory token bucket rate limiting (10 lookups/5min per IP+slug). Strict input validation with regexes before GraphQL queries. Generic error messages to prevent order enumeration.
- 03 Inventory Ledger System Before accepting a return, builds a per-line-item ledger: total ordered - already fulfilled - already refunded - previously claimed. Prevents double-claiming of return quantities.
- 04 Admin Returns Dashboard Full list/filter/search of return requests with status badges, detail view, and status transition controls (Approve, Reject, Mark Received, Mark Refunded/Exchanged).
- 05 RMA Number Generation Short, human-friendly RMA numbers (e.g., RMA-A3B9K7X2) using a clean alphabet. Auto-tags Shopify orders with return-requested for easy identification.
- 06 Email Notifications Sends status-update emails to customers and new-return notifications to merchants via Resend. Branded HTML templates with status-specific colors.
Built with
- Remix
- TypeScript
- React
- Polaris
- Prisma
- PostgreSQL
- Resend API
- Shopify GraphQL API
- Sentry