# Deploying the Web Dashboard

# 1. Configure Your Firebase Project

Before starting this section, you need to have configured a Firebase project and connected your CardinalKit iOS app to it. Please refer to 'Set up Application Infrastructure' if you haven't done this yet, then return to this section. If you have, then proceed to the next step:

  • Go to firebase.google.com (opens new window) and sign in with the same account that you set up for the mobile app.

  • Select the same Firebase project that you created previously.


  • Then select Project Settings in the configuration menu.


  • Now select Add app to create a new web application and associate it with Firebase.


  • Click on the web app symbol.


  • Complete the Firebase form to register a new web app.


  • Copy the generated Firebase configuration.

  • Open the cardinal-kit-web/.env File and replace add the following Firebase config values.

    • VUE_APP_FIREBASE_API_KEY = firebaseConfig.apiKey
    • VUE_APP_FIREBASE_AUTH_DOMAIN = firebaseConfig.authDomain
    • VUE_APP_FIREBASE_DATABASE_URL = firebaseConfig.databaseURL
    • VUE_APP_FIREBASE_PROJECT_ID = firebaseConfig.projectId
    • VUE_APP_FIREBASE_STORAGE_BUCKET = firebaseConfig.storageBucket
    • VUE_APP_FIREBASE_MESSAGING_SENDER_ID = firebaseConfig.messagingSenderId
    • VUE_APP_FIREBASE_APP_ID = firebaseConfig.appId

# 2. Deploy Firebase Functions

To automatically transform the data from Open mHealth format to FHIR format it is necessary to deploy the Firebase functions found in the project.

npm install -g firebase-tools
firebase login

# Init Firebase Functions on "firebase" folder

Don't override any functions folder

firebase init

# Then Deploy Firebase functions

firebase Deploy --only functions

# 3. Run Vue Project

Once we have configured firebase complements, the next step is to run the service of your website locally. You can also deploy it to the cloud using Firebase Hosting (opens new window).

 cd cardinal-kit-web

Once in the folder, the first thing is to install all the dependencies that the Vue project needs. For this we will use npm:

 npm install

After having everything installed and configured, we can run the project.

 npm run serve