Audience: Engineers, DevOps, On-call responders
Last Updated: March 2026
Environment: Vercel (frontend) + Base44 (backend)
- Service Overview
- Deployment Procedures
- Rollback Procedures
- Environment Variables
- Incident Response
- Common Issues & Fixes
- Monitoring & Health Checks
- Maintenance Procedures
| Component | Technology | Hosting | URL Pattern |
|---|---|---|---|
| Frontend SPA | React 18 + Vite 6 | Vercel | https://*.vercel.app |
| Backend API + DB | Base44 SDK 0.8.3 | Base44 Cloud | VITE_BASE44_BACKEND_URL |
| Media Storage | Cloudinary | Cloudinary CDN | res.cloudinary.com |
| Build & Deploy | GitHub → Vercel | GitHub Actions + Vercel | — |
| Service | Impact If Down | Fallback |
|---|---|---|
| Base44 Backend | App non-functional (no data) | None; show error state |
| Vercel CDN | App inaccessible | None; DNS-level |
| OpenAI API | AI features unavailable | Degrade gracefully (hide AI panels) |
| Cloudinary | Avatars/images broken | Fallback to initials avatar |
| Slack/Teams | Notifications not sent | Log and retry |
All merges to main automatically trigger a Vercel deployment.
Developer → git push → GitHub → Vercel (auto-deploy)
Deployment time: ~2–4 minutes
# Install Vercel CLI
npm i -g vercel
# Deploy to production
vercel --prod
# Deploy preview (staging)
vercelBefore deploying to production:
-
npm run lintpasses with no new errors -
npm testpasses (114+ tests, 0 failures) -
npm run buildcompletes without errors - Environment variables verified in Vercel dashboard
- Database migrations applied (if any schema changes)
- Feature flags configured for new features
# Full pre-deploy validation
npm ci && npm run lint && npm test && npm run buildAccess via: Vercel Dashboard → Project → Settings → Environment Variables
| Variable | Environment | Description |
|---|---|---|
VITE_BASE44_APP_ID |
Production, Preview | Base44 app identifier |
VITE_BASE44_BACKEND_URL |
Production, Preview | Base44 API endpoint |
Vercel keeps all previous deployments available for instant promotion.
- Go to Vercel Dashboard → Project → Deployments
- Find the last known-good deployment
- Click "Promote to Production"
Rollback time: ~30 seconds
# Find the last good commit
git log --oneline
# Revert the bad commit
git revert <bad-commit-sha>
git push origin main
# Or hard reset (use with caution)
git reset --hard <good-commit-sha>
git push --force-with-lease origin main- Error rate > 5% on key pages (Dashboard, Events, Gamification)
- Authentication broken (users unable to log in)
- Data loss or corruption detected
- Security vulnerability actively exploited
These are bundled into the JS build and are public — treat as non-secret.
| Variable | Description | Example |
|---|---|---|
VITE_BASE44_APP_ID |
Base44 application ID | app_abc123 |
VITE_BASE44_BACKEND_URL |
Base44 API base URL | https://api.base44.com |
These are only accessible within Base44 serverless functions. Never expose to frontend.
| Variable | Used By | Description |
|---|---|---|
OPENAI_API_KEY |
AI functions | OpenAI GPT-4 access |
ANTHROPIC_API_KEY |
AI functions | Claude access |
GOOGLE_API_KEY |
Google integrations | Gemini + Calendar + Drive |
SLACK_BOT_TOKEN |
Slack functions | Slack workspace bot |
SLACK_SIGNING_SECRET |
Slack webhook | Webhook verification |
STRIPE_SECRET_KEY |
Store/payments | Stripe API |
STRIPE_WEBHOOK_SECRET |
Store webhook | Webhook verification |
TWILIO_ACCOUNT_SID |
SMS functions | Twilio account |
TWILIO_AUTH_TOKEN |
SMS functions | Twilio auth |
CLOUDINARY_API_KEY |
Media upload | Cloudinary access |
CLOUDINARY_API_SECRET |
Media upload | Cloudinary secret |
HUBSPOT_API_KEY |
HubSpot integration | CRM access |
NOTION_API_KEY |
Notion integration | Workspace access |
- Generate new secret in the external service dashboard
- Update in Base44 function environment settings
- Test the affected integration
- Revoke the old secret in the external service
| Severity | Definition | Response Time |
|---|---|---|
| P0 — Critical | App down, data loss, security breach | Immediate (< 15 min) |
| P1 — High | Major feature broken (auth, events, gamification) | < 1 hour |
| P2 — Medium | Non-critical feature broken, degraded performance | < 4 hours |
| P3 — Low | Minor UI issues, individual component errors | Next business day |
1. DETECT → Monitor alerts, user reports, error tracking
↓
2. TRIAGE → Assess severity (P0–P3), assign owner
↓
3. CONTAIN → Roll back if P0/P1 to restore service
↓
4. DIAGNOSE → Investigate root cause via logs
↓
5. FIX → Deploy patch or permanent fix
↓
6. VERIFY → Confirm resolution via testing
↓
7. DOCUMENT → Write incident report, update runbook
□ Notify on-call lead (< 5 min)
□ Assess scope (which users, which regions, which features)
□ Roll back via Vercel if deployment-related (< 15 min)
□ Communicate status to stakeholders
□ Monitor error rates post-rollback
□ Root-cause investigation
□ Post-mortem within 48 hours
For security incidents (data breach, XSS exploitation, unauthorized access):
- Isolate: Disable affected feature or suspend affected accounts
- Investigate: Review
AuditLogentity for suspicious activity - Notify: Follow
docs/security/INCIDENT_RESPONSE.md - Disclose: See
docs/security/VULNERABILITY_DISCLOSURE.md
Symptoms: Users redirected to login loop, or auth_required error in console.
Diagnosis:
# Check Base44 backend status
curl -I https://${VITE_BASE44_BACKEND_URL}/health
# Check browser console for token errors
# Look for: "Failed to check app state"Fix:
- Verify
VITE_BASE44_APP_IDandVITE_BASE44_BACKEND_URLare set correctly in Vercel - Check Base44 status page for backend incidents
- Clear browser localStorage and retry
Symptoms: Vercel deployment fails, npm run build exits non-zero.
Common causes:
# TypeScript errors
npm run typecheck
# Lint errors blocking build
npm run lint
# Missing environment variable
# Check vite.config.js for required VITE_ varsFix: Address the reported TypeScript or build error, then redeploy.
Symptoms: npm test fails; specific test names in output.
# Run tests locally with verbose output
npm run test:run -- --reporter=verbose
# Run a single failing test file
npx vitest run src/lib/utils.test.jsFix: Address the failing test case. Do not skip tests to unblock CI.
Symptoms: npm run lint reports 800+ errors, masking real issues.
# Auto-fix unused imports (fixes most of the 513 errors)
npm run lint:fix
# Then review remaining errors manually
npm run lintSymptoms: AI recommendations, coaching, or insights panels show empty state or error.
Diagnosis:
# Check if the AI function is returning errors
# Look in Base44 function logs for the specific function name
# e.g., generatePersonalizedRecommendationsCommon causes:
- OpenAI/Anthropic API key expired or rate limited
- User has insufficient data for AI to generate recommendations
- Network timeout on long-running AI calls
Fix:
- Verify API key validity in the AI service dashboard
- Check rate limit quota
- Ensure the user has sufficient activity history (≥ 3 events participated)
Symptoms: Users unable to purchase rewards; error in purchaseWithPoints function.
Diagnosis:
- Check user's
UserPoints.total_points>=StoreItem.points_cost - Check
StoreItem.is_available === true - Check Stripe webhook logs if payment involved
| Metric | Target | Alert Threshold |
|---|---|---|
| Page load time (LCP) | < 2.5s | > 4s |
| API response time (p95) | < 500ms | > 2s |
| Build success rate | 100% | Any failure |
| Test pass rate | 100% | Any failure |
| npm audit vulnerabilities | 0 high | Any high/critical |
Vercel provides built-in:
- Web Vitals (LCP, FID, CLS)
- Deployment success/failure history
- Edge network latency
Access: Vercel Dashboard → Project → Analytics
The app uses ErrorBoundary (React) to catch and display errors. For production monitoring, integrate an error tracking service (Sentry recommended):
// Future: Add to src/main.jsx
import * as Sentry from '@sentry/react';
Sentry.init({ dsn: import.meta.env.VITE_SENTRY_DSN });- Review
npm auditoutput for new vulnerabilities - Check Vercel deployment health
- Review failed background function runs (Base44 dashboard)
-
npm outdated— review available dependency updates - Review and clean up unused feature flags
- Rotate any secrets approaching 90-day age
- Review AuditLog entity for anomalous activity
- Full dependency audit (
npm audit --audit-level=moderate) - Review RBAC roles and user assignments
- Performance audit via Lighthouse
- Review and update this runbook
// Via Base44 admin dashboard or function:
// Delete AnalyticsEvents older than 1 year
// Archive completed Events older than 6 months
// Remove orphaned Participation recordsData is managed by Base44's infrastructure. Backups are Base44's responsibility per their SLA. For custom backup requirements:
- Export entities via Base44 admin dashboard
- Store exports in a separate secure location (e.g., Google Drive, S3)
- Test restore procedure quarterly