Deployment Overview

SaasKitFy consists of three independent applications that can be deployed separately on different hosts or together on a single server.

The Three Apps

  • Backend — Laravel API. Deploy on any PHP host (VPS, shared hosting, Docker, PaaS).
  • Frontend — React SPA. Build to static files and serve from any static host, CDN, or Nginx.
  • Marketing — PHP marketing site. Deploy on any PHP host.

Production Checklist

Before going live, complete the following steps on your backend server:

Environment Configuration

# .env — key settings to configure
APP_ENV=production
APP_DEBUG=false
APP_URL=https://api.yourdomain.com

DB_CONNECTION=pgsql  # or mysql
DB_HOST=your-db-host
DB_DATABASE=your-database
DB_USERNAME=your-user
DB_PASSWORD=your-password

REDIS_HOST=your-redis-host

MAIL_MAILER=smtp
MAIL_HOST=your-smtp-host

STRIPE_KEY=pk_live_...
STRIPE_SECRET=sk_live_...

FRONTEND_URL=https://app.yourdomain.com

Artisan Commands

# Generate application key (if not already set)
php artisan key:generate

# Run database migrations
php artisan migrate --force

# Cache configuration, routes, and views for performance
php artisan config:cache
php artisan route:cache
php artisan view:cache

# Create the storage symlink
php artisan storage:link

Queue Worker

SaasKitFy uses queues for emails, webhooks, and billing events. A queue worker must be running in production:

php artisan queue:work redis --sleep=3 --tries=3 --max-time=3600

Use Supervisor to keep the worker running and restart it on failure.

SSL

All three apps should be served over HTTPS. Use Let's Encrypt for free SSL certificates.

Frontend Build

cd frontend
npm install
npm run build

The output in dist/ is a static SPA. Serve it with Nginx, Apache, or upload to a CDN. The web server must be configured to route all paths to index.html for client-side routing to work.

Deployment Guides

Choose the guide that matches your infrastructure: