Our wedding website built with Astro, React, and Vercel. The site includes a guest authentication flow, RSVP collection, countdown timer, gallery, and a polished event landing page for our wedding weekend.
This project is a wedding website for Ian and Riley, with a secured guest experience:
- Guest sign-in using a phone number and invitation code
- Session-based access to private event content
- RSVP submission for invited guests
- Wedding date and venue details
- Countdown to the event
- Photo gallery and event timeline
- Vercel-ready Astro configuration
- Astro
- React
- TypeScript
- Vercel
- Google Apps Script for RSVP/authentication backend
- Node.js 20 or later
- npm 10 or later
-
Clone the repository:
git clone git@github.com:rcfroomin/wedding.git cd wedding -
Install dependencies:
npm install
-
Create a local environment file:
touch .env.local
-
Add the required environment variables:
SESSION_SECRET=<64-character hexadecimal string> RSVP_SCRIPT_URL="https://script.google.com/macros/s/AKfycbyINeNWZxm-9H1GA0oOX4IVFbsojPCMJrBDM46N5WW97f-8UWdSgWFNL7-CF5OhUwhG/exec" RSVP_API_SHARED_SECRET=<shared-secret>
Notes:
SESSION_SECRETmust be a 64-character hexadecimal value (32 bytes). The app validates it with a strict regex.RSVP_SCRIPT_URLis the endpoint used by the app for authentication and RSVP submission.RSVP_API_SHARED_SECRETis the shared secret used by the Google Apps Script backend.
-
Start the development server:
npm run dev
-
Open the site in your browser:
http://localhost:4321
npm run devRuns the Astro site in development mode.
npm run buildBuilds the production site.
npm run previewServes the production build locally for previewing.
.
├── public/
│ └── images/
├── src/
│ ├── components/
│ ├── data/
│ ├── layouts/
│ ├── lib/
│ ├── pages/
│ └── styles/
├── astro.config.mjs
├── package.json
├── tsconfig.json
├── .gitignore
├── README.md
└── .env.local
Key files:
src/data/wedding.ts— wedding metadata ex. names, date, venue, and RSVP deadlinesrc/pages/index.astro— main site page and content sectionssrc/lib/auth.ts— guest session creation and validationsrc/lib/appsScript.ts— backend service integration for RSVP/authenticationsrc/pages/api/auth.ts— login endpoint for guest authenticationsrc/pages/api/rsvp.ts— RSVP submission endpoint
Update the site content in src/data/wedding.ts:
export const wedding = {
couple: {
partner1: "Riley",
partner2: "Ian",
},
date: {
display: "July 1, 2028",
iso: "2028-07-01T16:00:00-07:00",
},
venue: {
name: "Merrywood Farm",
city: "Oregon City",
state: "Oregon",
},
contact: {
email: "hello@example.com",
},
rsvp: {
deadline: "July 1, 2027",
},
};Main page content and sections live in src/pages/index.astro.
The visual theme and custom styles are in src/styles/global.css.
Add or replace gallery and hero images in public/images/.
This project includes a private guest experience:
- Guests enter a phone number and invitation code
- The app sends those credentials to the configured Google Apps Script URL
- If authenticated, the app creates an encrypted session cookie
- Authenticated guests can view the site and submit RSVP responses
- RSVP answers are validated and forwarded to the backend service
This flow is implemented in:
src/pages/api/auth.tssrc/pages/api/rsvp.tssrc/lib/auth.tssrc/lib/appsScript.ts
This project is configured for Vercel.
To deploy:
- Push the repository to GitHub
- Import the project into Vercel
- Add the same environment variables in the Vercel project settings:
SESSION_SECRETRSVP_SCRIPT_URLRSVP_API_SHARED_SECRET
- Deploy the app
- The project uses an Astro server output configuration.
- A secure
SESSION_SECRETis required for guest session cookies. - The RSVP backend is handled through this Google Apps Script
