Skip to content

radon-h2020/radon-defuse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The data annotator and model builder for software defect prediction

Watch a tool demo on YouTube

How to set up

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);
    }
  }
}

Alt img

  • 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

Alt img

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

How to build

cd radon-defuse
docker-compose build

How to run

cd radon-defuse
docker-compose up

The application runs on http://localhost:4200/