Top

Chatify Documentation

Chatify Admin is a web application that manages Chatify web and application data. We can add users, manage chat wallpaper, sponsored status, and admin credentials like admob, agoratoken etc.

Admin Setup

Note: As some of the app data are manage from firebase so we provide admin panel for easy management rather then go to firebase again and again and do changes or for searching

In Admin Panel we provide you to manage users list, Subscription User list, Characters dynamic, Subscription list, Category hide show managemnet, onboard screen and most important general config setting like credentials, logo.

Note: For config collection and plans you have to add data manually in firebase. For config see the steps in Firebase Rules and for plans see the Add Subscription

If you want to create new project run the following command to make one:

flutter create

If you haven't installed it, be sure to install it first.

If you want to change in Chatify admin you can do change and apply your firebase credentials in index.html and in main.dart

Follow below steps for firbase admin setup

1. Setup Firebase


  1. Login into current Firebase Account.
  2. Select Chatify App
  3. In Project Setting, scroll down and click Add App.
  4. One pop up will appear, in that select html tag () option.
  5. Now enter your app name
  6. Now check on checkbox for the web hosting and provide hosting name (web name) and click on Register app button
  7. Now select Use a <script> tag and copy code in your admin project inside web/index.html
  8. Now initalize firebase in main.dart
  9. Add Data according to your requirement.
  10. Note: or access your data in admin panel also upload your image you need to give permission to Firestore database for data, get update and Storage for Images Upload. For that see the Firebase Rules

2. Add Admin credentials for Login


  1. Before using app you need to add Admin credentials for Login.
  2. Go to firebase console https://console.firebase.google.com/
  3. Select Project, after that on left handel menu click Firestore Database
  4. Now click on Start Collection one pop-up will appear give collection name admin
  5. After that click on Auto-ID
  6. Add All below field in firebase
    
            No. Fields  -> datatype
            1.  userName -> string -> Your email for admin login
            2.  password -> string -> Your password for admin login
                                          
  7. You can add multiple admin credentials in this by adding as above fields

    Note: If you want to create a user for testing purposes, add (userName: admin@gmail,password : Admim1234) credentials in firebase. Follow STEPS 2 for add credentials

    Note: If you want to create a user for testing purposes, add (userName: admin@gmail,password : Admim1234) credentials in firebase. Follow STEPS 2 for add credentials

  8. Your firestore database look like below

Note: Remember to add all collection in firebase like users, config, characters, etc.. as per your requirement you can remove the page and controller

3. Install the firebase-tools CLI


  1. 🏃‍♀Skip this step if you already have firebase-tools installed.
  2. If you do not have npm, you must install that first.
  3. ☝️Note: If you are not sure whether npm is installed on your machine, run $ npm -v , and see if it lists a version number. If it does, then you already have npm.
    1. Installing npm on windows.
    2. Installing npm on linux.
    3. Installing npm on mac.
    4. Or download it directly from Node.js.
  4. Once npm is installed, run the following command to install the firebase-tools:
    npm install -g firebase-tools

    If you haven't installed it, be sure to install it first.

  5. firebase-tools is now installed!

4. Initialize Firebase hosting for your Flutter project


  1. Open a terminal and navigate to the root directory for your Flutter app and run this command to login:
    firebase login

    If you haven't installed it, be sure to install it first.

  2. ☝️Note: If you are already logged in and want to re-login as different account, first logout with:
    firebase logout

    If you haven't installed it, be sure to install it first.

  3. Follow the command prompt and the link in your browser. Accept the permissions by clicking Ok. When you return to your terminal you should see that you are now logged in:
  4. Next, run this command from the root directory of your Flutter app to initialize your Firebase project:
    firebase init

    If you haven't installed it, be sure to install it first.

  5. Use the arrow keys to navigate the cursor to Hosting and hit the spacebar to select it, then press enter. Now you will see this screen:
  6. Select Use an existing project by pressing Enter. Use the arrow keys to select the project you made in step 1.
  7. Build your app for web:
    flutter build web

    If you haven't installed it, be sure to install it first.

  8. Next, write build/web as the public directory and press enter, then enter n (for no) to select the single page app option
  9. Next, write y (for yes) to Configure as a single-page app (rewrite all urls to /index.html)? option
  10. Next, write n (for no) to deploy with Github option
  11. Next, write y (for yes) to overwrite 404.html option, If this option show
  12. Next, write y (for yes) to overwrite index.html option
  13. ☝️Note: After this step, 2 new files are created (.firebaserc and firebase.json) in your root directory. Check and make sure they are there. If not, check for errors in the firebase init step and retry.
  14. Step 4: Build and deploy!
  15. Again Build your app for web:
    flutter build web

    If you haven't installed it, be sure to install it first.

  16. This builds the necessary files in /build/web.
  17. Finally, run:
    firebase deploy

    If you haven't installed it, be sure to install it first.

  18. The hosting files are uploaded and hosted at your Firebase URL. You can follow the link in your terminal to your Flutter web project!