🚀 AI Functions
With Backendflow's AI Cloud Functions, you can get started with server-side logic quickly!
What are Cloud Functions? Do I need them?
Oftentimes, nocode developers might wonder if they need Cloud Functions (or a backend server) for their apps to function properly. In many cases, you could get by without Cloud Functions by just using the standard CRUD (Create, Read, Update, Delete) functionalities that many no-code app builders like Flutterflow offer. But, in some cases, a backend function is needed. Here are some examples:
You want to handle payments
In most cases, payments require a backend to your frontend mobile app. Why? Because the "private key" that handles responses and updates to your payments infrastructure is an extremely sensitive value that must not be present on your customer's phones or laptops. That value should be securely stored on a server, separate from your client software. Why? Let's say someone manages to read the files of your Flutterflow app, and can detect a string that looks like a Stripe secret key. The attacker can then use that secret key to make purchase orders on your behalf, or move money from your Stripe balance to their own.
You want to handle complex querying and logic
Sometimes, a simple query is not enough. In the 🔎 Fuzzy Search article, we cover some cases where fuzzy search is needed over standard Firebase querying. But, that's not the end of the story. In some cases, you may need to perform multiple queries in sequence, and doing this on your frontend quickly turns into a headache.
Example: You want to have a button that gets all of your user's orders between September 1st and October 1st, combines their total spend, generates a PDF, and sends it along as an email to the user. This involves a series of complex work that usually developers are hired to do. So, don't feel frustrated if this is a challenging task. That's why we built Backendflow, to help you achieve these solutions and deploy them easily.
You are dealing with background tasks
Sometimes, you may want a function to execute in the background when the user isn't on their phone or laptop. Maybe you want to automatically pull information of stock prices, or send automated emails in a recurring fashion. Regardless, a backend server is needed to execute these actions because the client (mobile app or website) is not always alive.
You want to have strong Firebase Security Rules
In many cases, nocoders forget to setup their Firebase security rules strong enough to prevent attackers from gaining access to their information. The best course of action is to set up as strict security rules as possible on your frontend (like in Flutterflow's Firebase settings), and then leave the impossible actions to the backend where security is higher. For example, you may want to query user data from your backend server whenever possible, and let your users collection's security rules be as strict as possibles so users can't access each other's data freely.
Some more examples:
You need to setup Webhoooks to listen to 3rd party activity.
You have other secret keys for services like Twilio and Sendgrid.
You want to setup special analytics for your app.
You want to utilize complex Firebase Auth and Storage features.
Why Cloud Functions, specifically?
Cloud Functions are what Firebase like to call their microservices feature. Each "function" essentially acts as a mini-server which starts up and runs any time it is called. They are actually called just like any other API.
Firebase Cloud Functions have the benefit of having full access to your database, authentication, and storage, without the worry of security rules, which makes it necessary for some tasks. However, setting up and deploying Firebase Cloud Functions requires advanced knowledge of programming and deployment, as well as knowing how to test properly.
🚀 Backendflow's AI Functions
Here's where Backendflow comes in: We help you write and deploy your Cloud Functions within seconds. You have the full benefit of Firebase's Cloud Functions, without the hassle of having to learn how to code, deploy, and test them.
Here's how you can get started:
To get started:
Click on the "AI Functions" tab
Click on "+ Trigger Function".
In the Create Function view, set the name of your function.
Set any inputs (and their types) if you need them.
Then, in plain english describe the type of backend function you want.
Click Generated Function, and see the code being generated.
Now that you have the function written, you can edit it if you want. Then, go ahead and test the function with the inputs, if you've added any.
Finally, save the function, and check the API details to add the API to your app (or download the API bundle to upload directly to Flutterflow).
We hope this adds a level of development speed to your Flutterflow apps! With Backendflow's AI Cloud Functions, you can quickly add Firebase Cloud Functions logic to your Flutterflow and nocode apps.
Last updated