npm install --legacy-peer-depsCopy the .env file and add your Perplexity API key:
# Required: Perplexity API Configuration
PERPLEXITY_API_KEY=your_actual_perplexity_api_key_here
# NextAuth Configuration (already configured)
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret-key-here
# Google OAuth (already configured)
GOOGLE_CLIENT_ID=691331113711-ihh7j6m6jecdjq7vlmfa8h917ui3rmd6.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=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- Sign up at Perplexity AI
- Go to API Settings
- Generate a new API key
- Copy the key and paste it in your
.envfile
npm run dev- Main App: http://localhost:3000
- Medical Diagnosis: http://localhost:3000/medical
- Medical Dashboard: http://localhost:3000/medical/dashboard
- API Health Check: http://localhost:3000/api/medical/diagnose
The system uses 5 specialized AI agents powered by Perplexity Sonar models:
-
🗣️ Bhasha (Language Translator)
- Model:
sonar - Function: Translates symptoms from 10+ Indian languages
- Features: Emergency keyword detection, cultural context preservation
- Model:
-
📊 Lakshan (Symptom Analyzer)
- Model:
sonar - Function: Clinical symptom structuring and analysis
- Features: Red flag detection, urgency scoring, body system classification
- Model:
-
📚 Shodh (Medical Researcher)
- Model:
sonar - Function: Real-time medical literature research
- Features: Evidence-based findings, regional disease patterns, outbreak monitoring
- Model:
-
🛡️ Suraksha (Risk Assessment)
- Model:
sonar - Function: Patient-specific risk evaluation
- Features: Multi-domain risk analysis, safety recommendations
- Model:
-
🧠 Nidan (Diagnosis Aggregator)
- Model:
sonar - Function: Clinical decision synthesis
- Features: Differential diagnosis, confidence scoring, treatment recommendations
- Model:
- Parallel Processing: Multiple agents work simultaneously
- Real-time Status: Live agent activity monitoring
- Error Handling: Graceful fallbacks and error recovery
- Performance Metrics: Processing time and efficiency tracking
| Language | Native Script | Code |
|---|---|---|
| English | English | english |
| Hindi | हिंदी | hindi |
| Marathi | मराठी | marathi |
| Tamil | தமிழ் | tamil |
| Telugu | తెలుగు | telugu |
| Bengali | বাংলা | bengali |
| Gujarati | ગુજરાતી | gujarati |
| Kannada | ಕನ್ನಡ | kannada |
| Malayalam | മലയാളം | malayalam |
| Punjabi | ਪੰਜਾਬੀ | punjabi |
| Urdu | اردو | urdu |
Without Perplexity API Key (Demo Mode):
- Uses intelligent fallback responses
- Simulates agent processing
- Limited to basic symptom analysis
- No real-time research capabilities
With Perplexity API Key (Real-time Mode):
- Full AI agent orchestration
- Real-time medical literature research
- Dynamic symptom analysis
- Live risk assessment
- Evidence-based diagnosis
The system is optimized for:
- Speed: Parallel agent processing
- Accuracy: Multiple validation layers
- Safety: Conservative medical approach
- Scalability: Efficient resource usage
- Perplexity API calls are optimized for efficiency
- Each diagnosis uses approximately 4-6 API calls
- Processing time: 5-15 seconds depending on complexity
- Rate limits are handled automatically
- No patient data is stored permanently
- All API communications are encrypted
- Session-based processing only
- HIPAA-ready architecture
-
"API key not configured" error
- Ensure
PERPLEXITY_API_KEYis set in.env - Restart the development server after adding the key
- Ensure
-
Build warnings about unused imports
- These are non-critical warnings
- The application will function normally
-
Slow response times
- Check your internet connection
- Verify Perplexity API status
- Complex symptoms may take longer to process
- GitHub Issues: Report bugs and feature requests
- Documentation: Check the README.md for detailed information
- API Status: Monitor Perplexity API status page
npm run build
npm startEnsure all environment variables are properly set in your production environment:
PERPLEXITY_API_KEY: Your production Perplexity API keyNEXTAUTH_URL: Your production domainNEXTAUTH_SECRET: A secure random string for production
docker build -t curalink .
docker run -p 3000:3000 -e PERPLEXITY_API_KEY=your_key curalinkReady to revolutionize medical diagnosis with AI? Start by getting your Perplexity API key and experience the power of multi-agent medical intelligence! 🏥🤖