web app development

How to host multiple Flutter web apps inside the same Firebase project?

Numerous Flutter-developed web app hosting within the same Firebase project is a realistic solution that takes advantage of Firebase Hosting’s support for multiple sites. Here’s a step-by-step guide for setting things up.

  1. Setup Firebase for Flutter web app hosting

First, make sure you have the Firebase CLI installed. If not, install it using the following command:

npm install -g firebase-tools

Log in to your Firebase account:

firebase login

Set firebase project

firebase use  – -add projectname 

  1. Initialize Firebase Hosting

Navigate to your project directory and initialize firebase hosting

firebase init hosting

During initialization, 

  • Hosting: Configure files for firebase hosting and set up github action deploys
  • Do you want to use a web framework : No
  • What do you want to use as public directory : build/web
  • Set No other questions
  1. Build Web

flutter build web

  1. Add Multiple Sites to Firebase Hosting

Firebase allows you to construct numerous sites within a single project. Each site can run a different Flutter web app.

firebase hosting:sites:create SITE_ID

Instead of SITE_ID give a hosting name.

  1. Configure firebase.json

Go to firebase project navigate to Hosting, select created hosting site then instruction, copy and paste to firebase.json inside your project.

Web apps hosting
  1. Deploy web app

firebase deploy –only hosting:sitename

Benefits of Using Firebase Hosting for Multiple Flutter Web Apps

Centralized Management: Multiple web app hosting and management will be done under a single Firebase project.

Scalability: Firebase Hosting scales automatically to handle your web apps’ traffic.

Security: Take advantage of Firebase’s security features like SSL, custom domains, and more.

Why Choose Sreyas For the Flutter Web App Hosting

At Sreyas IT Solutions, we are highly experienced in setting up and managing multiple web apps within a single Firebase project. Our project, Flutter Hub, which includes desktop, web, and mobile admin panels, is built using this very approach. Our team possesses extensive knowledge and expertise in Flutter development and Firebase integration, ensuring a smooth and efficient setup process.

We provide end-to-end support, covering everything from initial setup to deployment and ongoing maintenance. Our proficiency in Firebase Hosting allows us to offer scalable, secure, and high-performance solutions tailored to your business needs. Whether you’re launching multiple web apps or looking to streamline your web app hosting, Sreyas IT Solutions is here to assist you every step of the way.

By leveraging our services, you can focus on building your Flutter web apps while we handle the complexities of hosting and deployment. Contact us today to learn more about how we can help you achieve your goals with Firebase and Flutter.

Recent Blogs


Posted

in

by

Tags:

To Know Us Better

Browse through our work.

Explore The Technology Used

Learn about the cutting-edge technology and techniques we use to create innovative software solutions.