A custom wedding website using SvelteKit and Cloudflare - a free alternative to standard wedding websites like The Knot. It's easily used with a custom domain (you'll still pay for the domain, but it's usually cheaper through Cloudflare than through a wedding site service or GoDaddy). The site provides a complete solution for managing wedding information, RSVPs, and photos, with a focus on ease of customization and maintenance.
If you are more curious about my personal motivations and opinions rather than implementing the site yourself, I wrote about my experience building this thing in JOURNEY.md - it's got all my opinions on the tech I used, what worked, what didn't, and the whole process.
Key benefits:
- Full visual customization through an admin interface
- Secure and reliable hosting
- Cost-effective infrastructure
- Simple guest experience
- No coding required for content updates
- Features
- Project Status & Requirements
- Admin Interface
- How It All Works
- Setup Instructions
- Development
- Deployment
- Documentation
- Project Background
-
Visual Customization
- Customize colors, fonts, and styles
- Rearrange pages and sections
- Add or remove content blocks
- Preview changes before publishing
-
Content Management
- Edit text, images, and links
- Organize photos into galleries
- Create custom pages
- Update wedding details
-
Essential Pages
- Home page with key information
- Photo gallery with lightbox
- RSVP form with email confirmations
- Registry page
- Custom pages
-
Guest Features
- Mobile-responsive design
- Simple RSVP process
- Photo galleries
- Clear information display
This project is being actively used for my own wedding website, and theoretically can be adapted out-of-box to your own! If you try to use it for your own needs and run into trouble, open an issue and I will try to accommodate. Feel free to contact me directly if you want help setting this up. My main goal (apart from learning) was to have it designed so I could hand over content duties to my non-programmer partner, much like The Knot or other popular wedding site builder services.
To use this project, you do have to be somewhat technical. You should have:
- Basic understanding of web hosting and domain management
- A Cloudflare account (free tier is sufficient)
- A domain name (can be purchased through Cloudflare)
- Basic understanding of environment variables and configuration
- Familiarity with command line tools (for setup and deployment)
If you want to use it but are having trouble with some of the technical parts, contact me! I am happy to help.
- Node.js 18+ and npm
- Cloudflare account with access to:
- Pages
- Workers
- D1 Database
- KV Storage
- R2 Storage
- Zero Trust (for admin protection)
- Brevo account (for email notifications)
The admin dashboard provides access to all website configuration options. It's accessed at /admin and protected by Cloudflare Zero Trust.
The admin interface allows complete customization without requiring code changes:
Configure basic wedding information including names, date, location, and other details that appear throughout the site.
Adjust colors and fonts for the entire website. Options include:
- Color selection for all site elements
- Font choices for headings and body text
- Pre-made theme presets
- Custom theme creation
Central image management system:
- Upload and organize images
- Create albums for better organization
- Add captions and metadata
- Images uploaded here can be used throughout the site
Interface for creating and modifying pages:
- Drag and drop sections to create layouts
- Add various content blocks (text, images, maps, timelines)
- Reorder sections as needed
- Configure section-specific settings
- Add hyperlinks to other pages or external sites
Guest response management:
- View all submitted RSVPs
- Export guest data for planning
- Manage guest list
- Send reminder emails to pending guests
Add and manage registry information with custom images and descriptions.
All changes stay in preview mode until you're ready to publish, so you can experiment without breaking your live site.
When you're happy with how everything looks on your staging site, there's a handy feature to copy everything over to production in one go. No more copying and pasting between environments! When everything looks perfect, just hit publish!
The admin interface components work together as an integrated system:
The Gallery Manager is the central repository for all images:
- All images must be uploaded to the gallery first
- Images are automatically optimized and resized
- Once in the gallery, images can be used anywhere on the site
- To add a new image to any page, it must first exist in the gallery
-
Site Settings Set basic information like names, wedding date, and location. These details appear throughout the site and in default templates.
-
Theme Settings Set colors and fonts for the entire site. Changes apply globally to maintain consistent styling.
-
Default Pages The site includes pre-built pages (Home, Gallery, RSVP, Registry) that you can customize.
-
Custom Pages Use the Page Builder to:
- Create new pages
- Add content sections (text, images, maps, etc.)
- Arrange sections in your preferred order
- Link to other pages or external sites
-
Guest List Management
- Add guests individually or upload in bulk from a spreadsheet
- Include guest details like email and meal preferences
-
RSVP Form Settings
- Configure what information to collect
- Set deadlines
- Customize messages
-
Response Management
- Track responses
- Send reminders
- Export guest data
- Edit email templates for confirmation messages
The site uses a staging-to-production workflow:
- Changes made in the admin are saved to preview mode
- Preview the site to check changes before publishing
- Publish changes when ready
- Use the staging-to-production sync for moving multiple changes at once
This approach lets you make and test changes without affecting the live site.
- Clone the repository
- Install dependencies:
npm install - Copy and configure
wrangler.toml - Create Cloudflare resources (D1, KV, R2)
- Set up environment variables
- Deploy to Cloudflare Pages
- Clone the repository
- Install dependencies:
npm install
- Copy
wrangler.tomltowrangler.toml.exampleand update it with your Cloudflare configuration:- Replace all
REPLACE_WITH_YOUR_*placeholders with your actual Cloudflare resource IDs - Update domain names and URLs to match your setup
- Replace all
- Create necessary Cloudflare resources:
- D1 Database for RSVPs
- KV Namespace for image metadata
- R2 Bucket for image storage
- Configure the R2 bucket with a custom domain
- Ensure the bucket is set to be publicly accessible for image serving
- Set CORS policy to only allow GET and HEAD requests from your website domains
- Set up your environment variables:
- For local development: Create a
.dev.varsfile (never commit this!) - For production: Set them up in the Cloudflare Pages settings under the GitHub integration
- For preview: You can set them up in the Cloudflare Pages settings too, or they'll inherit from production
- For local development: Create a
The main environment variables you'll need are:
ENVIRONMENT(development/preview/production)SITE_URL(your site's URL)IMAGES_BUCKET_SITE_URL(where your images are hosted)IMAGES_BUCKET_NAME(your R2 bucket name)IMAGES_KV(your KV namespace ID for image metadata)PROD_IMAGES_KV(your production KV namespace ID)PROD_IMAGES_BUCKET(your production R2 bucket name)RSVPS(your D1 database ID)BREVO_API_KEY(your Brevo/Sendinblue API key for email notifications)EMAIL_SENDER_NAME(the name that will appear in the "From" field of emails)EMAIL_SENDER_ADDRESS(the email address that will be used to send notifications)
You can find these IDs in your Cloudflare dashboard under:
- Workers & Pages > D1 > Your Database
- Workers & Pages > KV > Your Namespace
- R2 > Your Bucket
For the Brevo API key, you'll need to:
- Sign up for a Brevo account
- Go to SMTP & API > API Keys
- Create a new API key with appropriate permissions
-
Staging vs Production:
- It's best to set up two separate Cloudflare Pages projects: one for staging and one for production
- This allows you to make changes (and mistakes) in the privacy of Cloudflare zero trust on staging
- Once changes are tested and ready, you can deploy to production
- Use different domains for each (e.g.,
staging.yourdomain.comandyourdomain.com)
-
KV Namespaces:
- For production,
IMAGES_KVandPROD_IMAGES_KVshould point to the same namespace - For staging/preview, they should be separate to avoid affecting production data
- This separation allows you to test image uploads and management without risking production data
- When you are happy with the staging images, there is functionality to copy them over all at once to production!
- For production,
-
Database Setup:
- Similar to KV, keep staging and production databases separate
- Use the preview database for testing RSVP functionality
- Only use the production database when you're ready to go live
- Note: RSVPs and guest lists are stored in the database and are unaffected by deployments
- This means you can safely deploy changes to the site without affecting any submitted RSVPs or guest data
-
Zero Trust Access:
- For preview/staging environment:
- Set up Zero Trust access for the entire site
- This ensures only authorized users can access the preview site
- Configure access policies to match your needs
- For production environment:
- Only apply Zero Trust access to the admin paths (e.g.,
/admin) - Keep the main site publicly accessible
- This allows guests to access the site while protecting admin functionality
- Only apply Zero Trust access to the admin paths (e.g.,
- Access policies can be configured in Cloudflare Zero Trust > Access > Applications
- For preview/staging environment:
Testing locally is kind of hard when using the cloud stuff! Honestly, I prefer having a dev branch deploying in cloud infrastructure, so that it is behaving the same as it will on Prod. The biggest downside is that cloud deploys can take a bit longer than an npm run dev command.
If you still want to test locally (at your own risk), you will need 2 terminal windows, one for frontend and one for backend.
To get the frontend built, run:
npm run devYou can now access the site at http://localhost:5173/ ; changes are tracked so every time you save code changes the site will be reloaded.
For a local test backend, run:
wrangler devThis will build a local version of the cloudflare Workers backend and any of the resources you have defined in your wrangler.toml file.
If you want to point to the actual cloud resources (e.g., R2 objects, KV storage, etc.) while testing locally, you can run with the remote flag:
wrangler dev --remoteYou can run d in the terminal window once built to open devtools.
- Use
wrangler dev --localfor local persistence (useful for testing D1 database) - Use
wrangler d1 execute wedding-rsvps-preview --local --file=./schema.sqlto set up your local database - Press
din the wrangler terminal to open devtools for debugging - Both frontend and backend support hot reloading
The project is configured to deploy to Cloudflare Pages & Workers. Pushes to dev, staging, or prod branches will automatically trigger a deployment.
- Font Customization Guide - How to use Google Fonts and custom fonts
- Theme System Guide - How to customize colors and apply theme presets
- Content Setup Guide - How to set up and adjust site content
- Gallery Guide - How to use and manage the image gallery system
- RSVP and Guest List Admin Guide - Comprehensive guide to managing RSVPs and guest information
- Admin Settings Guide - Complete guide to configuring and managing all site settings
- Project Journey - My personal experience building this project, tech choices, and opinions
I built this as an alternative to paid wedding websites, with the dual purpose of learning new technologies and creating something truly customizable for my own wedding.
I wanted to create something that would:
- Be completely free to host (or very close to it)
- Allow (mostly) full customization of the look and feel
- Let my non-technical partner manage content easily
- Provide a simple RSVP system with email confirmations
For my complete journey including detailed thoughts on the tech stack choices, challenges, and what I learned, check out the Project Journey document.
