Complete step-by-step guide to deploy VaxTrust (Backend + Frontend + Mobile App).
| Component | Tech | Deploy To |
|---|---|---|
| Backend API | Flask (Python) | Render.com (free tier) |
| Web Frontend | React | Netlify (free tier) |
| Mobile App | Expo (React Native) | EAS Build → .apk / .ipa |
The following files have been created:
Procfile— tells Render how to start the serverruntime.txt— specifies Python versionrequirements.txt— includesflask,flask-cors,gunicorn
cd /home/shreyas/code/VaxTrust
git add Procfile runtime.txt requirements.txt
git commit -m "Add deployment config for Render"
git push origin main- Go to https://render.com and sign up (free).
- Click "New +" → "Web Service"
- Connect your GitHub repo:
shreyasmene06/Vaxtrust - Configure:
- Name:
vaxtrust-api - Region: Oregon (or closest)
- Branch:
main - Build Command:
pip install -r requirements.txt - Start Command:
cd backend && gunicorn app:app --bind 0.0.0.0:$PORT --workers 2 --timeout 120 - Instance Type: Free
- Name:
- Click "Create Web Service"
After deploy, Render gives you a URL like:
https://vaxtrust-api.onrender.com
Save this URL — you'll need it for the frontend and mobile app.
Note: Free-tier Render services spin down after 15 min of inactivity. First request after idle takes ~30s.
Create a production .env for the frontend:
# In frontend/.env.production
REACT_APP_API_URL=https://vaxtrust-api.onrender.comcd frontend
npm run build- Go to https://app.netlify.com and sign up (free).
- Click "Add new site" → "Deploy manually"
- Drag the
frontend/build/folder into the upload area. - Done! You get a URL like
https://vaxtrust.netlify.app
- Go to Netlify → "Add new site" → "Import from Git"
- Connect your GitHub repo:
shreyasmene06/Vaxtrust - Configure:
- Base directory:
frontend - Build command:
npm run build - Publish directory:
frontend/build
- Base directory:
- Add Environment Variables (under Site settings → Environment):
REACT_APP_API_URL = https://vaxtrust-api.onrender.com REACT_APP_FIREBASE_API_KEY = AIzaSyAdJPll5ePyORu-Wj53KXtJ1Bl_e7VgAn4 REACT_APP_FIREBASE_AUTH_DOMAIN = vaxtrust-b131c.firebaseapp.com REACT_APP_FIREBASE_PROJECT_ID = vaxtrust-b131c REACT_APP_FIREBASE_STORAGE_BUCKET = vaxtrust-b131c.firebasestorage.app REACT_APP_FIREBASE_MESSAGING_SENDER_ID = 887152363532 REACT_APP_FIREBASE_APP_ID = 1:887152363532:web:7a529cc46564a9f44a4629 - Click "Deploy site"
Netlify → Domain settings → Add custom domain → vaxtrust.app (you'd need to buy this)
This is how you make a real installable app that people can download.
npm install -g eas-clicd vaxtrust-mobile
eas loginCreate an account at https://expo.dev if you don't have one.
Edit vaxtrust-mobile/src/services/api.js — change the production URL:
// Production URL - replace with your deployed backend
return 'https://vaxtrust-api.onrender.com';cd vaxtrust-mobile
eas build --platform android --profile previewThis will:
- Upload your code to Expo's cloud build servers
- Compile a real
.apkfile - Give you a download link for the APK
Total time: ~10-15 minutes for first build.
Once done, you'll see:
✔ Build finished
🤖 Android build: https://expo.dev/artifacts/eas/xxxxx.apk
Download that APK → transfer to any Android phone → install it → you have a real app!
eas build --platform ios --profile previewThis creates a .app file you can run in the iOS Simulator on any Mac.
eas build --platform ios --profile productionYou need:
- An Apple Developer account ($99/year at developer.apple.com)
- EAS will guide you through creating provisioning profiles and certificates
- Download the
.apkfrom the EAS build link - Transfer to your phone (email it, Google Drive, direct download)
- On your phone: Settings → Security → Enable "Install from unknown sources"
- Open the
.apk→ Install - Done! VaxTrust is on your phone!
# Register devices for internal testing
eas device:create
# Build for internal distribution
eas build --platform android --profile preview
eas build --platform ios --profile preview- Create a Google Play Developer account ($25 one-time fee) at play.google.com/console
- Build a production AAB:
# Edit eas.json — change production android buildType to "app-bundle" eas build --platform android --profile production - Upload the
.aabfile to Google Play Console - Fill in listing details (screenshots, description, etc.)
- Submit for review (~1-3 days)
- Apple Developer account ($99/year)
- Build:
eas build --platform ios --profile production
- Submit:
eas submit --platform ios
- Fill in App Store Connect listing
- Submit for review (~1-7 days)
# ===== BACKEND (Render) =====
git add . && git commit -m "deploy" && git push origin main
# Render auto-deploys from GitHub
# ===== FRONTEND (Netlify) =====
cd frontend && npm run build
# Netlify auto-deploys from GitHub, or drag build/ folder
# ===== MOBILE APP (EAS) =====
cd vaxtrust-mobile
# Build Android APK (FREE — no account needed)
eas build --platform android --profile preview
# Build iOS simulator .app (FREE)
eas build --platform ios --profile preview
# Build for App Store (needs Apple Dev account)
eas build --platform ios --profile production| Where | Variable | Value |
|---|---|---|
| Netlify | REACT_APP_API_URL |
https://vaxtrust-api.onrender.com |
| Netlify | REACT_APP_FIREBASE_* |
Your Firebase credentials |
| Render | None needed | Config is in code |
Mobile .env |
EXPO_PUBLIC_FIREBASE_* |
Your Firebase credentials |
Mobile api.js |
Production URL | https://vaxtrust-api.onrender.com |
| Problem | Solution |
|---|---|
| Backend 503 on Render | Free tier spins down — first request takes 30s, wait and retry |
| CORS errors | Ensure flask-cors is in requirements.txt (already added) |
| Firebase auth not working | Add your Netlify domain to Firebase Console → Authentication → Authorized domains |
| APK won't install | Enable "Install from unknown sources" in Android Settings |
| EAS build fails | Run eas diagnostics and check the build logs on expo.dev |
| API calls fail in app | Update the production URL in api.js to your Render URL |
| Service | Cost |
|---|---|
| Render (Backend) | Free (with cold starts) or $7/mo for always-on |
| Netlify (Frontend) | Free (100GB bandwidth/mo) |
| Expo EAS Build | Free (30 builds/mo) |
| Google Play Store | $25 one-time |
| Apple App Store | $99/year |
| Custom Domain | ~$10-15/year |
Total to get a working deployed app with APK: $0