Skip to main content

Deployment Overview

CAFH Platform is a static frontend with a Node.js backend. You can deploy them together or separately.

Deployment Options

Environment Variables

Set these in your deployment platform:
.env.production
# SMTP Configuration
SMTP_HOST=mail.yourdomain.com
SMTP_PORT=465
SMTP_USER=[email protected]
SMTP_PASS=your_password
SMTP_SECURE=true

# Email Throttling
MAX_EMAILS_PER_HOUR=80

# Optional
NODE_ENV=production

Static Hosting (Frontend Only)

If you only deploy the frontend:
1

Build

npm run build
2

Upload dist/ folder

Upload to:
  • GitHub Pages
  • Netlify
  • Vercel
  • Cloudflare Pages
  • AWS S3 + CloudFront
3

Configure routing

For hash routing, no special configuration needed.For browser routing, add a redirect rule:
/* /index.html 200
Without the backend, email features won’t work. Consider deploying server.ts separately.

Custom Domain

Vercel

  1. Go to Project Settings > Domains
  2. Add your domain (e.g., cafh.org)
  3. Update DNS records as shown
  4. Wait for SSL certificate provisioning

Netlify

  1. Go to Site Settings > Domain Management
  2. Add custom domain
  3. Configure DNS:
    A Record: @ -> 75.2.60.5
    CNAME: www -> your-site.netlify.app
    

Post-Deployment

1

Test all features

  • Login as admin and member
  • Create a test campaign
  • Upload media
  • Create a blog post
  • Test Zoom integration (if configured)
2

Verify email sending

Send a test campaign to yourself and verify delivery
3

Monitor logs

Check deployment logs for errors:
  • Vercel: Dashboard > Deployments > Logs
  • Railway: Project > Deployments > Logs
4

Set up analytics (optional)

Add Google Analytics or Plausible to track usage

Production Checklist

  • HTTPS enabled (automatic with Vercel/Netlify)
  • SMTP credentials in environment variables (not in code)
  • CORS configured correctly
  • Rate limiting enabled for email
  • Production build minified
  • Gzip/Brotli compression enabled
  • CDN for static assets
  • Lazy loading for large components
  • Error tracking (Sentry, Rollbar)
  • Uptime monitoring (UptimeRobot)
  • Email delivery monitoring
  • Storage usage tracking

Next Steps

Email Server

Configure production email

Environment Setup

Manage environment variables

Build Process

Optimize builds

Build docs developers (and LLMs) love