# Quick Testing Guide - Multi-Document Upload ## 🚀 Quick Start Testing ### 1. Start Services ```bash cd /home/tech4biz/Desktop/prakash/codenuk/backend_new1/codenuk_backend_mine docker-compose up -d multi-document-upload-service neo4j redis postgres api-gateway ``` ### 2. Verify Services ```bash # Check health curl http://localhost:8024/health curl http://localhost:8000/api/multi-docs/health ``` ### 3. Test via Frontend 1. **Open Frontend**: `http://localhost:3001` 2. **Login** (if required) 3. **Go to Project Builder** 4. **Complete Steps 1-2** (Project Type & Features) 5. **Step 3: Multi Docs Upload** appears 6. **Upload files**: - Click upload area - Select multiple files (PDF, DOCX, etc.) - Click "Start Upload" 7. **Watch Progress**: - Progress bar updates - Status messages appear - Polls every 4 seconds 8. **Auto-proceeds** when completed ### 4. Verify in Neo4j ```bash # Open Neo4j Browser: http://localhost:7474 # Login: neo4j / password # Query causal relationships: MATCH (n)-[r:CAUSES]->(m) RETURN n, r, m LIMIT 50 ``` ## 📝 Test Checklist - [ ] Service starts successfully - [ ] Health endpoint works - [ ] Frontend component renders - [ ] File upload works - [ ] Progress updates correctly - [ ] Job completes successfully - [ ] Neo4j graph contains relationships - [ ] Error handling works - [ ] Skip button works ## 🔍 Debug Commands ```bash # View service logs docker-compose logs -f multi-document-upload-service # Check job status (replace {job_id}) curl http://localhost:8000/api/multi-docs/jobs/{job_id} # Check graph summary curl http://localhost:8000/api/multi-docs/jobs/{job_id}/graph ``` ## ⚠️ Common Issues 1. **502 Bad Gateway**: Service not running → `docker-compose ps` 2. **413 Too Large**: File too big → Reduce file size 3. **No progress**: Check browser console → Check network tab 4. **No relationships**: Check Claude API key → Check service logs ## 🎯 Expected Flow ``` Upload Files → Job Created → Files Saved → Content Extracted → Claude Analysis → Graph Built → Completed → Auto-proceed to Next Step ```