Firebase Extensions Quickstart

Fireship · Beginner ·📰 AI News & Updates ·6y ago

Key Takeaways

The video demonstrates how to use Firebase Extensions, a new feature that allows developers to install and configure pre-built extensions for their Firebase projects, including image resizing, text translation, and distributed counters, with no coding required.

Full Transcript

today at firebase summit a big new feature was announced firebase extensions imagine if the cloud had something like a wordpress plug-in system where you can install or opt in to specific features based on the needs of your application and with this initial release we have nine plugins that handle things like image resizing distributed counters transactional email and more and once again firebase has made a bunch of my past videos obsolete I'm not too english Masshole career so today i want to show you how to not write code by using firebase extensions if you're new here like and subscribe and consider becoming a pro member at bioship i/o and if you're serious about building apps on the firebase platform to get started you'll need to have a firebase project and if you go down here to the bottom you'll see a new option for extensions let's go ahead and install the first one we see to resize images now unfortunately for me about a year ago I created a video about resizing images with a cloud function but this extension provides the exact same functionality with no effort on my part and it's tested and maintained by these smart people at Google let's go ahead and click install and you'll see it takes us to a page to configure the extension the first thing it'll have you do is review the architecture or API is enabled by this extension when it comes to image resizing you'll need to have a cloud storage bucket and then a cloud function to handle the resizing after a file is uploaded to that bucket go ahead and click Next and then it will have you review the access granted to the extension firebase will automatically create the appropriate service account that has IM roles assigned for whatever resources this extension needs in the third step is where we configure and customize the behavior of the extension in this case we'll go ahead and have it generate thumbnails for 200 500 and 1000 pixel sizes and we'll go ahead and specify a directory in the bucket named thumbs which is where the thumbnails will be saved it will take a few minutes to install because what it's doing under the hood is deploying a cloud function to your project after it's complete you'll be able to review the configuration details and then if you go to the functions tab you'll see that cloud function deployed in your functions list and if you're really interested in how the function works under the hood you can go to the GCP console - cloud functions click the source tab and then you can see the full source code for the function and all of the extensions are open sourced so you can see them on github as well and hopefully in the near future they'll open the system 2/3 party developers meaning you could extend and potentially monetize the firebase platform as a developer but I'm really just speculating there I have no idea if or when that'll happen so now that we have this extension installed let's go into our storage bucket and upload a file there and see what happens you can see our storage bucket is completely empty and I'll go ahead and upload the cover image for this video after the upload is complete we'll go ahead and refresh the page and you'll now see we have a Thums directory here that has magically resized this image to the sizes that we specified so if you have an app that handles high resolution file uploads this extension gives you an incredibly simple pipeline for resizing and optimizing those images now let's go ahead and take a look at a second extension that makes a another one of my videos obsolete and that is the translate text extension this particular extension works with Google's cloud translation API and that is a paid API although it does have a free tier so you need to at least have a billing account set up and be on the blaze plan for this firebase project we can go ahead and follow these same steps as before but I'm also going to add Japanese and Arabic language codes to the translations and there's over 800 different language codes for you to choose from now this extension will be looking for a collection and firestore will go ahead and call that comments and then when that document is created it will look at the text field on the document and then translate the text into an object called translated let's go ahead and give that a couple minutes to install and then head over to the firestore database will create the comments collection add a document to it that has a text property on the document and after its created it should automatically translate that text [Music] now this should happen in a matter of seconds but nothing actually happened here so what went wrong our firebase extensions broken or did I do something wrong we can find out by going to the cloud function logs what you'll notice is that most of the translations ran properly except for the Japanese language code and so this was actually my fault JP is not the proper language code it's actually J a and I wanted to show you this because extensions aren't failsafe if you don't add the right configuration options they won't work properly we can fix the issue by going back to the extension tab and reconfiguring the extensions parameters I'll just go ahead and change the language code from JP to J a and then we just have to wait a couple minutes for those changes to propagate or for the underlying cloud function to be redeployed now if we go back to firestore and add a new comment to the comments collection you'll see it translates the text and no more than two seconds so it is incredibly awesome to just enable that kind of feature with a click of a button now I have to admit that building a translation feature from scratch really isn't that big of a deal it's just a simple API call that you can make from your back-end code so the translation extension is really just a minor convenience in my opinion however something that's not so trivial is setting up a distributed counter when you have an extremely high volume of writes going to a single document so normally firestore limits you to about one write per second which you can burst above but what if you have a social media app and you have an extremely viral post that's generating 10,000 likes per second handling a massive volume of writes like that would require you to shard the database and also carefully aggregate the count across those shards needless to say it's not exactly an easy process but now there is an extension for that let's go ahead and install the distributed counter extension and it's going to install three different cloud functions in this project then after the installation is finished there will be a few additional steps to take on your part in this particular case you'll need to update your firestore security rules so that right access is granted to that shards collection and then it will also give you a command to run to set up a cron job in your Google cloud platform project and its job is to ping the controller function to make sure that these shards are scaled properly and last but not least it gives you a script that you can use in your front-end code so it's also extending the firebase job script SDK now this is a feature that's not required by a lot of apps but if your app is seeing a huge volume of Rights you'll probably want to get this implemented very quickly because it means your app is scaling up quickly and having something packaged up and ready to go like this is extremely valuable I'm gonna go ahead and wrap things up there I feel like I don't have much else to talk about because extensions are just so easy but in the future we'll look at some more complex examples with actual front-end framework integrations and make sure to let me know what you think about firebase extensions in the comments thanks for watching and I will talk to you soon [Applause] [Music]

