- Docker & Docker Compose installed
- Groq API Key (Get free key)
# 1. Configure environment
cp .env.example .env
# 2. Edit .env and add your Groq API key
# GROQ_API_KEY=your-key-here
# 3. Start all services
docker-compose up -d
# 4. Wait 30 seconds for services to start
# Then check health
curl http://localhost:8000/healthcurl -X POST http://localhost:8000/api/v1/user/register \
-H "Content-Type: application/json" \
-d '{
"fullname": "Test User",
"email": "test@example.com",
"password": "password123"
}'curl -X POST http://localhost:8000/api/v1/user/login \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "password123"
}' \
-c cookies.txtcurl -X POST http://localhost:8000/api/v1/session/create \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"role": "Backend Developer",
"experience": "mid-level",
"topicsToFocus": ["Node.js", "MongoDB", "REST APIs"]
}'Copy the session _id from response!
# Replace SESSION_ID with actual ID from step 3
curl -X POST http://localhost:8000/api/v1/question/generate \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"role": "Backend Developer",
"experience": "mid-level",
"topicsToFocus": ["Node.js", "MongoDB", "REST APIs"],
"sessionId": "SESSION_ID"
}'Copy the jobId from response!
# Replace JOB_ID with actual ID from step 4
curl -X GET http://localhost:8000/api/v1/queue/question/JOB_ID \
-b cookies.txtWait until status is "completed" (30-60 seconds)
# Replace SESSION_ID
curl -X GET http://localhost:8000/api/v1/question/session/SESSION_ID \
-b cookies.txtcurl -X GET http://localhost:8000/api/v1/analytics/user \
-b cookies.txtcurl -X GET http://localhost:8000/api/v1/notifications \
-b cookies.txt# Replace SESSION_ID
curl -X POST "http://localhost:8000/api/v1/export/export/SESSION_ID?format=pdf" \
-b cookies.txtCopy the jobId from response!
# Replace EXPORT_JOB_ID
curl -X GET http://localhost:8000/api/v1/export/status/EXPORT_JOB_ID \
-b cookies.txt# Replace FILENAME from export status response
curl -X GET http://localhost:8000/api/v1/export/download/FILENAME \
-b cookies.txt \
-o interview_questions.pdfGet Question IDs first:
curl -X GET http://localhost:8000/api/v1/question/session/SESSION_ID \
-b cookies.txt | grep "_id"Bulk Update Difficulty:
curl -X POST http://localhost:8000/api/v1/bulk/difficulty \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"questionIds": ["QUESTION_ID_1", "QUESTION_ID_2"],
"difficulty": "hard"
}'Bulk Toggle Pin:
curl -X POST http://localhost:8000/api/v1/bulk/toggle-pin \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"questionIds": ["QUESTION_ID_1", "QUESTION_ID_2"],
"isPinned": true
}'Session Analytics:
curl -X GET http://localhost:8000/api/v1/analytics/session/SESSION_ID \
-b cookies.txtTrending Topics:
curl -X GET http://localhost:8000/api/v1/analytics/trending?limit=10curl -X GET "http://localhost:8000/api/v1/question/search?q=node&limit=20" \
-b cookies.txt# Check all services are running
docker-compose ps
# View API logs
docker-compose logs -f api
# View Worker logs
docker-compose logs -f worker
# Check MongoDB
docker exec intervai-mongodb mongosh --eval "db.adminCommand('ping')"
# Check Redis
docker exec intervai-redis redis-cli -a redis123 pingSolution: Wait 30-60 seconds for services to fully start
Solution: Login again to get fresh token
Solution: Check if worker is running: docker-compose logs worker
Solution: Verify GROQ_API_KEY in .env file
# Start services
docker-compose up -d
# Stop services
docker-compose down
# View logs
docker-compose logs -f
# Restart API
docker-compose restart api
# Restart Worker
docker-compose restart worker
# Clean restart (removes data)
docker-compose down -v && docker-compose up -d
# Check health
curl http://localhost:8000/health- Services start successfully
- Health check returns OK
- User registration works
- User login works
- Session creation works
- Question generation queued
- Job status shows progress
- Questions generated successfully
- Analytics show correct data
- Notifications received
- Export to PDF works
- Export to CSV works
- Export to DOCX works
- Bulk operations work
- Search works
- All Docker services healthy
Expected response times:
- Health check: < 50ms
- Register/Login: < 200ms
- Create session: < 100ms
- Queue question generation: < 100ms
- Question generation (worker): 30-60 seconds
- Get questions: < 100ms
- Analytics: < 200ms
- Export queue: < 100ms
- Export generation (worker): 5-15 seconds
- ✅ Test all endpoints using Postman
- ✅ Review POSTMAN_COLLECTION.md for detailed API docs
- ✅ Check README_NEW.md for complete documentation
- ✅ Review IMPLEMENTATION_SUMMARY.md for changes
If you encounter issues:
- Check Docker logs:
docker-compose logs -f - Verify environment variables in
.env - Ensure ports 8000, 27017, 6379 are available
- Check POSTMAN_COLLECTION.md for correct request format
Happy Testing! 🎉