A collection of Firebase Extensions built by Invertase.

Overview

Firebase Extensions

A collection of Firebase Extensions built by Invertase.

New to Extensions? You can learn more at the Firebase Extensions product page.

Each directory in extensions folder of this repo contains the source code for an extension, and a README that explains how the extension works, including information about the APIs enabled, resources created, and the access granted to the extension.

List of Extensions

Want to install one of these? Visit each extension's linked README for installation instructions.

TODO


Built and maintained by Invertase.

Comments
  • chore(storage-image-processing-api): initial extension build

    chore(storage-image-processing-api): initial extension build

    Introducing a Storage image processing extension which provides an extensive image processing API with 30+ image mutation operations from resizing and colour manipulation to overlaying text and compositing images.

    The core image processing logic in the implementation is portable and therefore can be used in a variety of ways, e.g.,

    • reacting to a storage event to automatically process an image (operations could be defined via a metadata key)
    • adding image operations to Firestore and listening to a Firestore collection that would trigger these operations to be applied and output
    • etc

    but for this implementation, initially, interfacing with the image processing is provided as a URL safe HTTP GET API via a Cloud Function (and could be used for embedding e.g., <img src="<extensionFunctionUrl/process/...ops />).

    Accessing GCS bucket objects is done via tokenated download urls, e.g., getDownloadUrl() on Firebase SDKs or providing a path to a public object on the bucket, e.g., /foo/bar.png. URLs & paths must be URL encoded.

    Process Image URL Schema

    The URL schema to apply operations is built into url parts separated by /, each segment is then in the following format;

    /<operationName>~<optionName>:<optionValue>/
    
    • A single operation and it's options are defined per url segment. Multiple options are separated by ~.
    • Option values are automatically coerced into their appropriate types, e.g. '5' as a string would become 5 as a number, or '[1,2,3,4]' as a string would result in a JS array of numbers.
    • Truthy boolean options can just specify the <optionName> only to have the value default to true (think flags).
    • Operations that have no options or only have optional options can just specify the operation without options, e.g./negate/.
    • An input operation must be the first operation specified and is required.
    • An output operation must be the last operation specified and is required.

    Having the URL schema as url segments vs query parameters allows us to easily have operation ordering and support using multiple operations of the same type in a chain of operations. Additionally makes options clearer that they are for a specific operation.

    Example

    URL:

    /process/input~type:gcs~source:%2Fassets%2Fhexagons.jpeg/resize~width:500~height:500~fit:cover~position:left%20bottom/extend~all:20~background:tomato/extend~all:20~background:lightgreen/composite~top:20~left:26~tile~blend:screen~input:%2Fassets%2Finvertase.png/text~strokeWidth:4~top:75~left:75~font:95px%20tahoma~strokeColor:SeaGreen~textAlign:center~value:Hello%0DWorld~gravity:northwest~backgroundColor:pink~textColor:MediumSpringGreen~padding:15~borderWidth:5~borderColor:black/output~format:png
    

    Output:

    image

    Supported operations

    Operations pending implementation

    Not blocked or difficult by any means, just needs time invested to implement. These will be added in a future PR.

    • [ ] removeAlpha
    • [ ] ensureAlpha
    • [ ] extractChannel
    • [ ] joinChannel
    • [ ] bandbool

    TODO

    • [x] Finish up composite - currently sourcing from local files for testing purposes, should source from same sources that the input operation supports.
    • [x] Add remaining output operation format specific options, e.g., https://github.com/invertase/firebase-extensions/blob/storage-image-processing-api/extensions/storage-image-processing-api/functions/src/operations/output.ts#L32
    • [x] Add all available operation types (Currently Prs)
    • [x] Tests
    • [ ] Documentation
    • [ ] Input from GCS bucket path
    • [ ] Investigate possible alternatives to output to a bucket rather than returning to the requesting client (maybe a POST api)
    opened by Salakar 5
  • feat: adding html parse and utility functions

    feat: adding html parse and utility functions

    The current Api works as expected, however it is difficult to produce the query-string required to produce valid urls.

    This PR looks to augment the current implementation by adding utility functions as a solution.

    opened by dackers86 1
  • Issues escaping %2F in query params on url

    Issues escaping %2F in query params on url

    I have my images in subfolders on GCS / firebase storage with URL pattern /bucket/o/<folder>%2F<subfolder>%2F<file>.

    When I parse my operations with encodeURIComponent it escapes the %2F correctly as %252F which is sent to the cloud function.

    In the cloud function error logs I can see that the %252F is replaced by / instead of expected %2F which results in an invalid URL.

    opened by AxelSun 0
  • Update POSTINSTALL.md

    Update POSTINSTALL.md

    Using the variable of the final deployed function URL

    If the extension is deployed twice to the same project the URL will contain the extension instance id.

    opened by yamankatby 0
  • peerDep issue

    peerDep issue

    Error: node_modules/@invertase/image-processing-api/dist/types/types.d.ts:2:19 - error TS2307: Cannot find module 'sharp' or its corresponding type declarations.
    
    2 import sharp from 'sharp';
    
    opened by motiejunas 0
Owner
Invertase
Building awesome open source products. Maintainers of @notifee, @NodeRedis, @react-native-firebase, FlutterFire and more.
Invertase
NodeJS built CLI, allows to spell check in 14 languages, get Coleman-Liau Index and build hash Pyramids

Magic CLI ?? ?? NodeJS built CLI, allows to spell check in 14 languages, get Coleman-Liau Index and build hash Pyramids Installing Install dependencie

Lucas 3 Sep 27, 2022
Login of app to remind to drink water, using Firebase tools like Firebase Auth and Firebase Firestore

Water Reminder Login App Menu Contents Motivation Final Images How to download the project and run it? Technologies utilized Dev ?? Motivation This ap

Ilda Neta 10 Aug 22, 2022
This extensions will prompt you to remove any other extensions that we found as being broken and unmaintained.

octarine vscode extension This extensions will prompt you to remove any other extensions that we found as being broken and unmaintained. We do expect

42picky 4 May 27, 2022
Bookmarklet exploit that can force-disable extensions installed on Chrome. Also has a very fancy GUI to manage all extensions!

ext remover Bookmarklet exploit that can force-disable any extension installed on Google Chrome Instructions Here are the instructions to using this e

Echo 124 Jan 6, 2023
Collection of Rowy's templates for cloud functions cod snippets - including for derivative, action columns and extensions.

Rowy Templates Collection of Rowy's backend templates and code snippets for cloud functions - including for derivative, action columns and extensions.

Rowy 4 Nov 16, 2022
Utilities library built on top of Next.js providing feature extensions and helpers for common patterns

nextjs-utilites This library provides many helpful utilities for use in Next.js projects. Prerequisites This project requires NodeJS (version 8 or lat

Snehil K 5 Sep 7, 2022
A text editor built with react , firebase and quill

Welcome to Text-Editor ?? A simple text editor built with react,firebase v8 & quill ✨ Demo Install npm install Usage npm run start Run tests npm run t

Whirl 4 Aug 30, 2022
Twitter-Clone-Nextjs - Twitter Clone Built With React JS, Next JS, Recoil for State Management and Firebase as Backend

Twitter Clone This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn de

Basudev 0 Feb 7, 2022
Explore movies, tv shows. Built with Next.js, Tailwind CSS, Redux, Firebase, TypeScript, TMDB v3 API.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Sinan Bekar 11 Dec 4, 2022
This is a project manager X note taker built with Next js, Planetscale and Firebase.

Blaze is a project developed with NextJs, PlanetScale and Firebase. It's a task manager that doubles as a note taker To contribute to this project, Ki

ABDULLAH ABDULFATAH 35 Aug 8, 2022
This is a clone of Instagram built with NextJS, TailwindCSS, NextAuthJS and Firebase

Instagram This is a clone of instagram built with: This application is completely functional and responsive. Users can Sign in straightaway with Googl

Nutifafa Afi Attor 13 Sep 2, 2022
WebAssembly SQLite with experimental support for browser storage extensions

wa-sqlite This is a WebAssembly build of SQLite with experimental support for writing SQLite virtual filesystems and virtual table modules completely

Roy Hashimoto 260 Jan 1, 2023
A swiss army knife with lots of tools, extensions and (scriptable) enhancements for Visual Studio Code.

vscode-powertools A swiss army knife with lots of tools, extensions and (scriptable) enhancements for Visual Studio Code. ⚠️ ⚠️ ⚠️ NOTICE: If you have

e.GO Mobile 44 Nov 24, 2022
Reactive Extensions for Angular

RxAngular offers a comprehensive toolset for handling fully reactive Angular applications with the main focus on runtime performance and template rendering.

RxAngular 1.5k Jan 5, 2023
Vite-plugin-web-extension - A vite plugin for generating cross browser platform, ES module based web extensions.

vite-plugin-web-extension A vite plugin for generating cross browser platform, ES module based web extensions. Features Manifest V2 & V3 Support Compl

Ruben Medina 81 Dec 31, 2022
Bypass YouTube ads! (Web Extensions)

bytads Bypass YouTube ads! Supported YouTube Advertising Formats Skippable video ads, Overlay ads! Other ad formats will be supported soon. Usage Inst

Binit Ghimire 9 Apr 3, 2022
PHEX, but it shows up as Google Docs in the extensions. Useful if you're using it in class.

PHEX, but it shows up as Google Docs in the extensions. Useful if you're using it in class.

gemsvidø 3 Oct 28, 2022
Chrome Extensions are something which we use very frequently in our day-to-day life for example Grammarly

Chrome-Extension Chrome Extensions are something which we use very frequently in our day-to-day life for example Grammarly, In this project similarly,

Harshita sharma 97 Dec 14, 2022
Zigbee2MQTT Extensions

Zigbee2MQTT Extensions What are extensions? Read this article automations-extension.js Allows you to set up simple automations directly in z2m Example

Nikolay Vasilchuk 26 Jan 1, 2023
This is a repo for small, useful scripts and extensions

WinDbgCookbook This is a repo for small, useful scripts, extensions, and debugger data model "dx" queries. Feel free to add your own scripts or update

Tim Misiak 170 Dec 19, 2022