Skip to content

JAllsop/Anora-Luc-Wedding

Repository files navigation

Anora & Luc Wedding Website

Preview Build License: CC BY-NC 4.0

Welcome to the official repository of the wedding website for Anora and Luc! This project is built using Flutter to provide a seamless and delightful user experience. Hosted on Cloudflare Pages, the website offers fast and reliable performance. The responsive design ensures that the website looks stunning on various devices, including web browsers, mobile phones, and tablets.

Website and Responses

NOTE: I have removed all the actual data as this now just a showcase website anyone can view and respond to.

Features

  • Responsive Design: The website is designed to function beautifully on any device, whether accessed from a desktop computer, a smartphone, or a tablet.

  • Event Information: Easily access essential details about the wedding, including the date, time, venue, and other relevant information.

  • RSVP: Quickly RSVP through the website, which helps in planning for the big day and ensuring all attendees are accounted for.

  • Wedding Party: Get acquainted with the key individuals involved in the wedding through the "Wedding Party" page. Find out who the parents, best men, maids of honor, brides people and grooms people are.

  • Explore Surrounds: Discover the local attractions, restaurants, and activities around the wedding venue through the "Explore Surrounds" page.

  • Song Request: Contribute to the celebration by suggesting songs you'd like to hear during the wedding.

  • Photo Gallery: Relive the journey with the couple through a captivating photo gallery, featuring moments from engagement to the wedding ceremony.

Technologies Used

  • Flutter: The frontend of the website is built using Flutter, a versatile and powerful UI toolkit that enables the creation of a consistent and captivating user interface across various platforms.

  • Cloudflare Pages: The website is hosted on Cloudflare Pages, providing fast and reliable hosting. Cloudflare's global network ensures quick loading times for guests around the world.

  • Cloudflare Workers: Cloudflare Workers are used to handle backend functionalities such as processing RSVPs and managing the gift registry, ensuring seamless connectivity between the frontend and backend.

  • GitHub Actions: GitHub Actions are set up for continuous integration and deployment. This streamlines the development process, ensuring that changes are automatically built and deployed to Cloudflare Pages.

Cloudflare Workers

The backend functionality is powered by three Cloudflare Workers located in the cloudflare-workers directory:

Workers Overview

1. RSVP and Song Requests (saveRSVP.js)

Handles wedding guest responses and song requests with multiple endpoints:

  • /reply - Processes RSVP submissions including attendance confirmation, food preferences, and transport options
  • /request - Manages song requests from guests
  • /get - Retrieves previously submitted RSVP data using client ID

2. Menu Submissions (menuSubmission.js)

Processes food menu selections with validation for required fields including guest details and meal preferences.

3. Google Sheets Authentication (updateGoogleAccessToken.js)

Automatically refreshes Google Sheets API access tokens using JWT authentication. Runs on a scheduled basis to ensure continuous API access.

Required Environment Variables

Each worker requires the following environment variables to be configured in Cloudflare:

Database & Storage

  • D1_DB - Cloudflare D1 database binding for storing submissions
  • KV_DB - Cloudflare KV namespace for caching responses and access tokens
  • KV_ACCESS_TOKEN - Cloudflare KV namespace for storing Google API tokens

Google Sheets Integration

  • SHEET_ID - The Google Sheets spreadsheet ID
  • SHEET_NAME_RESPONSES - Sheet name for RSVP responses
  • SHEET_NAME_REQUESTS - Sheet name for song requests
  • CLIENT_EMAIL - Google Service Account email
  • PRIVATE_KEY - Google Service Account private key (PEM format)

Setup Instructions

  1. Create Cloudflare Workers for each JavaScript file
  2. Configure D1 Database with tables for responses, requests, and food
  3. Set up KV Namespaces for data caching and token storage
  4. Create Google Service Account with Sheets API access
  5. Configure environment variables in Cloudflare Workers dashboard
  6. Set up cron trigger for the access token refresh worker

The workers integrate seamlessly with the Flutter frontend, providing real-time data persistence and Google Sheets synchronization for wedding planning management.

Getting Started

If you're interested in running the website locally, follow these steps:

  1. Clone this repository: git clone https://github.com/yourusername/wedding-website.git
  2. Install Flutter and its dependencies if you haven't already.
  3. Install the required packages: flutter pub get
  4. Run the development server: flutter run
  5. Select the browser to run on
  6. Access the website locally at http://localhost:port (port is random)

License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.

For details, see the LICENSE file.


Thank you for checking out the repo for Anora and Luc's wedding website!

About

Explore the wedding website of Anora and Luc, featuring essential event details, RSVP options, a song request feature, and a captivating photo gallery. Built using Flutter and hosted on Cloudflare Pages.

Topics

Resources

License

Stars

Watchers

Forks

Contributors