Hosting & Infrastructure
The Everybody Eats Volunteer Portal is deployed using a modern cloud infrastructure stack with separate environments for development and production.
Hosting Providers
Section titled “Hosting Providers”Vercel - Application Hosting
Section titled “Vercel - Application Hosting”Vercel hosts the Next.js application
- Organization: Everybody Eats organization on Vercel
- Projects:
- Volunteer Portal:
- Environments:
ProductionLive production environmentdemoStaging environment for testing
- Environments:
- Volunteer Portal:
- Why Vercel: Optimized for Next.js, automatic deployments, edge functions, and excellent DX
- Features Used:
- Automatic deployments from GitHub branches
- Preview deployments for pull requests
- Edge proxy middleware for performance
- Environment variable management
- Analytics and Web Vitals monitoring
- Automatic SSL certificates
- Global CDN distribution
Supabase - Database & Backend Services
Section titled “Supabase - Database & Backend Services”Supabase provides PostgreSQL database and backend services
- Organization: Everybody Eats organization on Supabase
- Projects:
- Production Database:
volunteer-portal-prod- Production PostgreSQL instance - Demo Database:
volunteer-portal-demo- Staging database for testing
- Production Database:
- Why Supabase: Managed PostgreSQL, automatic backups, connection pooling, and excellent performance
- Features Used:
- PostgreSQL 15+ database
- Connection pooling for Prisma
- Automatic daily backups
- Point-in-time recovery
- Row Level Security (RLS) ready
- Database monitoring and metrics
- SQL editor for maintenance
Cloudflare - DNS Management
Section titled “Cloudflare - DNS Management”Cloudflare manages DNS for the everybodyeats.nz domain
- Domain:
everybodyeats.nz - DNS Records:
volunteers.everybodyeats.nz→ Vercel production deployment
- Why Cloudflare: Fast global DNS resolution, excellent security features, and reliable uptime
- Features Used:
- Global DNS with low latency
- DNSSEC for enhanced security
- DDoS protection
- DNS analytics and monitoring
- Free SSL/TLS certificate support
- Automatic failover capabilities
- Configuration: DNS-only mode (orange cloud disabled) to allow Vercel’s CDN and SSL management
Note: Demo/preview environments use Vercel’s automatic URLs (e.g., demo.everybody-eats.vercel.app) and do not require custom DNS records.
Third-Party Services
Section titled “Third-Party Services”Campaign Monitor - Email Services
Section titled “Campaign Monitor - Email Services”Campaign Monitor handles transactional and marketing emails
- Organization Account: Everybody Eats
- Email Types:
- Transactional emails (shift confirmations, reminders)
- Group booking invitations
- User invitation emails
- Email verification
- Integration: API integration for automated emails
- Templates: Custom HTML templates matching brand design
- Analytics: Open rates, click tracking, and engagement metrics
PostHog - Analytics & Product Intelligence
Section titled “PostHog - Analytics & Product Intelligence”PostHog provides product analytics and user insights
- Organization: Everybody Eats workspace
- Projects: Volunteer Portal
- Features Used:
- User behavior tracking
- Feature usage analytics
- Conversion funnel analysis
- Session recordings (opt-in only)
- A/B testing capabilities
- Custom event tracking
- Privacy: GDPR compliant with user consent management
- Integration: Client-side SDK in Next.js application
Environment Configuration
Section titled “Environment Configuration”Environment Structure
Section titled “Environment Structure”graph TD
A[GitHub Repository] --> B[Pull Request]
B --> C[Vercel Preview]
C --> D[Demo Supabase]
A --> E[Main Branch]
E --> F[Vercel Production]
E --> J[Vercel Demo]
F --> G[Production Supabase]
J --> D[Demo Supabase]
H[Campaign Monitor] --> F
H --> J
H --> C
I[PostHog] --> F
I --> J
I --> C
K[Cloudflare DNS] --> F
K --> J
K -.-> C
Environment Variables
Section titled “Environment Variables”Production Environment (Production environment on Vercel)
DATABASE_URL=postgresql://[connection-string] # Supabase productionNEXTAUTH_URL=https://volunteers.everybodyeats.nzNEXTAUTH_SECRET=[generated-secret]
# OAuth Providers (Production)GOOGLE_CLIENT_ID=[prod-google-id]GOOGLE_CLIENT_SECRET=[prod-google-secret]FACEBOOK_CLIENT_ID=[prod-facebook-id]FACEBOOK_CLIENT_SECRET=[prod-facebook-secret]APPLE_CLIENT_ID=[prod-apple-id]APPLE_CLIENT_SECRET=[prod-apple-secret]
# Third-Party ServicesCAMPAIGN_MONITOR_API_KEY=[prod-api-key]CAMPAIGN_MONITOR_LIST_ID=[prod-list-id]POSTHOG_KEY=[prod-posthog-key]POSTHOG_HOST=https://app.posthog.comDemo/Staging Environment (demo environment on Vercel)
DATABASE_URL=postgresql://[connection-string] # Supabase demoNEXTAUTH_URL=https://demo.everybody-eats.vercel.appNEXTAUTH_SECRET=[generated-secret]
# OAuth Providers (Demo)GOOGLE_CLIENT_ID=[demo-google-id]GOOGLE_CLIENT_SECRET=[demo-google-secret]# ... other OAuth providers
# Third-Party Services (Demo keys)CAMPAIGN_MONITOR_API_KEY=[demo-api-key]CAMPAIGN_MONITOR_LIST_ID=[demo-list-id]POSTHOG_KEY=[demo-posthog-key]POSTHOG_HOST=https://app.posthog.comDeployment Pipeline
Section titled “Deployment Pipeline”Continuous Deployment
Section titled “Continuous Deployment”GitHub → Vercel Integration
- Pull Requests: Automatic preview deployments on Vercel
- Main Branch: Automatic production deployment
- Feature Branches: Optional preview deployments
Deployment Process
Section titled “Deployment Process”graph LR
A[Developer Push] --> B[GitHub]
B --> C{Branch Type}
C -->|PR| D[Vercel Preview]
C -->|Main| E[Parallel Deploy]
E --> F[Vercel Production]
E --> G[Vercel Demo]
D --> H[Demo Supabase]
F --> I[Prod Supabase]
G --> H
J[Build Process] --> K[Type Check]
J --> L[Lint]
J --> M[Build Next.js]
J --> N[Deploy]
Database Migrations
Section titled “Database Migrations”Production Migrations
# Deploy migrationsnpm run prisma:deploy
# Verify migrationnpm run prisma:studioRollback Strategy
- Supabase point-in-time recovery for data issues
- Prisma migration history for schema rollbacks
- Automated backups before major migrations
Monitoring & Observability
Section titled “Monitoring & Observability”Application Monitoring
Section titled “Application Monitoring”Vercel Analytics
- Real-time performance metrics
- Web Vitals tracking
- Error tracking
- Function execution monitoring
PostHog Monitoring
- User journey tracking
- Feature adoption metrics
- Error event tracking
- Performance monitoring
Database Monitoring
Section titled “Database Monitoring”Supabase Dashboard
- Query performance metrics
- Connection pool monitoring
- Storage usage tracking
- Automatic alerting for issues
Email Monitoring
Section titled “Email Monitoring”Campaign Monitor Reports
- Delivery rates
- Open and click rates
- Bounce handling
- Unsubscribe management
Security Configuration
Section titled “Security Configuration”SSL/TLS Certificates
Section titled “SSL/TLS Certificates”- Vercel: Automatic SSL provisioning and renewal
- Custom Domains: Automatic certificate management
- Forced HTTPS: Automatic redirect from HTTP to HTTPS
Database Security
Section titled “Database Security”Supabase Security Features
- SSL connections enforced
- Connection pooling with PgBouncer
- IP allowlisting available
- Encrypted backups
- Row Level Security (RLS) ready
API Security
Section titled “API Security”Rate Limiting
- Vercel Edge Proxy Middleware for rate limiting
- DDoS protection at edge locations
- API route protection
Secret Management
Section titled “Secret Management”Vercel Environment Variables
- Encrypted at rest
- Scoped by environment (preview/production)
- Audit logging for changes
- Team-based access control
Scaling Configuration
Section titled “Scaling Configuration”Application Scaling
Section titled “Application Scaling”Vercel Scaling
- Automatic horizontal scaling
- Edge function distribution
- Global CDN for static assets
- Serverless function concurrency
Database Scaling
Section titled “Database Scaling”Supabase Scaling Options
- Vertical scaling (upgrade instance size)
- Connection pooling optimization
- Read replicas (if needed)
- Automatic resource scaling
Backup & Recovery
Section titled “Backup & Recovery”Database Backups
Section titled “Database Backups”Supabase Backup Policy
- Daily Backups: Automatic daily snapshots
- Retention: 7-30 days based on plan
- Point-in-Time Recovery: Available for production
- Manual Backups: On-demand backup creation
Code Backups
Section titled “Code Backups”GitHub Repository
- Full version history
- Branch protection rules
- Tag releases for deployments
Cost Management
Section titled “Cost Management”Service Tiers
Section titled “Service Tiers”Vercel
- Pro plan for production
- Includes team seats
- Analytics and monitoring
- Priority support
Supabase
- Pro plan for production database
- Free tier for demo/staging
- Pay-as-you-go for storage/bandwidth
Campaign Monitor
- Pay per email volume
- Template storage included
PostHog
- Free tier for basic analytics
- Usage-based pricing for events
Disaster Recovery Plan
Section titled “Disaster Recovery Plan”Recovery Time Objectives (RTO)
Section titled “Recovery Time Objectives (RTO)”- Application: < 5 minutes (Vercel automatic failover)
- Database: < 1 hour (Supabase backup restoration)
- Full Recovery: < 2 hours
Recovery Point Objectives (RPO)
Section titled “Recovery Point Objectives (RPO)”- Database: < 24 hours (daily backups)
- Code: Zero data loss (Git repository)
Support & Resources
Section titled “Support & Resources”Documentation
Section titled “Documentation”- Vercel: docs.vercel.com
- Supabase: supabase.com/docs
- Campaign Monitor: help.campaignmonitor.com
- PostHog: posthog.com/docs
Support Channels
Section titled “Support Channels”- Vercel: Pro support via dashboard
- Supabase: Pro support tickets
- Campaign Monitor: Email support
- PostHog: Community support | Paid support