GithubHelp home page GithubHelp logo

yamankatby / firebase-extensions Goto Github PK

View Code? Open in Web Editor NEW
33.0 2.0 1.0 3.79 MB

A collection of Firebase Extensions designed to help you build better apps faster.

License: Apache License 2.0

TypeScript 100.00%
extensions firebase firebase-extensions firestore og-image-generator open-graph-protocol

firebase-extensions's Introduction

Hi there ๐Ÿ‘‹

I build ๐ŸŒย websites and ๐Ÿ“ฑย mobile apps โ€” ๐Ÿค–ย Android and ๐ŸŽย iOS โ€” with coffee andย love.

  • ๐ŸŒฑ Iโ€™m currently learning ...
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on ...
  • ๐Ÿค” Iโ€™m looking for help with ...
  • ๐Ÿ’ฌ Ask me about ๐Ÿง‘โ€๐Ÿ’ป JavaScript ecosystem, โ˜๏ธ Google Cloud Platform, ๐Ÿ”ฅ Firebase
  • ๐Ÿ“ซ How to reach me: ๐Ÿ“ง [email protected], ๐Ÿ“ฝ youtube.com/@react-native, ๐Ÿฆ twitter.com/yamankatby
  • โšก Fun fact: I started coding by reading a 1500-page book - I didn't learn anything from it.

Also, check out my ๐Ÿ”— LinkedIn and ๐Ÿ’ฌ StackOverflow profiles or find me in your terminal npx yaman.

firebase-extensions's People

Contributors

pavelgj avatar yamankatby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pavelgj

firebase-extensions's Issues

Migrate to Nx?

It's faster and also Lerna is built on top of it ??!! why not?

Planning `analytics-slack-notifier`? extension

Basically, whenever an event (specified by the user) is logged in Firebase Analytics (Google Analytics for Firebase) the extension will be triggered to send a message (notification) to the slack channel (specified by the user).

The trigger function:

functions.analytics.event('in_app_purchase').onLog((event) => {
  // Send the notification message to the user-specified channel in Slack. 
});

Note The example from https://firebase.google.com/docs/analytics/extend-with-functions

Here's an example of using slack API in cloud functions, which might be helpful ๐Ÿ‘‰ https://github.com/firebase/functions-samples/tree/main/github-to-slack

What next?

Planning `firestore-one-to-many` extension ๐Ÿง 

Implements the one-to-many relationship between Firestore collections.

Params ๐Ÿ› ๏ธ

Target Collection Path

The path to the collation containing the documents represents the first side of the relation, the "one" side.
Example: authors

Destination Collection Path

The path to the collation containing the documents represents the second side of the relation, the "many" side.
Example: books

Target Ref Field Name

The name of the field in the destination collection that contains the reference of the document in the target collection.
Example: authorId

Destination Ref Field Name

The name of the field in the target collection where the id of the destination document will be stored.
Example: bookId
Default: id

Target Data Field Name

The name of the field in the target document where the list of the destination documents will be stored.
Example: books

Destination Data Field Name

The name of the field in the destination document where the data from the target document will be stored.
Example: author

Fields to copy from the target collection

A comma-separated list of field names to copy from the target collection to the destination collection.
Example: name,biography

Fields to copy from the destination collection

A comma-separated list of field names to copy from the destination collection to the target collection.
Example: title,summary

Target document deletion behaviour

What should happen to the documents in the destination collection when a related target collection is deleted?

Add Backfill function

The Backfill function is an onInstall lifecycle event handler, which will run after installation is completed and handle the sync process for the existing documents.

Furthur disccustion

  • Shoud it be onInstall or onConfigure?
    • If onConfigure what should happen to the previous documents?

Progress

Extensions require Apache 2.0 headers in all source code files

Submitted extensions will require the following header in all source code files, to be covered by the Apache 2.0 license:

/*
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

EDIT: let me double check this and get back to you :)

Error installing OG Image Generator extension in Firebase

When installing the extension using the default configuration in region europe-west3 (or europe-west2, or us-central1), I get the following error:

; RESOURCE_ERROR at /deployments/firebase-ext-generate-og-image-1/resources/onInstall: {"ResourceType":"gcp-types/cloudfunctions-v1:projects.locations.functions","ResourceErrorCode":"400","ResourceErrorMessage":"Build failed: npm ERR! Cannot read property 'chrome-aws-lambda' of undefined\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /www-data-home/.npm/_logs/2023-05-11T06_25_39_232Z-debug.log; Error ID: beaf8772"}; RESOURCE_ERROR at /deployments/firebase-ext-generate-og-image-1/resources/api: {"ResourceType":"gcp-types/cloudfunctions-v1:projects.locations.functions","ResourceErrorCode":"400","ResourceErrorMessage":"Build failed: npm ERR! Cannot read property 'chrome-aws-lambda' of undefined\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /www-data-home/.npm/_logs/2023-05-11T06_25_39_916Z-debug.log; Error ID: beaf8772"}

Tapping "retry installation" completes without another error, however the functions have "Error in Deployment" against them, so the install isn't actually successful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.