RealTime Interactive Security Status

RISS Hub Services

RISS Privileged Administrator Set-Up

RealTime Interactive Security Status Logo

RISS Privileged Administrator Set-Up Instructions

RISS Privileged Administrator App Firebase Hosting & Configuration Guide

Download the pdf

This guide helps you create a Firebase project, enable Realtime Database and Email Authentication, and host a configuration .json file on Firebase Hosting for the RISSPriv.Admin app.


🧰 Helpful Commands

Format: commands with format like:  rm ~/.firebaserc are to be run from the Terminal, go to Apps, search and open Terminal, copy and paste the command, hit return

Show Hidden Files in Finder:

  • Press Command + Shift + .

Delete .firebaserc in Terminal:

rm ~/.firebaserc

Exit a running terminal command:

  • Press Control + C

Fix npm Permissions:

sudo chown -R $(id -u):$(id -g) ~/.npm


PART 1: Set Up a Firebase Project (with RTDB & Email Auth)

🔹 A. Create a Firebase Project

  1. Visit Firebase Console
  2. Click Create a project
  3. Name it after your group/location (e.g., RISS-Elementary)
  4. Disable Gemini in Firebase
  5. Disable Google Analytics
  6. Wait for project creation

🔹 B. Register an iOS App

  1. Click iOS+
  2. Bundle ID: com.ed.RISSPrivAdmin
  3. App nickname: RISSPrivAdmin
  4. App Store ID: TBDXXXXXX
  5. Click Register app

🔹 C. Download Config File

  1. Download GoogleService-Info.plist
  2. Record the following values, these are needed for a Configuration.json file we will create in a minute:
    • GOOGLE_APP_ID
    • GCM_SENDER_ID
    • API_KEY
    • PROJECT_ID
  3. Add Firebase SDK
    • Select <Next>, nothing else
  4. Add initialization code
    • Select <Next>, nothing else
  5. Next Steps
    • <Continue to console>

🔹 D. Enable Email/Password Authentication

  1. Go to Build > Authentication
  2. Click Get Started
  3. Enable Email/Password and click Save
    • Note: a verification mail is sent those who create accounts to assure that the person uses the email name owns the email name.

🔹 E. Set Up Realtime Database  – NOT Firestore Database

  1. Go to Build > Realtime Database
  2. Click Create Database
  3. Choose region: us-central1
  4. Choose Start in locked mode

🔹 F. Set Security Rules

Paste the following under the Rules tab:

{

  “rules”: {

    “.read”: “auth != null”,

    “.write”: “auth != null”

  }

}

Click Publish.

🔹 G. Add Privileged Admin Code

  1. Go to the Data tab
  2. Click + next to root
  3. Type in “PrivAdminCodes”, then Select “+”
  4. Add a sub-key (e.g. your name) and its value (your admin code)
    • Type in your name, id, whatever, then for value, Type the code you will use as a Privileged Administrator, and Select “ABC” (for string), then Press “Return”

Done with Part 1 – Great Job!


PART 2: Firebase Hosting for Configuration JSON                                           

Information: https://firebase.google.com/docs/hosting/quickstart

  • Homebrew is a popular package manager for macOS (and Linux).
  • When you install Homebrew on Apple Silicon Macs, it’s installed in /opt/homebrew/ instead of the traditional /usr/local/.
  • Your shell (like zsh or bash) needs to know where to find the brew command.
  • This is done by adding Homebrew’s binary path to the PATH environment variable.
  • The eval “$(/opt/homebrew/bin/brew shellenv)” command sets up the environment variables Homebrew needs (including adding its bin directory to PATH).

🔹 Install Homebrew (if not installed)

https://brew.sh

https://github.com/Homebrew/brew/releases/tag/4.5.8

Homebrew-4.5.8.pkg

After reinstalling Homebrew, Homebrew package installer will print:

To add Homebrew to your PATH, add to your shell profile (e.g. ~/.bash_profile or ~/.zprofile): ⁃ eval “$(/opt/homebrew/bin/brew shellenv)”

🔹 Add Homebrew to zsh

  1. Open Terminal and run this command to open .zprofile in a text editor:

nano ~/.zprofile

  • Add this line to the file (or make sure it’s the only one like it):

eval “$(/opt/homebrew/bin/brew shellenv)”

Why?

Adding this line ensures that when you open a terminal, your shell knows where to find Homebrew and its installed commands, so you can run brew and other tools without errors.

  • Save and exit:
    • Press Control + O (to write the file),
    • Press Enter (to confirm),
    • Then press Control + X (to exit).
  • Apply it to your current Terminal session immediately:

eval “$(/opt/homebrew/bin/brew shellenv)”

🔁 After that:

Try:

brew doctor

and:

firebase –version

You should see responses that indicates a Version or that your computer is Ready to Brew.

If not, stop and consult AI, cut and paste your terminal info into AI and it should be able to find out what needs correction.

🔹 Install Node.js and Firebase CLI

Use Homebrew to install Node.js:

brew install node

Then install Firebase CLI via npm:

npm install -g firebase-tools

Verify installations

npm -v

firebase –version

Check that Homebrew works:

brew doctor

You should see something like:
Your system is ready to brew.

You should see responses that indicates a Version or that your computer is Ready to Brew.

If not, stop and consult AI, cut and paste your terminal info into AI and it should be able to find out what needs correction.


PART 3: Deploy JSON to Firebase Hosting

1. Go to Your Project Directory

cd ~/Public/RISS/RISSA

2. Initialize Firebase Hosting

firebase init hosting

Choose:

  • Use an existing project (select your Firebase project)
  • Public directory: public
  • Single-page app: No
  • GitHub deploys: No
  • Overwrite index.html: No

👉 Optional, if run previously the above will link to a default Project, to choose a different Project other than the default, run:

firebase use –add

  • This will let you select the correct Firebase project from your Firebase Console
  • You can give it an alias (like rissa, site2, etc.)
  • It updates .firebaserc in the current folder

Then:

firebase use (Project name you just added)

3. Clear the Users/Username/public/  folder except for your configuration.json file.

  • It should look like the below and has the configuration information from Part 1. If you have trouble making a .json file, suggest using AI.
  "RISSB": {
    "GOOGLE_APP_ID": "1:926543173077:ios:30c949a16c653c0425d95c",
    "GCM_SENDER_ID": "926543173077",
    "API_KEY": "AIzaSyCV9Xa5HIBidlO-U6NqLa6578fiI_JVYAo",
    "PROJECT_ID": "riss-elementary",
    "DATABASE_URL": "https://riss-elementary-default-rtdb.firebaseio.com/"
  }
}
  • RISSB – name of the Configuration as defined by the User (you), this can be any name including those of a Project, Group, or Location, all caps, text only, no special characters.
  • GOOGLE_APP_ID, GCM_SENDER_ID, API_KEY, PROJECT_ID are from Par1 .
  • DATABASE_URL – this is the https from the Realtime Database on your Project, go to the Firebase console, select your Project, in your Project select the Realtime Database, and on the right you will see an https to the Realtime Database.

4. Deploy

firebase deploy

After a few seconds, it will output a URL like:

Hosting URL: https://your-project-id.web.app

Your JSON file will be available at:

https://your-project-id.web.app/yourjson.json


✅ Done! Your Firebase project is now live, with Authentication, Realtime Database, and static Hosting configured for use with RISSPriv.Admin.