This guide covers deploying CareNet to production on Vercel.
You can deploy CareNet immediately without any API keys! The app works with demo mode for AI features. Add API keys later when you're ready for real AI capabilities.
📚 Read the complete API Keys & Cost Guide → for detailed pricing and setup.
- Vercel Account: Sign up at vercel.com
- GitHub Repository: Push your code to GitHub
- API Keys (Optional - see below):
- Dedalus API Key (for real card scanning & triage) - ~$20/mo for 1,000 users
- ElevenLabs API Key and Agent ID (for AI booking agent) - ~$60/mo for 1,000 users
Make sure your code is pushed to GitHub:
git add .
git commit -m "Prepare for production deployment"
git push origin mainThe FastAPI backend can be deployed alongside the frontend.
- Navigate to your backend directory:
cd backend- Create a
vercel.jsonin the backend directory:
{
"builds": [
{
"src": "main.py",
"use": "@vercel/python"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "main.py"
}
]
}- Create a
requirements.txtif not already present:
pip freeze > requirements.txt- Install Vercel CLI:
npm i -g vercel- Navigate to frontend directory:
cd frontend- Deploy:
vercel- Follow the prompts to link your project
- Go to vercel.com/new
- Import your GitHub repository
- Select the
frontenddirectory as the root - Configure environment variables (see below)
- Click "Deploy"
The app works without any API keys! You can deploy first and add keys later.
No configuration needed! Your app will:
- ✅ Show all hospitals and facilities
- ✅ Display cost estimates and insurance info
- ✅ Provide maps and directions
- ✅ Use demo mode for card scanning (shows sample data)
- ✅ Use demo mode for voice triage (keyword-based)
- ✅ Allow direct phone calls to hospitals
Monthly cost: $0
In your Vercel project settings → Environment Variables, add:
DEDALUS_API_KEY=your-dedalus-api-key-here
Get your key at dedaluslabs.ai
ELEVENLABS_API_KEY=your-elevenlabs-api-key-here
ELEVENLABS_AGENT_ID=your-agent-id-here
ELEVENLABS_AGENT_PHONE_NUMBER_ID=your-phone-number-id-here
How to get ElevenLabs credentials:
- Sign up at elevenlabs.io
- Navigate to "Conversational AI" in the dashboard
- Create a new AI agent for appointment booking
- Configure the agent with appropriate prompts for medical appointment scheduling
- Get your API key from Settings → API Keys
- Get your Agent ID and Phone Number ID from the agent settings
Recommendation: Start without API keys (free), add Dedalus when you have users, add ElevenLabs when you need booking automation.
# Override the backend API URL if hosting separately
NEXT_PUBLIC_API_URL=/api
# Enable demo mode for testing (no real calls made)
ELEVENLABS_DEMO_MODE=false
# Override phone number for testing
# ELEVENLABS_CALL_TO_NUMBER_OVERRIDE=+15551234567
- In Vercel Dashboard, go to Settings > Domains
- Add your custom domain
- Configure DNS records as instructed
- Wait for SSL certificate to be issued
The frontend is configured to proxy API requests to the backend. Ensure your next.config.ts has the following:
async rewrites() {
return [
{
source: '/api/:path*',
destination: process.env.BACKEND_URL || 'http://localhost:8000/:path*',
},
];
}For production, you may want to deploy the backend separately and set BACKEND_URL to your backend's URL.
After deployment:
- Visit your deployment URL
- Test insurance card scanning
- Test voice triage
- Test hospital search and filtering
- Test appointment booking (use demo mode if needed)
- Test payment flow
If you encounter build errors:
- Check that all environment variables are set
- Verify
package.jsondependencies are up to date - Check build logs in Vercel Dashboard
If the frontend can't connect to the backend:
- Verify
NEXT_PUBLIC_API_URLis set correctly - Check CORS settings in
backend/main.py - Ensure backend is deployed and accessible
If features aren't working:
- Verify all required API keys are set in Vercel
- Check that variable names match exactly (case-sensitive)
- Redeploy after adding/changing variables
Before going live:
- All environment variables configured
- Custom domain configured (optional)
- SSL certificate active
- Backend API accessible
- Insurance card scanning tested
- Voice triage tested
- Hospital search tested
- Appointment booking tested
- Payment processing tested
- Error logging configured
- Analytics configured (optional)
Consider setting up:
- Vercel Analytics: Built-in performance monitoring
- Error Tracking: Sentry or similar service
- API Monitoring: Track backend performance
- User Analytics: Google Analytics or similar
As your user base grows:
- Database: Migrate from JSON to PostgreSQL or similar
- Caching: Add Redis for frequently accessed data
- CDN: Leverage Vercel's edge network
- Backend: Consider containerizing and deploying to AWS/GCP
For issues:
- Check Vercel deployment logs
- Review browser console for errors
- Verify all API keys are valid
- Contact support for specific service issues
CareNet is now live! 🚀