Original Description

Get started with the amazing new Firebase Extensions 🌩️ feature announced today. Deploy serverless solutions to the cloud with the click of a button. https://fireship.io Firebase Extensions: https://firebase.google.com/products/extensions/ #firebase #serverless Take the Firebase quiz 🤓 iOS https://itunes.apple.com/us/app/fireship/id1462592372?mt=8 Android https://play.google.com/store/apps/details?id=io.fireship.quizapp Upgrade to Fireship PRO at https://fireship.io/pro Use code lORhwXd2 for 25% off your first payment.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Fireship · Fireship · 0 of 60

← Previous Next →
1 Angular 4 Development and Production Environments with Firebase
Angular 4 Development and Production Environments with Firebase
Fireship
2 OAuth with Angular and Firebase Tutorial
OAuth with Angular and Firebase Tutorial
Fireship
3 Anonymous Authentication with Angular and Firebase - Lazy Registration
Anonymous Authentication with Angular and Firebase - Lazy Registration
Fireship
4 Angular Router Guards for Firebase Users
Angular Router Guards for Firebase Users
Fireship
5 Angular Firebase CRUD App with NoSQL Database Tutorial
Angular Firebase CRUD App with NoSQL Database Tutorial
Fireship
6 Upload Files from Angular to Firebase Storage
Upload Files from Angular to Firebase Storage
Fireship
7 How to Deploy an Angular App to Firebase Hosting
How to Deploy an Angular App to Firebase Hosting
Fireship
8 Sharing Data between Components in Angular
Sharing Data between Components in Angular
Fireship
9 Loading Spinners for Asynchronous Firebase Data
Loading Spinners for Asynchronous Firebase Data
Fireship
10 Angular 4 Transactional Email with Google Firebase Cloud Functions
Angular 4 Transactional Email with Google Firebase Cloud Functions
Fireship
11 Firebase Database Rules Tutorial
Firebase Database Rules Tutorial
Fireship
12 Autocomplete Search with Angular4 and Firebase
Autocomplete Search with Angular4 and Firebase
Fireship
13 Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Fireship
14 Angular Drag-and-Drop File Uploads to Firebase Storage
Angular Drag-and-Drop File Uploads to Firebase Storage
Fireship
15 Text Translation with Firebase Cloud Functions onWrite and Angular 4
Text Translation with Firebase Cloud Functions onWrite and Angular 4
Fireship
16 Custom Usernames with Firebase Authentication
Custom Usernames with Firebase Authentication
Fireship
17 Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Fireship
18 Simple Pagination with Firebase and Angular 4
Simple Pagination with Firebase and Angular 4
Fireship
19 How to Connect Firebase Users to their Data - 3 Methods
How to Connect Firebase Users to their Data - 3 Methods
Fireship
20 Add Toast Message Notifications to your Angular App
Add Toast Message Notifications to your Angular App
Fireship
21 Facebook-Inspired Reactions System with Angular and Firebase
Facebook-Inspired Reactions System with Angular and Firebase
Fireship
22 Learn NgModule in Angular with Examples
Learn NgModule in Angular with Examples
Fireship
23 Lazy Loading Components in Angular 4
Lazy Loading Components in Angular 4
Fireship
24 Stripe Checkout Payments with Angular and Firebase - Part 1
Stripe Checkout Payments with Angular and Firebase - Part 1
Fireship
25 Process Stripe Payments with Firebase Cloud Functions - Part 2
Process Stripe Payments with Firebase Cloud Functions - Part 2
Fireship
26 Selling Digital Content in Angular with Stripe Payments - Part 3
Selling Digital Content in Angular with Stripe Payments - Part 3
Fireship
27 Angular 4 Full Text Search with Algolia - Part 1
Angular 4 Full Text Search with Algolia - Part 1
Fireship
28 Algolia with Firebase Cloud Functions - Part 2
Algolia with Firebase Cloud Functions - Part 2
Fireship
29 Firebase Phone Authentication in Angular 4
Firebase Phone Authentication in Angular 4
Fireship
30 Top 7 RxJS Concepts for Angular Developers
Top 7 RxJS Concepts for Angular Developers
Fireship
31 Learn Angular Animations with 5 Examples
Learn Angular Animations with 5 Examples
Fireship
32 Advanced Firebase Data Filtering (Multi-Property)
Advanced Firebase Data Filtering (Multi-Property)
Fireship
33 Realtime Maps with Mapbox + Firebase + Angular
Realtime Maps with Mapbox + Firebase + Angular
Fireship
34 Angular Reactive Forms with Firebase Database Backend
Angular Reactive Forms with Firebase Database Backend
Fireship
35 Send Push Notifications in Angular with Firebase Cloud Messaging
Send Push Notifications in Angular with Firebase Cloud Messaging
Fireship
36 Top 7 Ways to Debug Angular 4 Apps
Top 7 Ways to Debug Angular 4 Apps
Fireship
37 Infinite Scroll with Angular and Firebase
Infinite Scroll with Angular and Firebase
Fireship
38 Use TypeScript with Firebase Cloud Functions
Use TypeScript with Firebase Cloud Functions
Fireship
39 Realtime Graphs and Charts with Plotly and Firebase
Realtime Graphs and Charts with Plotly and Firebase
Fireship
40 Role-Based User Permissions in Firebase
Role-Based User Permissions in Firebase
Fireship
41 User Presence System in Realtime - Online, Offline, Away
User Presence System in Realtime - Online, Offline, Away
Fireship
42 Location-based Queries with GeoFire and Angular Google Maps
Location-based Queries with GeoFire and Angular Google Maps
Fireship
43 Angular ngrx Redux Quick Start Tutorial
Angular ngrx Redux Quick Start Tutorial
Fireship
44 Angular Ngrx Effects with Firebase Database
Angular Ngrx Effects with Firebase Database
Fireship
45 Progressive Web Apps with Angular
Progressive Web Apps with Angular
Fireship
46 Angular Ngrx with Firebase Google OAuth User Authentication
Angular Ngrx with Firebase Google OAuth User Authentication
Fireship
47 RxJS Quick Start with Practical Examples
RxJS Quick Start with Practical Examples
Fireship
48 Send SMS Text Messages with Twilio and Firebase
Send SMS Text Messages with Twilio and Firebase
Fireship
49 Firebase Database Performance Profiling
Firebase Database Performance Profiling
Fireship
50 Native Desktop Apps with Angular and Electron
Native Desktop Apps with Angular and Electron
Fireship
51 Subscription Payments with Stripe, Angular, and Firebase
Subscription Payments with Stripe, Angular, and Firebase
Fireship
52 Firestore with AngularFire5 Quick Start Tutorial
Firestore with AngularFire5 Quick Start Tutorial
Fireship
53 Angular HTTP Client Quick Start Tutorial
Angular HTTP Client Quick Start Tutorial
Fireship
54 Google Sign-In with Firestore Custom User Data
Google Sign-In with Firestore Custom User Data
Fireship
55 Star Review System from Scratch with Firestore + Angular
Star Review System from Scratch with Firestore + Angular
Fireship
56 Angular Chatbot with Dialogflow (API.ai)
Angular Chatbot with Dialogflow (API.ai)
Fireship
57 Learn @ngrx/entity and Feature Modules
Learn @ngrx/entity and Feature Modules
Fireship
58 Infinite Scroll Pagination with Firestore
Infinite Scroll Pagination with Firestore
Fireship
59 Faster Firestore via Data Aggregation
Faster Firestore via Data Aggregation
Fireship
60 Contentful - CMS for Angular Progressive Web Apps
Contentful - CMS for Angular Progressive Web Apps
Fireship

