- Vercel - Frontend hosting with edge optimization
- Render - Backend API hosting with auto-scaling
- Modal - Serverless containers for parallel processing
Architecture Overview
Prerequisites
Prepare environment variables
Have all your API keys and secrets ready. See the Environment Variables page for the complete list.
Deploy Modal Containers
Deploy the serverless containers first, as the backend depends on them.Deploy analysis container
From the This deploys the
backend/ directory:groq-read app for analyzing repository files.Verify deployment
Check your Modal dashboard to confirm both apps are deployed:
groq-readwithrun_scriptfunctiongroq-writewithprocess_filefunction
Modal apps are serverless and will auto-scale from 0 to 100+ containers based on load.
Deploy Backend to Render
The backend API runs on Render’s Python environment.Create new Web Service
- Go to Render Dashboard
- Click “New +” → “Web Service”
- Connect your GitHub repository
- Select the repository containing Dependify
Configure build settings
Use the following settings:
dependify-api (or your preferred name)Choose closest to your users (e.g., Oregon, Frankfurt)
master or mainLeave empty (repo root)
Python 3These values match the configuration in
render.yaml.Deploy
Click “Create Web Service”. Render will:
- Clone your repository
- Install dependencies
- Start the FastAPI server
- Provide you with a URL like
https://dependify-api.onrender.com
Deploy Frontend to Vercel
The frontend is deployed to Vercel for optimal Next.js performance.Import project
- Go to Vercel Dashboard
- Click “Add New…” → “Project”
- Import your GitHub repository
- Select the repository containing Dependify
Set environment variables
Add the following environment variables in Vercel:
Make sure
NEXT_PUBLIC_API_URL points to your Render backend URL.Deploy
Click “Deploy”. Vercel will:
- Build your Next.js app with Turbopack
- Deploy to their edge network
- Provide you with URLs like:
- Production:
https://dependify.vercel.app - Preview:
https://dependify-git-branch.vercel.app
- Production:
Configure GitHub OAuth
Update your GitHub OAuth app with production URLs.Update OAuth app settings
Edit your OAuth app
Update:
- Homepage URL:
https://your-app.vercel.app - Authorization callback URL:
https://your-app.vercel.app/auth/callback
Domain Configuration (Optional)
Set up custom domains for professional URLs.Frontend Domain (Vercel)
Add custom domain
In Vercel project settings:
- Go to “Settings” → “Domains”
- Add your domain (e.g.,
dependify.yourdomain.com) - Follow DNS configuration instructions
Backend Domain (Render)
Add custom domain
In Render service settings:
- Go to “Settings” → “Custom Domains”
- Add your domain (e.g.,
api.yourdomain.com)
Monitoring and Logs
Render Logs
View backend logs in real-time:- Go to Render dashboard → Your service → “Logs”
- Monitor for errors or performance issues
- Set up log alerts for critical errors
Vercel Logs
View frontend logs:- Go to Vercel project → “Deployments” → Select deployment
- Click “Functions” tab for serverless function logs
- Use Vercel Analytics for performance monitoring
Modal Logs
View container execution logs:- Go to Modal dashboard → Your app
- Click on function name (
run_scriptorprocess_file) - View recent executions and error traces
Continuous Deployment
Both Vercel and Render support automatic deployments.Enable auto-deploy on Vercel
Automatic by default. Every push to your main branch triggers a deployment.
Enable auto-deploy on Render
In Render service settings:
- Go to “Settings” → “Build & Deploy”
- Enable “Auto-Deploy”
- Select branch (e.g.,
masterormain)
Scaling Configuration
Render Scaling
- Free: Limited hours, cold starts
- Starter: Always-on, 0.5 GB RAM
- Standard: Auto-scaling, 2+ GB RAM (recommended for production)
Modal Scaling
Modal auto-scales by default:- Min containers: 3 (configured in
modal_write.py) - Max containers: 100 (configurable)
- Timeout: 300 seconds per file (5 minutes)
Environment-Specific Secrets
Development
Use
.env files locally. Never commit to git.Production
Use platform-native secret management:
- Render: Environment Variables
- Vercel: Environment Variables
- Modal:
modal secretCLI
Security Checklist
API keys are secret
- ✅ All secrets stored in platform environment variables
- ✅ No secrets in git repository
- ✅ Different keys for dev and production
CORS is configured
- ✅
FRONTEND_URLpoints to production domain - ✅ No wildcard CORS origins in production
Rate limiting is enabled
- ✅
RATE_LIMIT_PER_HOURset appropriately - ✅ Monitor rate limit violations in logs
Troubleshooting
Backend returns 503 or times out
Backend returns 503 or times out
Render free tier has cold starts. Solutions:
- Upgrade to Starter plan for always-on service
- Add health check pings to keep service warm
- Check Render logs for startup errors
CORS errors in production
CORS errors in production
- Verify
FRONTEND_URLon Render matches Vercel URL exactly - No trailing slashes in URLs
- Restart Render service after changing environment variables
- Check browser console for specific CORS error
Modal containers fail
Modal containers fail
- Check Modal dashboard for error logs
- Verify secrets are configured:
modal secret list - Ensure Groq API key has sufficient quota
- Check Modal billing for quota limits
GitHub OAuth fails
GitHub OAuth fails
- Verify OAuth app callback URL matches Vercel URL
- Ensure
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETare correct - Test OAuth flow in incognito mode
- Check Render logs for authentication errors
Next Steps
Monitor Performance
Set up monitoring with Vercel Analytics and Render metrics
Set Up Alerts
Configure email alerts for deployment failures and errors
Review Logs
Regularly check logs for errors and optimization opportunities
Scale Resources
Monitor usage and upgrade plans as traffic grows