✅ Frontend running: http://localhost:8080/
✅ Environment configured: Using production API at https://vibesync-umber.vercel.app/api
Open browser console (F12) and check:
// In console, check which backend URL is being used
console.log('Backend URL:', import.meta.env.VITE_METADATA_API || 'auto-detect');Expected: Should show https://vibesync-umber.vercel.app/api
Option A: Browser Console
fetch('https://vibesync-umber.vercel.app/api/health')
.then(r => r.json())
.then(d => console.log('Health check:', d))
.catch(e => console.error('Health check failed:', e));Option B: Command Line
curl https://vibesync-umber.vercel.app/api/healthExpected Response:
{
"ok": true
}Actual Status:
- Open http://localhost:8080/
- Go to Library tab
- Click Upload files button
- Select an audio file (MP3, M4A, etc.)
- Watch the console for logs:
[Library] File input changed[ImportWithProgress] Starting import[ImportWithProgress] Checking backend health...- Backend check result
- Processing logs
Expected Flow:
Scenario A: Backend Available (After Deployment)
✅ Backend health check: true
✅ Using backend route
✅ Processing file X / Y
✅ Metadata extracted with cover art
✅ File added to library
Scenario B: Backend Unavailable (Current State)
⚠️ Backend health check: false
⚠️ Using worker fallback
✅ Processing file X / Y
✅ Basic metadata extracted
✅ File added to library
After uploading a file, check:
- Track appears in library ✅
- Title extracted ✅
- Artist extracted ✅
- Album info (if available)
- Cover art displayed (backend only)
- Duration shown ✅
- Upload the same file twice
- Expected behavior:
- First upload: Success
- Second upload: Warning toast "Skipped duplicate (same name & size)"
- File NOT added to library again
- Frontend dev server running
- Environment configured for production API
- Console logging enabled for debugging
- Worker fallback functional
- Duplicate detection implemented
- Vercel serverless functions not yet deployed
- API endpoints returning 404
- Need to push code and deploy to Vercel
Since backend isn't deployed yet, test the worker fallback:
- Upload audio files at http://localhost:8080/
- Worker will extract basic metadata
- Verify tracks are added to library
-
Commit changes:
git add . git commit -m "Add Vercel serverless functions for metadata extraction" git push
-
Deploy to Vercel:
- Auto-deploys from GitHub
- Or use:
npx vercel --prod
-
Test API:
curl https://vibesync-umber.vercel.app/api/health
-
Test upload:
- Go to your deployed app
- Upload audio files
- Backend extracts rich metadata with FFmpeg
Cause: API functions not deployed yet Solution: Deploy to Vercel first
Check:
- Console for errors
music-metadata-browserinstalled- Worker file compiles without type errors
Cause: Worker fallback doesn't extract cover art (only backend does) Solution: Deploy backend or run local Express server
If you want to test backend locally without Vercel:
Terminal 1:
cd backend
node server.jsTerminal 2:
npm run devUpdate .env:
VITE_METADATA_API=http://localhost:5000Then test upload - should use local backend.
Open browser console on http://localhost:8080/ and run:
// Test 1: Check config
console.log('=== Configuration ===');
console.log('Environment:', import.meta.env.MODE);
console.log('API URL:', import.meta.env.VITE_METADATA_API || 'auto-detect');
// Test 2: Check health
console.log('=== Testing Health Endpoint ===');
const apiUrl = import.meta.env.VITE_METADATA_API || 'https://vibesync-umber.vercel.app/api';
fetch(`${apiUrl}/health`)
.then(r => {
console.log('Status:', r.status, r.statusText);
return r.json();
})
.then(d => console.log('Response:', d))
.catch(e => console.error('Error:', e.message));
// Test 3: Now try uploading a file through the UI
console.log('=== Ready to Test Upload ===');
console.log('1. Go to Library tab');
console.log('2. Click Upload files');
console.log('3. Select an audio file');
console.log('4. Watch console for logs');