This project uses a split deployment architecture:
- Vercel: Frontend (Vue app) only
- Render: Backend API only
- Netlify: Backup frontend (optional)
┌─────────────┐ API Requests ┌─────────────┐
│ Vercel │ ──────────────────────> │ Render │
│ (Frontend) │ │ (Backend) │
│ Vue App │ <────────────────────── │ API │
└─────────────┘ JSON Response └─────────────┘
- Deploys: Vue app static files
- Does NOT Deploy: Backend API (to avoid serverless function limits)
- Auto-Deploy: ✅ Enabled
- Branch:
main
Environment Variables Required:
VITE_API_URL=https://fileduck-api.onrender.com
Setup Instructions:
- Go to Vercel Dashboard
- Select your project
file-duck - Go to Settings → Environment Variables
- Add
VITE_API_URLpointing to your Render backend URL - Redeploy to apply changes
- Service ID:
srv-d65vqkkr85hc73d2t050 - Deploys: Backend API via Docker (
apps/api/Dockerfile) - Auto-Deploy: ✅ Enabled
- Branch:
main - Runtime: Docker
- Start Command:
node dist/server.js - Health Check:
/api/health - Port: 3001
Environment Variables Required:
UPSTASH_REDIS_URL- Redis connection stringUPSTASH_REDIS_TOKEN- Redis tokenGITHUB_TOKEN- For GitHub file storageGITHUB_REPO- Repository for file storageUSE_GITHUB_STORAGE=trueNODE_ENV=production- All other backend-specific variables (see
render.yaml)
Setup Instructions:
- Go to Render Dashboard
- Select service
fileduck-api(srv-d65vqkkr85hc73d2t050) - Ensure GitHub repository is connected with branch
main - Set all required environment variables
- Enable "Auto-Deploy" for main branch
- Deploys: Vue app (same as Vercel)
- Auto-Deploy: ✅ Enabled
- Branch:
main - Build Command:
pnpm run build - Publish Directory:
apps/vue-app/dist
Setup Instructions:
- Go to Netlify Dashboard
- Select your site
- Set environment variable:
VITE_API_URLto Render backend URL - Enable "Auto publishing"
All platforms automatically deploy when:
- ✅ Code is pushed to
mainbranch - ✅ Pull requests are merged to
main - ✅ Commits are made directly to
main
What Gets Deployed Where:
- Vercel: Only
apps/vue-app(frontend) - Render: Backend API via Docker (entire repo as build context)
- Netlify: Only
apps/vue-app(frontend backup)
services:
- type: web
name: fileduck-api
serviceId: srv-d65vqkkr85hc73d2t050
runtime: docker
dockerfile: ./apps/api/Dockerfile
dockerContext: ./
startCommand: node dist/server.js
healthCheckPath: /api/health{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@vercel/static-build",
"config": {
"distDir": "apps/vue-app/dist"
}
}
],
"routes": [
{
"handle": "filesystem"
},
{
"src": "/(.*)",
"dest": "/index.html"
}
]
}apps/api/
packages/scanner/
- Triggers on push to
mainor manualworkflow_dispatch - Uses Render API to trigger a deploy
- Requires GitHub secrets:
RENDER_API_KEYandRENDER_SERVICE_ID
git add .
git commit -m "Deploy frontend to Vercel"
git push origin mainCheck: https://your-project.vercel.app
# Same push triggers Render via GitHub Actions
git push origin mainCheck: https://fileduck-api.onrender.com/api/health
- Open browser console on Vercel site
- Upload a file
- Check Network tab - API requests should go to Render URL
- Look for
VITE_API_URLin requests
✅ FIXED: Backend removed from Vercel. Now deploys on Render only.
- Check
VITE_API_URLenvironment variable in Vercel - Ensure Render backend is deployed and running
- Check Render logs for errors
- Verify CORS settings in backend
- Check environment variables are set in Render dashboard
- Verify Docker build succeeds (check Render build logs)
- Ensure
pnpm installcompletes without errors - Verify TypeScript builds correctly:
pnpm run build:backend
- Check build logs for errors
- Ensure
VITE_API_URLis set - Verify
pnpmversion compatibility - Check if
apps/vue-appbuilds locally
# From project root
vercel --prod# Trigger deploy via API
curl -X POST "https://api.render.com/v1/services/srv-d65vqkkr85hc73d2t050/deploys" \
-H "Authorization: Bearer YOUR_RENDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'# From project root
netlify deploy --prod --dir=apps/vue-app/dist| Variable | Value | Required |
|---|---|---|
VITE_API_URL |
https://fileduck-api.onrender.com |
✅ Yes |
| Variable | Example | Required |
|---|---|---|
UPSTASH_REDIS_URL |
https://...upstash.io |
✅ Yes |
UPSTASH_REDIS_TOKEN |
AX... |
✅ Yes |
GITHUB_TOKEN |
ghp_... |
✅ Yes |
GITHUB_REPO |
owner/repo |
✅ Yes |
USE_GITHUB_STORAGE |
true |
✅ Yes |
NODE_ENV |
production |
✅ Yes |
| Variable | Value | Required |
|---|---|---|
VITE_API_URL |
https://fileduck-api.onrender.com |
✅ Yes |