Firebase Module

Content Type: Module
Categories:

Overview

The Firebase Module makes a connection to your Firebase project and makes it possible to do the following; 1. Create a connection to the Firebase Realtime Database. Making it easy to use a REST call (with for example a message definition) to fill and maintain the Realtime database. 2. Create a connection to the Firebase Storage. Making it easy to store images and documents in Firebase and generate URL's instead of having the files stored in Mendix. 3. Make it easy to manage, maintain and authenticate users in Firebase via microflows.

Documentation

Features

  • Create a connection to the Firebase Realtime Database functionality. Make easy to use Message Definition to fill and maintain the Realtime database.
  • Create a connection to the Firebase Storage. Making it easy to store images and documents in Firebase and generate URL's instead of having the files stored in Mendix.
  • Make it easy to manage, maintain and authenticate users in Firebase via microflows.

Implementation

  • Create a new Firebase Project.
  • Add the Admin page to the navigation.
  • Implement the java-actions where needed. You can use the example pages to see some implementations of these actions.

Getting the JSON FIle:

Go to the Firebase console. 

Project overview -> Service accounts -> Generate PrivateKey

Upload this file in the Admin page as the Firebase JSON File.

Setting up the database:

Go to the Firebase console. 

Database -> Create new database.

You have now created the database.To find the realtime database URL click next to the big title at the top saying Database and click on Realtime Database. Here you can find the URL for the Database.

Setting up the Firebase Storage:

Go to the Firebase console. 

Click on Storage and create the storage if you havn't yet. You should now be on the page with the Storage URL. ALERT: Make sure you remove the 'gs://' at the start and the / at the end when putting the URL in Mendix.

Setting up Firebase Users:

Go to the Firebase console. 

Click on Authentication.

Now you have to setup a login method. For most usecases Anonymous is fine since you generate AccessTokens with the Java actions and set the Database Rules to only interact with data that has the same UserID. (check the documentation for Database Rules). After setting up atleast one login method you can use the User java-actions.

Future plans:

  • Making a custom uploader widget to only upload to firebase and not to mendix.

Releases

Version: 1.2.0
Framework Version: 7.23.12
Release Notes: - Updated example API call with fallbacks - Extended Firebase User functionality with new java actions - UserGetByEmail - UsersGetAll - UserUpdate - Updated the firebase settings to work with environments
Version: 1.1.1
Framework Version: 7.23.4
Release Notes: Updated Appstore Icon
Version: 1.1.0
Framework Version: 7.23.4
Release Notes: - Added the RemoveBytesFromMendix java-action, making it very easy to remove the not needed image/file contents stored in Mendix that have also been uploaded to Firebase. - Updated the modeler version to 7.23.4
Version: 1.0.1
Framework Version: 7.22.2
Release Notes: Removed some dependencies that were no longer necessary and updated a jar file that created conflicts with other heavily used modules in the Mendix Appstore. !!! Make sure to remove the google-http-client-1.24.1.jar file before updating if you already had this module installed !!!
Version: 1.0.0
Framework Version: 7.22.2
Release Notes: First release.