How to create an admin Web app with client Mobile app using Flutter

621

Since the application admin app is managing the same set of data, it will typically be part of the same Firebase project too. This is actually a quite common scenario, and I regularly add an admin web app to my Firebase project precisely for that purpose.

Share:
621
Coco
Author by

Coco

Updated on December 29, 2022

Comments

  • Coco
    Coco over 1 year

    Im currently working with Mobile app with firebase back end. I wonder how to build another admin Web app which should be hosted on the Web and pass data to the Mobile app. Should i open another project to build the Web app?Or build the both app within one project which should share with one firebase back end. Someone please guide me as Im clueless. Would appreciated for the sharing.

    • Abdelrahman Sherif
      Abdelrahman Sherif about 3 years
      You should use the same project for all apps that require the same back-end. Android, IOS, and web apps should be in the same project.
    • Coco
      Coco about 3 years
      Thanks but how would the Flutter differentiate the code for web app and mobile app? Since it will search the only one main method to run the entire application. But now i have two applications to be run. How is the project structure should be like for me to accommodate two applications?
    • Abdelrahman Sherif
      Abdelrahman Sherif about 3 years
      Hey Coco. Why would you want it to differentiate? Can you give us more details?
  • Coco
    Coco about 3 years
    Oh i see but how would i build the web app? I mean i build the mobile app and run it in one project, should i build the web app under the same project structure with the mobile app? How would the system differentiate the code for mobile and web app and run separately? I'm curious about this.
  • Frank van Puffelen
    Frank van Puffelen about 3 years
    You'd build the web app as you'd build any other web app. There is nothing special about it. That is probably also the answer to your last question: Firebase does not make a distinction of permissions based on what app/code is used to access it. If you want to grant an application administrator additional privileges, you'll have to identify then as an administrator in your own client-side code back-end code, and security rules. See stackoverflow.com/q/36452841 and the links I added at the top of stackoverflow.com/q/63237684.