DropIt uses advanced AI to automatically handle customer service calls, negotiate refunds, and resolve issues on your behalf.
- Automated Calls: AI agent makes calls and negotiates with customer service
- Multiple Request Types: Handles refunds, returns, subscription cancellations, appointments
- Smart Order Validation: Requires order number OR screenshot before starting
- Real-time Status Tracking: Live updates on negotiation progress with phase-by-phase visualization
- Secure Login/Signup: JWT-based authentication system
- User Session Management: Persistent login with automatic token verification
- Dynamic UI: Shows user email when logged in, "Sign In" when not authenticated
- Real-time Call Progress: Live duration timer and phase tracking
- Vapi Integration: Direct integration with Vapi API for real call data
- Smart Confirmation Code Extraction: Automatically extracts real confirmation codes from call transcripts
- Fallback System: Uses real codes when available, fallback codes when not found
- Debug Information: Shows raw call data and extraction results
- Phase Tracking: Initializing β Dialing β Connected β Negotiating β Completing
- Live Updates: Real-time status messages and progress indicators
- Duration Timer: Accurate call duration tracking from start to finish
- Visual Progress Bar: Interactive progress visualization with completion indicators
- Node.js (v18 or higher)
- npm or yarn
-
Clone the repository:
git clone <your-repo-url> cd dropit
-
Install dependencies:
cd my-app npm install --legacy-peer-deps -
Start both servers (recommended):
npm run dev:full
This starts both backend (port 3001) and frontend (port 3000) simultaneously.
OR start individually:
# Terminal 1 - Backend npm run server # Terminal 2 - Frontend npm run dev
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
Create a .env file in the root directory:
VAPI_API_KEY=
VAPI_PHONE_NUMBER=
PORT=- User Authentication β Sign up/Login with email and password
- Service Selection β Choose from Return Order, Cancel Subscription, or Book/Cancel Appointment
- Request Details β Provide:
- Text prompt (e.g., "Get me a refund for my Chipotle order")
- Order number OR screenshot upload (for returns)
- Contact information (phone number required)
- Real-time Call Progress β Watch live updates:
- Phase tracking (Initializing β Dialing β Connected β Negotiating β Completing)
- Live duration timer
- Real-time status messages
- AI Negotiation β Vapi agent:
- Makes call to customer service
- Negotiates persistently but politely
- Requests confirmation codes
- Extracts real confirmation codes from transcript
- Results Display β Shows:
- Real confirmation codes (green) or fallback codes (yellow)
- Refund amounts when mentioned
- Call duration and summary
- Debug information for verification
POST /signup- User registrationPOST /login- User authenticationGET /verify-token- Token verificationPOST /logout- User logout
POST /start- Start negotiation with user prompt + order detailsGET /status/:id- Get current negotiation status with real-time updatesPOST /log- Webhook for Vapi to post resultsGET /test-phone- Test Vapi phone number configuration
The system uses Vapi's voice AI with advanced features:
- Real-time Call Status: Polls Vapi API every 2 seconds for live updates
- Smart Prompt Selection: Dynamic prompts based on request type (return, cancellation, appointment)
- Confirmation Code Extraction: Automatically extracts real codes from call transcripts
- Refund Amount Detection: Identifies and extracts refund amounts from conversations
- Fallback System: Graceful handling when real data isn't available
- Error Handling: Comprehensive error management and user feedback
- Open http://localhost:3000
- Sign Up/Login with your email and password
- Select Service (Return Order, Cancel Subscription, or Appointment)
- Fill Form with your request details
- Start AI Call and watch real-time progress
- View Results with real confirmation codes and debug info
- Real Confirmation Codes: Look for green "β Real confirmation code from call"
- Fallback Codes: Look for yellow "
β οΈ Fallback code (no code found in transcript)" - Debug Information: Click "π Debug: Raw Call Data" to see extraction details
- Call Progress: Watch phase transitions and live duration timer
- Return Order: Upload screenshot or provide order number
- Subscription Cancellation: Provide email and phone number
- Appointment Management: Book or cancel appointments
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Vapi API β β Customer Serviceβ
β (Next.js) βββββΊβ (Express) βββββΊβ (Voice AI) βββββΊβ (Real Calls) β
β β β β β β β β
β β’ Authenticationβ β β’ JWT Auth β β β’ Call Status β β β’ CSR Agents β
β β’ Real-time UI β β β’ Real-time β β β’ Transcripts β β β’ Confirmation β
β β’ Progress β β Polling β β β’ Confirmation β β Codes β
β Tracking β β β’ Code β β Codes β β β’ Refund β
β β’ User Session β β Extraction β β β’ Refund β β Processing β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Frontend: React/Next.js with real-time status updates and user authentication
- Backend: Express.js with JWT authentication and real-time Vapi API polling
- Vapi Integration: Voice AI for making calls and extracting confirmation codes
- Real-time Updates: 2-second polling for live call status and progress tracking
- β Authentication: JWT-based user authentication system
- β Error Handling: Comprehensive error management and user feedback
- β Real-time Updates: Live call status and progress tracking
- β Confirmation Code Extraction: Smart extraction from real call transcripts
- β Fallback Systems: Graceful handling when real data isn't available
- Replace mock CSR with real customer service APIs
- Add proper database storage (PostgreSQL/MongoDB)
- Configure production Vapi webhook URLs
- Add rate limiting and security middleware
- Set up monitoring and logging (Winston/Morgan)
- Configure environment variables for production
- Set up SSL certificates and HTTPS
- Add input validation and sanitization
- Implement proper error logging and monitoring
- β Added user authentication system with JWT tokens
- β Implemented real-time call progress tracking with phase visualization
- β Added smart confirmation code extraction from Vapi transcripts
- β Enhanced UI with user email display and logout functionality
- β Added debug information for call data verification
- β Improved error handling and fallback systems
- β Added refund amount extraction from call transcripts
- β Basic AI negotiation system
- β Vapi integration for voice calls
- β Multiple request types (returns, cancellations, appointments)
- β Mock confirmation code system