This guide will walk you through setting up and testing the complete RIDE application.
- Docker and Docker Compose installed
- Claude API key from Anthropic
- At least 4GB of available RAM
Navigate to the backend directory and create your .env file:
cd backend
cp .env.example .envEdit the .env file and configure:
# Application
APP_NAME="Receipt Extractor"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost:8000
# Database (SQLite)
DB_CONNECTION=sqlite
DB_DATABASE=/app/database/database.sqlite
# CORS
CORS_ALLOWED_ORIGINS=http://localhost:3000
# Claude API
CLAUDE_API_KEY=your_actual_api_key_here
CLAUDE_API_URL=https://api.anthropic.com/v1/messages
# Queue
QUEUE_CONNECTION=database
# File Upload
UPLOAD_MAX_SIZE=10Important: Replace your_actual_api_key_here with your actual Claude API key from Anthropic.
Navigate to the frontend directory and create your .env file:
cd ../frontend
cp .env.example .envThe default configuration should work:
VITE_API_URL=http://localhost:8000From the project root directory:
# Build all containers
docker-compose build
# Start all services
docker-compose up -dThis will start three services:
- backend: Laravel API (port 8000)
- queue-worker: Laravel queue processor for async receipt processing
- frontend: React app (port 3000)
Run these commands to set up the Laravel backend:
# Enter the backend container
docker-compose exec backend sh
# Generate application key
php artisan key:generate
# Create database file
touch database/database.sqlite
# Run migrations
php artisan migrate
# Exit container
exitCheck that all services are running:
docker-compose psYou should see:
ride-backend-1- running on port 8000ride-queue-worker-1- runningride-frontend-1- running on port 3000
-
Open the application: Navigate to
http://localhost:3000 -
Register a new account:
- Click "Create account" or navigate to
/register - Fill in:
- Full name
- Email address
- Password (minimum 8 characters)
- Confirm password
- Click "Create account"
- You should be automatically logged in and redirected to the Dashboard
- Click "Create account" or navigate to
-
Test logout:
- Click the "Logout" button in the top right
- Verify you're redirected to the login page
-
Test login:
- Enter your email and password
- Click "Sign in"
- Verify you're redirected to the Dashboard
-
Upload a receipt:
- From the Dashboard, locate the "Upload Receipt" section
- Either drag and drop a receipt image (JPG/PNG/PDF) or click to browse
- Maximum file size: 10MB
- Watch the upload progress bar
- You should see:
- "Uploaded successfully - Processing..." message
- The receipt appears in "Recent Receipts" with status "pending" or "processing"
-
Monitor processing:
- The queue worker will process the receipt in the background
- Check the backend logs:
docker-compose logs -f queue-worker - Processing typically takes 5-15 seconds depending on image complexity
- Refresh the Dashboard to see status updates
-
Verify extraction results:
- Once status changes to "completed", click on the receipt
- Verify extracted data:
- Vendor name
- Transaction date
- Total amount
- Tax amount
- Line items (if applicable)
-
View all receipts:
- Click "All Receipts" in the navigation
- Verify the receipts list displays correctly
- Test pagination if you have more than 10 receipts
-
Search functionality:
- Enter a vendor name in the search box
- Verify results update after typing (500ms debounce)
- Clear the search and verify all receipts return
-
Filter by status:
- Select different status options from the dropdown
- Verify only matching receipts are shown
- Select "All Status" to clear filter
-
Sorting:
- Test sorting options:
- Date (Newest/Oldest)
- Vendor (A-Z/Z-A)
- Amount (High-Low/Low-High)
- Click table headers to sort on desktop view
- Verify sort order updates correctly
- Test sorting options:
-
View receipt details:
- Click on any receipt
- Verify:
- All receipt information displays correctly
- Line items table shows (if available)
- Original receipt image displays
- Download original button works
-
Edit a receipt:
- From receipt detail page, click "Edit"
- Verify all fields are pre-populated
- Make changes:
- Update vendor name
- Change date
- Modify amounts
- Add/remove line items
- Change status
- Click "Save Changes"
- Verify you're redirected back to detail view with updated data
-
Test line items management:
- Click "Edit" on a receipt
- Click "Add Item" to add a new line item
- Fill in:
- Description
- Quantity
- Unit Price
- Verify total price calculates automatically
- Remove an item using the trash icon
- Click "Recalculate Total from Line Items"
- Verify receipt total updates based on line items + tax
-
Test validation:
- Try to save with empty vendor - should show error
- Try to save with empty date - should show error
- Verify all required fields are validated
-
Navigate to Export page:
- Click "Export" in the navigation
-
Test CSV export:
- Select "CSV" format
- Click "All Time" preset
- Select "Completed Only" status
- Click "Export to CSV"
- Verify file downloads with correct filename
- Open CSV file and verify data format
-
Test Excel export:
- Select "Excel" format
- Test date range presets:
- Today
- This Week
- This Month
- Last Month
- This Year
- Click "Export to Excel"
- Open Excel file and verify:
- Two sheets: "Summary" and "Line Items"
- Summary sheet has receipt headers
- Line Items sheet has detailed breakdown
- Proper formatting and totals
-
Test custom date range:
- Select custom "From" and "To" dates
- Verify validation (From must be before To)
- Export and verify only receipts in range are included
- Delete a receipt:
- Navigate to receipt detail page
- Click "Delete" button
- Verify confirmation modal appears
- Click "Cancel" - modal should close
- Click "Delete" again, then confirm
- Verify:
- Redirected to receipts list
- Receipt no longer appears
- File is removed from storage
Symptoms: Receipts stay in "pending" status
Solution:
# Check queue worker logs
docker-compose logs queue-worker
# Restart queue worker
docker-compose restart queue-worker
# Process queue manually
docker-compose exec backend php artisan queue:work --onceSymptoms: Receipts marked as "failed"
Solution:
- Verify Claude API key is correct in
.env - Check you have available credits in your Anthropic account
- Review extraction logs in the database or backend logs
- Try re-processing by editing the receipt and changing status to "pending"
Symptoms: Upload progress stops or shows error
Solution:
- Check file size (must be under 10MB)
- Verify file format (JPG, PNG, or PDF only)
- Check backend storage permissions:
docker-compose exec backend sh chmod -R 775 storage bootstrap/cache chown -R www-data:www-data storage bootstrap/cache
Symptoms: 500 errors, migration failures
Solution:
# Reset database
docker-compose exec backend sh
rm database/database.sqlite
touch database/database.sqlite
php artisan migrate:fresh
exitSymptoms: Network requests blocked by CORS policy
Solution:
- Verify
CORS_ALLOWED_ORIGINSin backend.envincludeshttp://localhost:3000 - Restart backend:
docker-compose restart backend
Symptoms: API errors, authentication fails
Solution:
- Verify backend is running:
docker-compose ps - Check
VITE_API_URLin frontend.envishttp://localhost:8000 - Restart frontend:
docker-compose restart frontend
-
Upload multiple receipts simultaneously:
- Upload 5-10 receipts at once
- Verify queue worker processes them sequentially
- Monitor system resources:
docker stats
-
Large file handling:
- Upload files close to 10MB limit
- Verify upload progress tracking works
- Confirm processing completes successfully
-
Export large datasets:
- Create 50+ receipts (can use test data)
- Export all receipts to Excel
- Verify export completes and file opens correctly
Register:
curl -X POST http://localhost:8000/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"name": "Test User",
"email": "test@example.com",
"password": "password123",
"password_confirmation": "password123"
}'Login:
curl -X POST http://localhost:8000/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "password123"
}'Save the returned token for subsequent requests.
List receipts:
curl -X GET "http://localhost:8000/api/v1/receipts?per_page=10" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"Upload receipt:
curl -X POST http://localhost:8000/api/v1/receipts/upload \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-F "file=@/path/to/receipt.jpg"Get receipt details:
curl -X GET http://localhost:8000/api/v1/receipts/1 \
-H "Authorization: Bearer YOUR_TOKEN_HERE"Update receipt:
curl -X PUT http://localhost:8000/api/v1/receipts/1 \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"vendor": "Updated Vendor",
"date": "2024-01-15",
"total": 99.99,
"tax": 9.99,
"status": "completed"
}'Delete receipt:
curl -X DELETE http://localhost:8000/api/v1/receipts/1 \
-H "Authorization: Bearer YOUR_TOKEN_HERE"Export receipts:
curl -X GET "http://localhost:8000/api/v1/receipts/export?format=csv" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
--output receipts.csv# Enter backend container
docker-compose exec backend sh
# Run migrations
php artisan migrate
# Create a new migration
php artisan make:migration create_something_table
# Clear cache
php artisan cache:clear
php artisan config:clear
php artisan route:clear
# View routes
php artisan route:list
# Run tinker (REPL)
php artisan tinker
# Process queue manually
php artisan queue:work
# View logs
tail -f storage/logs/laravel.log# Enter frontend container
docker-compose exec frontend sh
# Install new dependency
npm install package-name
# View build output
npm run build# Access SQLite database
docker-compose exec backend sh
sqlite3 database/database.sqlite
# Common SQLite commands
.tables # List tables
.schema receipts # Show table schema
SELECT * FROM receipts LIMIT 10; # Query data
.exit # Exit SQLiteComplete application testing should verify:
- User can register and login successfully
- User can upload receipt images (JPG, PNG, PDF)
- Queue worker processes receipts and extracts data using Claude API
- Extracted data displays correctly (vendor, date, total, tax, line items)
- User can view list of all receipts with pagination
- Search by vendor name works correctly
- Filter by status works correctly
- Sorting by date, vendor, and amount works correctly
- Receipt detail page shows all information and original image
- User can edit receipt data and line items
- Line item totals calculate correctly
- User can delete receipts
- Export to CSV works with filters
- Export to Excel creates multi-sheet workbook
- Date range filtering works in export
- Navigation between all pages works correctly
- Logout works and redirects to login
- Protected routes redirect unauthenticated users
- File size and type validation works
- Error messages display appropriately
- Loading states show during async operations
docker-compose logs -fdocker-compose logs -f backend
docker-compose logs -f queue-worker
docker-compose logs -f frontenddocker-compose exec backend tail -f storage/logs/laravel.log# Stop all services
docker-compose down
# Stop and remove volumes (warning: deletes all data)
docker-compose down -vAfter successful testing, consider:
- Production deployment: Update environment variables for production
- Backup strategy: Implement database backup routine
- Monitoring: Add application monitoring (e.g., Sentry, New Relic)
- Performance optimization: Enable caching, optimize images
- Security hardening: Enable rate limiting, add CSP headers
- User documentation: Create end-user guide
- Additional features: Batch upload, receipt categories, reporting dashboard