2022-10-26 22:03:15 +03:00
2022-07-17 20:44:10 +03:00
2022-06-22 23:39:15 +03:00
2022-07-17 21:47:04 +03:00
2022-06-05 18:36:26 +03:00
2021-10-20 19:56:04 +03:00
2021-12-01 09:43:02 +02:00
2022-06-23 18:17:22 +03:00
2022-10-26 22:03:15 +03:00

Wedding application

Supports relatively secure way to collect visitor registrations to Firebase without backend. Also offers wedding info website in multiple languages (instructions how it works coming later...).

Local development

root/directory$ npm install && npm start

Firestore setup

You need tree collections. invited, submitted and visitors.

Rules:

service cloud.firestore {
  match /databases/{database}/documents {
    match /visitors/{visitor} {
      allow create: if exists(/databases/$(database)/documents/invited/$(request.resource.data.invitationId))
      	&& !exists(/databases/$(database)/documents/submitted/$(request.resource.data.invitationId));
    }
    // Uncomment when fetching data with scripts under /tools
    //
    // match /visitors/{visitor} {
    // 	allow read: if true;
    // }
    // match /submitted/{submitted} {
    // 	allow read: if true;
    // }
    // match /invited/{invited} {
    // 	allow read: if true;
    // }
    match /submitted/{submitted} {
      allow create: if exists(/databases/$(database)/documents/invited/$(request.resource.id))
    }
  }
}

It's important to remember to comment right after script is run. While uncommented all your data is available to public internet!

Deployment

I recommend installing Firebase CLI to automate the setup.

For manual configuration see /.github/workflows. You need to add following secrets:

  • GITHUB_TOKEN
  • FIREBASE_SERVICE_ACCOUNT_LINTUJAMASLO

Further reading: https://firebase.google.com/docs/hosting/github-integration

Usage

Feel free to fork, use and change at will. Hope this repo will help and inspire you!

Description
No description provided
Readme MIT 5.5 MiB
Languages
TypeScript 70.6%
SCSS 16.9%
JavaScript 8.5%
HTML 4%