The video teaches how to use Firebase Extensions to install and configure pre-built extensions for Firebase projects, including image resizing, text translation, and distributed counters, with no coding required. The extensions provide a simple and efficient way to deploy serverless solutions to the cloud.

Key Takeaways
  1. Create a Firebase project
  2. Install the Firebase Extensions
  3. Configure the extensions
  4. Deploy the extensions to the cloud
  5. Test the extensions
💡 Firebase Extensions provide a simple and efficient way to deploy serverless solutions to the cloud, with no coding required, making it easier for developers to build and scale their applications.

Related AI Lessons

When AI Asks for More Electricity Than a Country Can Imagine
AI's increasing power consumption is causing concerns, learn why it matters for data centers and energy supply
Medium · AI
You Are Not Behind. The World Is.
You're not behind, the world is still adapting to AI, and it's okay to take your time to learn and grow
Medium · AI
Career choice with the advent of AI - pure Computer Science or learn software with a background of core engineering area
Learn how to choose between a Computer Science and Engineering career path or combining programming with a core engineering background in the age of AI
Dev.to AI
The AI Hype Cycle: Calm Before the Next Breakthrough?
Understand the AI hype cycle to anticipate the next breakthrough and make informed decisions
Medium · Programming
Up next
Motorist saved by human chain | 9 News Australia
9 News Australia
Watch →