-
Notifications
You must be signed in to change notification settings - Fork 3
Firebase
Jeffrey Chang edited this page Dec 31, 2023
·
2 revisions
Details for Firebase implementation
-
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 calledmembers
in Firestore.
-
Storage: Utilizes a Google sheets called
-
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 calledevents
with member_only = false.
-
Admin Page Route at
-
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 Firestoremembers
collection upon registration.
-
- 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