mobile_app_open
mobile_app_open copied to clipboard
simple web UI for submitted data
Yes, most of us know how to read json files, but that's not convenient. We used to have some prototype web site, should we start from previous prototype or start a new one.
Do we need a website? Currently, the app can upload, download and display the results from the same account stored as JSON files in Firebase. We can modify it to download any results stored in Firebase.
Firebase Web hosting + React should be good enough. @RSMNYS please help have a prototype for this task.
Hi guys! Here I've deployed the starter web app: https://mlcommons-8be22.web.app. It's linked to my firebase. Username/password: [email protected]/Qwerty1234(. The app has base routes: login, benchmarks, benchmark details. So far haven't worked on the list, and details UI, that's why I'm showing the text only. Please try.
Hi guys! Did more adjustments. Please check, creds and url are the same. Also pushed the code to the branch. The project is linked to the test firebase account. Also added the README how to link to another firebase project and deploy. Working to add the filtering.
Hi guys! Did more adjustments. Please check, creds and url are the same. Also pushed the code to the branch. The project is linked to the test firebase account. Also added the README how to link to another firebase project and deploy. Working to add the filtering.
Please add some device/machine information to the results
@nathanw-mlc: please add @RSMNYS to the access list of the firebase project for the mobile app
@nathanw-mlc: please add @RSMNYS to the access list of the firebase project for the mobile app
@RSMNYS should already have access to the mobile app firebase project through his MLCommons Google Workspace account. Is he needing elevated permissions?
@nathanw-mlc: please add @RSMNYS to the access list of the firebase project for the mobile app
@RSMNYS should already have access to the mobile app firebase project through his MLCommons Google Workspace account. Is he needing elevated permissions?
yes, I need the elevated permissions to manage the hosting.
- [x] If we create an account when submitting (instead of anonymous one), we should be able to use that account.
@RSMNYS Please find a way to not expose the API key (e.g. like reading the values from the environment variables like here) https://github.com/mlcommons/mobile_app_open/security/secret-scanning/1
Just found out that we can set up a GitHub Action to deploy the website to Firebase automatically on new PR. I will do the setup for it.
Just found out that we can set up a GitHub Action to deploy the website to Firebase automatically on new PR. I will do the setup for it.
Will @RSMNYS still need elevated permissions if we use this solution?
In this case we need to expose the project's API key and other settings from Firebase. Generally that info is not secure, but let me know if we are ok to reveal this: @freedomtan, @anhappdev.
In this case we need to expose the project's API key and other settings from Firebase. Generally that info is not secure, but let me know if we are ok to reveal this: @freedomtan, @anhappdev.
We should not expose the API key, at least not storing it in the code. Please update file firebase-config.ts so it can read the values from the environment variable like this:
const firebaseConfig = {
apiKey: process.env.REACT_APP_FIREBASE_WEB_API_KEY,
authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN,
// ...
};
Then we can store the key and other values in env:
export REACT_APP_FIREBASE_WEB_API_KEY=abcd
export REACT_APP_FIREBASE_AUTH_DOMAIN=acbd
@anhappdev it's clear, but how the GitHub will know this to build the app?
@anhappdev it's clear, but how the GitHub will know this to build the app?
I will store it as a GitHub secret (https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions)
Understood! Thanks.
@nathanw-mlc here are the env variables for the web app:
REACT_APP_FIREBASE_WEB_API_KEY REACT_APP_FIREBASE_AUTH_DOMAIN REACT_APP_FIREBASE_DATABASE_URL REACT_APP_FIREBASE_PROJECT_ID REACT_APP_FIREBASE_STORAGE_BUCKET REACT_APP_FIREBASE_MESSAGING_SENDER_ID REACT_APP_FIREBASE_APP_ID REACT_APP_FIREBASE_MEASUREMENT_ID
@nathanw-mlc here are the env variables for the web app:
REACT_APP_FIREBASE_WEB_API_KEY REACT_APP_FIREBASE_AUTH_DOMAIN REACT_APP_FIREBASE_DATABASE_URL ...
I already added these as GitHub secrets for this repo.
This is the URL for the web UI. https://mobile-app-build-290400.web.app
We can also use a custom domain / URL if @nathanw-mlc provides us one.
This is the URL for the web UI. https://mobile-app-build-290400.web.app
We can also use a custom domain / URL if @nathanw-mlc provides us one.
Hey Anh, where would I set that up?
This is the URL for the web UI. https://mobile-app-build-290400.web.app We can also use a custom domain / URL if @nathanw-mlc provides us one.
Hey Anh, where would I set that up?
You can follow this guide: https://firebase.google.com/docs/hosting/custom-domain
https://mlperf-mobile.mlcommons.org/