Getting Started
This guide walks you through deploying PixelFlare to Cloudflare.
Prerequisites
- Cloudflare account (free tier works, Pro recommended for image resizing)
- Domain added to Cloudflare
- GitHub account (for OAuth)
- Node.js 18+ and pnpm installed
- Terraform 1.5+ (for infrastructure)
Deployment Options
Option 1: Terraform (Recommended)
Terraform automates most of the setup. See Terraform Setup for the full guide.
bash
# Clone the repo
git clone https://github.com/lissy93/pixelflare.git
cd pixelflare/terraform
# Configure
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your values
# Deploy infrastructure
terraform init
terraform applyThen complete the manual steps.
Option 2: Manual Setup
If you prefer manual control:
- Create R2 bucket, D1 database, and KV namespace in Cloudflare dashboard
- Set up Cloudflare Access with GitHub identity provider
- Configure wrangler.toml with resource IDs
- Deploy the Worker and Pages project
Quick Local Development
Want to try it locally first?
bash
# Clone and install
git clone https://github.com/lissy93/pixelflare.git
cd pixelflare
pnpm install
# Set up local environment
pnpm setup:local
# Start development servers
pnpm dev:allOpen http://localhost:5173 - you're running PixelFlare locally!
See Local Development for details.
Next Steps
- Deploy with Terraform - Full production setup
- API Reference - Integrate with your applications
- Image Variants - Understand image transformations