Slack application for creating support rotations.
- NodeJS >= v18
- firebase-tools >= v11
- Java JDK 11 or higher
- ngrok (optional), for local development only.
For installing firebase-tools
npm install -g firebase-tools
Authenticate into Firebase using the Firebase CLI
firebase login
This repository contains different files and directories that are part of the entire Firebase stack. Here is a brief description of the most important files to take into account
The Firebase Emulator will be used for local development.
Create a ./data
directory for exporting data from the Emulator and storing it locally. Note that this directory is ignored
make emulator-setup
Start the Firebase Emulator by running the command below. This will ensure to locally start all the emulators
configured in the firebase.json
file.
This will also export all the data when the Emulator stops
make emulator-start
The data can be saved at any moment just by running
make emulator-export
Emulator | Port |
---|---|
UI | 9090 |
Cloud Functions | 9098 |
Firestore | 9097 |
Pub/Sub | 9096 |
Eventarc | 9094 |
The source code for the Cloud Functions
is located inside the ./functions
folder, along with detailed documentation
about them
The Firestore rules are handled inside the ./firestore.rules
file
Important: Be careful when editing this file, any carelessness can lead to unwanted manipulation or leakage of information.
The Firestore indexes are handled inside the ./firestore.indexes.json
file
Configure the following Scopes for the app:
Enable the Home Tab and Messages Tab from the Show Tabs section in the App Home page
Enable the Event Subscriptions and configure the URL for the events.
It will be (if using Firebase) something like https://<region>.<app-name>/events
Enable the Interactivity & Shortcuts and configure the URL
for the interactivity. It will be (if using Firebase) something like https://<region>.<app-name>/interactions
For the local development the easiest thing is to use ngrok, this will allow us to expose the Firebase Emulator's functions and connect the Slack App with our local machine.
Basically start the ngrok tunnel and copy the output URL to configure the Slack App.
make ngrok-tunnel