Evacuation assistance is a product designed to make evacuations easier by creating a smartphone application that can help users involved in an evacuation communicate better and faster.
We used bluetooth positioning sensors for indoor positioning.
Note that this is a student project and was used as a learning exercise (at least the first three months of this project was!).
A bunch of new technologies were used such as: Postgres, Vue, Ionic, Java Spring and many more!
git clone https://github.com/Insanityandme/evacuation-app.git
Our application is divided into three seperate parts:
- backend-evacuation
- frontend-user
- frontend-admin
Read our installation guides below to be walked through installing and configuring Evacuation Assistance.
- Download postgresql server: https://www.postgresql.org/download/
- Run the postgresql server
- Open pgadmin and create a database with the name evacdb
- Create a file named application.properties in: backend-evacuation/src/main/resources with the following code with your postgres username and password:
spring.datasource.url = jdbc:postgresql://localhost:5432/evacdb
spring.datasource.username = (insert postgres username)
spring.datasource.password = (insert postgres password)
server.port = 8081
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation = true
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = create # change to update for data to persist
# App Properties
bezkoder.app.jwtSecret = evacSecretKey
bezkoder.app.jwtExpirationMs = 86400000
- Create an account at https://firebase.google.com/
- Register an android project into your firebase account
- Download the google-services.json file and then rename the config file privateKey.json
- Put it in the directory: backend-evacuation/src/main/resources
- Download maven CLl: https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
- cd into root folder backend-evacuation
- Start the server by typing:
mvn spring-boot:run
- If everything has gone well the server should be running on port 8081.
- Start by cd into frontend_user/evacuation-assistant
- run
npm install
if you don't have npm: https://nodejs.org/en/download - create a file called resourceUrl.ts in frontend_user/evacuation-assistant/src/data and include this:
export const resourceUrl = 'http://localhost:8081'
5. install ionic:
npm install -g @ionic/cli
6. install capacitor in the root of your app
npm i @capacitor/core
npm i -D @capacitor/cli
- run
ionic serve
to see it live hosted locally in your browser of choice - NOTE: it should primarily be used on smartphones and developed there (instructions below)
- cd into evacuation-assistant/frontend_admin
- run:
npm run install
- create a file called resourceUrl.ts in frontend_admin/evacuation-assistant/src/data and include this:
export const resourceUrl = 'http://localhost:8081'
- run ionic serve and you're good to go!
Prerequisites: https://developer.android.com/studio
- start by running
ionic cap add android
in frontend_user/evacuation-assistant - run
ionic build
(builds the whole application to android) - run
ionic cap copy
(ensure local web assets gets into the android folder) - run
ionic cap sync
(ensure plugins are added) - run
ionic cap open android
(opens android studio) - Connect smartphone of choice and install on your phone
- If everything has been correctly installed you should have a device running on your phone!
- when you have built your android application in ionic
- download the google-services.json file again from your firebase android project
- put it in the directory evacuation-assistant/android/app
- create a directory called raw in evacuation-assistant/android/app/src/main/res
- add the file custom.mp3 into this folder (which I have given you in a folder called android_assets)
- open android studio and add this code into AndroidManifest.xml:
<!-- Request permission to display notifications -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Use a custom sound for notifications -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
- in build.gradle (android) remove everything and copy this:
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.google.gms:google-services:4.3.15'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files }
}
apply from: "variables.gradle"
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
- in build.gradle (Module: app) add this code to dependencies:
implementation platform('com.google.firebase:firebase-bom:32.0.0')
- Also add this right below the depencencies:
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
- npm install
- ionic build
- ionic capacitor add ios
- ionic capacitor sync ios
- ionic capacitor open ios
- Follow the tutorial in this link:
- https://ionicframework.com/docs/developing/ios
- When Xcode is opened, select the project root, in this case its called 'App'.
- Be sure to have logged in to your apple developer account in the settings pane. 3. Press CMD+, to open settings pane. 4. in the 'Accounts' tab, if not accounts have been added, press the '+' button to add your apple id that is registered with the Apple developer account which requires an annual fee (this is only required to make sure that the Push Notification feature works). 5. After signing in, press on 'Download Manual Profiles' button followed by pressing on 'Manage Certificates' button, then press the '+' icon and select 'Apple Development'.
- Go to 'Signing & Capabilities' tab, select in the 'team' field your developer account.
- If not already registered, press 'register device' to register your device in your developer account.
- Make sure the 'Signing Certicate' section says: 'Apple Development: ...'
- https://ionicframework.com/docs/developing/ios
- Follow the tutorial in this link:
- https://ionicframework.com/docs/native/push-notifications
- Go to 'AppDelegate.swift' and add the following lines of code:
- https://ionicframework.com/docs/native/push-notifications
NotificationCenter.default.post(name: .capacitorDidRegisterForRemoteNotifications, object: deviceToken)
}
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error)
}
- Follow the tutorial in this link:
- https://capacitorjs.com/docs/v3/ios/configuration?_gl=1*e2v9xu*_ga*ODkyMDUxMTkwLjE2ODM5NjUyMTg.*_ga_REH9TJF6KF*MTY4NTg5NzU5MC4zMS4xLjE2ODU4OTg1NTcuMC4wLjA.#setting-capabilities
- Go to 'Signing & Capabilities' tab, select the '+ Capability' button and choose 'Push Notifications'
- https://capacitorjs.com/docs/v3/ios/configuration?_gl=1*e2v9xu*_ga*ODkyMDUxMTkwLjE2ODM5NjUyMTg.*_ga_REH9TJF6KF*MTY4NTg5NzU5MC4zMS4xLjE2ODU4OTg1NTcuMC4wLjA.#setting-capabilities
- Follow the tutorial in this link:
- https://firebase.google.com/docs/cloud-messaging/ios/first-message
- Create a firebase account
- Register an iOS app with Firebase
- Download the GoogleService-Info.plist
- Place it in the Xcode App directory or
\evacuation-assistance\ios\App\App\GoogleService-Info.plist
- Upload the APNs authentication key to the Firebase and provide the 'Key ID' and 'Team ID'.
- Follow the 'Add Firebase SDK' section followed by adding
import FirebaseCore import FirebaseFirestore import FirebaseAuth'
lines to the AppDelegate File.
- https://firebase.google.com/docs/cloud-messaging/ios/first-message
- In the Info.plist file, add the following keys and values to allow for bluetooth functionality:
- UIViewControllerBasedStatusBarAppearance
- true
- NSBluetoothAlwaysUsageDescription
- Uses Bluetooth to connect and interact with peripheral BLE devices.
- UIBackgroundModes
- bluetooth-central
- UIViewControllerBasedStatusBarAppearance
- Now with every code change, re-run ionic build followed by ionic capacitor sync ios, then in Xcode build and run the project on your device.
- Don't forget to add the App Icon to the Assets folder.
- Don't forget to add the Sound file to the App's main directory for the custom notification sound to work properly.
![]() |
![]() |
![]() |
![]() |


















You are welcome to contact me at [email protected] if you have any questions on how to setup this environment. There might be some mistakes in our installation guide and I apologize for that if that's the case.