-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Initial version written by Nicholas Wheeler (11/6/2023)
Updates and clarification written by Keigen Godlaski (2/12/2025)
Brought to github by Alec Byrd (2/19/2025)
Firebase is a BaaS (Backend-as-a-Service) offered by Google that will host an application for creators and integrate many great features into the application through easily-includable packages, such as “tree-shakable” module inclusion with JavaScript files when building a web application. (What we did here as of 10/30/2023).
This is a great primer to what Firebase is capable of in terms of creating a website, and all Firebase projects can be expanded to further ventures such as iOS applications, Android Applications, Unity projects, etc…
While this video is a bit dated in the techniques used to import modules and organize files, the core idea and concepts of connecting a project to your VS Code environment are still there, so it is highly recommended.
To properly develop and ship code for the Theta Tau website to then host on the Firebase project, a few pieces of software need to be installed on your local machine first.
- VS Code
- npm
- Node.js
- Miami University Google account with Firebase access
It is also recommended to install the “Firebase Explorer” extension in VS Code to help manage aspects of the Firebase project.
- Create a local folder to store the project.
- Become a member of the Theta Tau Miami GitHub to access the source code.
- Download the current source code of the Firebase-Theta-Tau-Miami project and place it in your folder.
- Install the GitHub VS Code extension and initialize the folder as a local repository.
Run the following commands in a bash terminal in the correct local folder:
git init
git clone https://github.com/ThetaTauMiami/Firebase-Theta-Tau-Website.gitA project owner must grant ownership permissions to your account via Firebase. Navigate to:
firebase.google.com > Console > ThetaTauMiami > Settings > Project settings > Users and permissions
Install Firebase CLI:
npm i firebase-tools -gThen log in:
firebase loginNext, initialize Firebase in the project:
firebase initImportant selections during initialization:
- Select "Hosting: Configure files for Firebase Hosting" and "Emulators: Set up local emulators for Firebase products"
-
Use an existing project (Choose
thetataumiamiuniversity (ThetaTauMiami)) - Enter
"public"for the public directory - Enter
"N"for single-page app - Enter
"N"for GitHub automatic builds and deploys - Do not overwrite the
index.htmlfile - Allow only the "Hosting" emulator
- Accept default options for remaining prompts
To locally serve the website:
firebase serveTo deploy changes to Firebase:
firebase deploy- The
publicfolder contains all the deployed code. - The
_includes,_layouts, andassetsfolders contain supporting files such as CSS, images, and additional HTML/JS files.
These pages require manual updates to HTML files and Firebase deployment:
- Home (index.html)
- Gallery (gallery.html)
- Events (events.html)
- Leadership (leadership.html)
- Recruitment (recruitment.html)
- Contact (contact.html)
These interact with Firebase and Cloud Firestore:
- Login
- Account
- Profile Update
- Photo Upload
-
Points Update
These use Firebase SDKs to pull and store user data.
When making changes to the website it is best practice to follow standard GitHub best practices.
- Make your changes on a branch related to a focused topic
git branch -c {branch_name}- Commit frequently and state what is exactly being done
git add .
git commit -m '{descriptive_message}'- When you have your local changes made push them to the remote branch on GitHub
git push origin HEAD- Make a pull request on the GitHub website to merge your branch into main
- View the preview created through the CI/CD pipeline. This will allow you to sample view what the site will look like once merged to main
- optional, but recommended Assign the merge to be reviewed by another person. This will help insure no problematic changes are made during edits
- Only Admins can access the Points Update page.
- Admins are managed in Google Firestore > config > roles collection.
- The website verifies user permissions by checking Firebase UID access.
Best Practices:
- Only Exec members, tech team, or chairs should have admin access.
- The permission array can be modified for future feature enhancements.
- Automate final points export with calculations and email dispatch.
- Integrate Google Calendar using JavaScript.
- Create a brother catalog with contact info.
- Rework Points System to be event-based.
- Implement event reviews with user-uploaded photos.
- Add important document storage.
- Check the domain name.
- Contact the domain owner for renewals and redirects.