In the project you downloaded from CodeCanyon there is a folder with name Cloud Functions.
Inside this folder, we have put all the functions that are necessary for running the React App Builder and also helper function that the App Needs.
Configuration
First, we need to do some configuration before uploading the Cloud Functions.
In the folder CloudFunction/functions there is file config.js.
Edit it with any text editor.
SENDGRID_API_KEY - Used for the send mail to client
- Create SendGrid account and getting an API_KEY.
- Put that key in YOUR_SENDGRID_API_KEY
//The Sendgrid KEY --- CHANGE THEM WITH YOUR OWN SENDGRID
exports.SENDGRID_API_KEY="YOUR_SENDGRID_API_KEY";
fromEmail - Email that will be the sender of the emails. Should be validated email in SendGrid
//Email Config exports.fromEmail="contact@mobidonia.com";
Email Subject and Email Text
Then you will find Email Subject and Email Text variables for ios and android.
These values are used when we notify the user that their app is created.
You can modify them to suit your needs.
They have two placeholder fields
userName - Client Name
linkToApp - Link to android .apk file
cryptoString - String used to salt the Apple Password of the user
Change the value of this string to make it even more secure.
Security is important, so we do the following things
- We encrypt and salt the user password
- We delete the store encrypted password when we have compiled the app
//Firebase configuration
Same as you did when you have initialized the ReactAppBuilder. We will need the configuration code for your Firebase Real-time Database
Here are the instructions.
NEXT: STEP 2 -Publishing Cloud Functions