Watch a tool demo on YouTube
The application relies on Firebase's Firestore Database and Storage. Therefore, the following steps are mandatory to set it up
-
Step 1: Clone the repository with
git clone https://github.com/radon-h2020/radon-defuse
-
Step 2: Create a Firebase project. Give it a name of your choice
-
Step 3: Create a new Firestore database. Please note: for quick setup and testing/research create the database in test mode instead of production mode. This way you do not have to set specific security rules. If it is in production mode, go to
Firestore Database | Rules
and allow read and write if request.time < timestamp.date(YYYY, MM, DD). For example,
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if
request.time < timestamp.date(2023, 12, 30);
}
}
}
- Step 4: To initialize Firebase in your app, you need to provide your app's Firebase project configuration. You can obtain your Firebase config object at any time Copy the Firebase configuration object containing keys and identifiers for your app in defuse/src/environment<.prod>.ts
Here's the file defuse/src/environment.ts with example values:
export const environment = {
production: false,
firebase: {
apiKey: "AIzaSyDOCAbC123dEf456GhI789jKl01-MnO",
authDomain: "myapp-project-123.firebaseapp.com",
databaseURL: "https://myapp-project-123.firebaseio.com",
projectId: "myapp-project-123",
storageBucket: "myapp-project-123.appspot.com",
messagingSenderId: "65211879809",
appId: "1:65211879909:web:3ae38ef1cdcb2e01fe5f0c",
measurementId: "G-8GSGZQ44ST"
}
};
Note: it is recommended to use different configuration objects for development (defuse/src/environment.ts) and production (defuse/src/environment.prod.ts) environments
- Step 5: To use Firebase Storage, you need to generate a private key file for your Firebase service account:
- In the Firebase console, open Settings > Service Accounts
- Click Generate New Private Key, then confirm by clicking Generate Key
- Rename the JSON file containing the key as
.key.json
and copy it the folder backend Besides, make sure to create a Storage, similarly to the Firestore Database.
![image](https://private-user-images.githubusercontent.com/18099827/263028659-e1edb6b8-b803-4aed-9bdf-ad7323e27436.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTU0ODAsIm5iZiI6MTcyNTU5NTE4MCwicGF0aCI6Ii8xODA5OTgyNy8yNjMwMjg2NTktZTFlZGI2YjgtYjgwMy00YWVkLTliZGYtYWQ3MzIzZTI3NDM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDAzNTk0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4YmMxODJkNDk5NTg5YTM1ZDFlODcyMmIxZWVjMjg4MWRlYTE3MjQwODY2ZjIxNmFiYzEyNDQ1NDEwOTQ2NGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IvT7YZbpa_Cft6X48rfbLAcT1sRe8W-OKZ69BN5ePE0)
cd radon-defuse
docker-compose build
cd radon-defuse
docker-compose up
The application runs on http://localhost:4200/