Voice-first AI agent for retail returns. Real OAuth. Real email search. Real returns.
# Clone
git clone https://github.com/KelleyHuntPLLC/returnclaw.git
cd returnclaw-app
# Install
npm install
# Configure (requires Google OAuth credentials)
cp .env.example .env
# Edit .env with your Google Cloud OAuth credentials
# Run
npm start
# Open http://localhost:3000- Go to https://console.cloud.google.com/apis/credentials
- Create a project or select existing
- Create OAuth 2.0 Client ID (Web application)
- Add authorized redirect URI:
http://localhost:3000/auth/google/callback - Copy Client ID and Client Secret to .env
The app also works as a static site (e.g., GitHub Pages) with simulated data. Just open public/index.html β no server needed for the demo experience.
returnclaw-app/
βββ server.js # Express backend (OAuth, email search, API)
βββ public/
β βββ index.html # Landing page + full agent interface
β βββ style.css # All styles
β βββ app.js # Frontend agent engine (dual-mode)
βββ package.json
βββ .env.example
βββ README.md
The frontend automatically detects whether it's running with the backend:
- Live Mode (with
node server.js): Real Google OAuth, real Gmail search, real policy API - Demo Mode (static HTML): Simulated email connection, mock order data
Detection happens via a health check to /api/health on page load.
| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET | Health check & mode detection |
/auth/google |
GET | Generate Gmail OAuth URL |
/auth/google/callback |
GET | OAuth callback handler |
/auth/status/:sessionId |
GET | Check connection status |
/api/email/search |
POST | Search Gmail for order emails |
/api/policy/:retailer |
GET | Get return policy for retailer |
/api/return/link |
POST | Generate return deep link |
Copyright (c) 2026 Kelley Hunt, PLLC. All rights reserved.