Skip to content

Firebase

Jeffrey Chang edited this page Dec 31, 2023 · 2 revisions

Introduction

Details for Firebase implementation

Core Features

  1. Data

    • Storage: Utilizes a Google sheets called MPRC members to store member names and email addresses. AppEngine runs script every 12 hours to update roles of members in a collection called members in Firestore.
  2. Routes

    • Admin Page Route at runmprc.com/admin, this interface enables administrators to manage user data and general information.
    • Authentication The user login and signup portal, located at runmprc.com/login, facilitates login and signup.
    • Events Future events page, located at runmprc.com/events, only fetches information for members, all events, or if the user is not a member, only the events set in a Firestore collection called events with member_only = false.
  3. Firebase Cloud Functions

    • updateMemberRole: Dynamically adjusts member roles in Firestore based on an array of email addresses, assigning the “member” role.
    • createMemberOnSignUp: Integrates new user data into the Firestore members collection upon registration.

To Do

  • Firebase Remote Config Integration
    • Considerations: This approach may introduce complexity due to dependencies on remote content retrieval, potentially complicating the static page content management.
  • Need to build out pages for events, admin, and login.
  • A function to annually reset member roles per year
  • Secure the firebase functions and keep API key in an environment (.env) file
Clone this wiki locally