User Tools

Site Tools


en:resources:app

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:resources:app [2023/07/13 13:42] – created initial skeleton s-schroecken:resources:app [2023/07/25 11:59] (current) – Added GIT links s-schroeck
Line 3: Line 3:
 ===== The Inform@Risk Smartphone App ===== ===== The Inform@Risk Smartphone App =====
  
-insert short description of the app and its technical components here+The smartphone app of the project Inform@Risk aims to both distribute information about a variety of topics concerning current risk status, sensor values and general project information. It was developed using the [[https://framework7.io/|Framework7]] cross platform framework and is supplied with data by an Apache2 web server running a [[https://laravel.com/|Laravel]] installation. 
 + 
 +This page contains instructions for setting up development environments on either Debian based Linux distributions or MacOS and only contains instructions specific to the project, i.e. the correct version of Android to compile against must be present in the operating system. Packages were installed via homebrew on Mac. 
 + 
 +A more detailed explanation of individual software components and structure is available via the {{app_technical_overview.pdf|Overview PDF File}} 
 + 
 +Both components of the app stack are licensed under the [[https://opensource.org/license/mit/|MIT License]]
  
 ===== Smartphone App ===== ===== Smartphone App =====
  
-link to source here+https://mygit.th-deg.de/tcf-public/informatrisk_app 
 + 
 +Install global packages: 
 +<code>npm install -g framework7-cli</code> 
 +<code>npm install -g cordova</code> 
 +<code>apt-get install openjdk-8-jdk</code> 
 + 
 +It might be necessary to manually set JAVA_HOME and/or ANDROID_HOME depending on your operating system 
 +<code>export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/</code> 
 +<code>export ANDROID_HOME=$HOME/Android/Sdk</code> 
 + 
 +In project directory: 
 +<code>npm install</code> 
 + 
 + 
 +Compiling and launching application: 
 +<code>npm run build-cordova-android</code> 
 + 
 +and then __either__ of the 2 following 
 +<code>framework7 cordova run android</code> 
 +<code>adb install -r /home/sschroeck/InformAppRisk/TGEO_InformAppRisk/cordova/platforms/android/app/build/outputs/apk/debug/app-debug.apk #path can be found in output of build command</code>
  
-installation and compilation instructions below 
  
 ===== Webserver ===== ===== Webserver =====
  
-link to source code here+https://mygit.th-deg.de/tcf-public/informatrisk_server 
 + 
 +Necessary global packages (replace PHP version with the correct one for your desired Laravel Version) 
 + 
 +<code> 
 +sudo apt-get install postgresql-12 
 +sudo apt-get install apache2 libapache2-mod-php7.4 php7.4 php7.4-xml php7.4-gd php7.4-opcache php7.4-mbstring php7.4-pgsql 
 +sudo apt-get install postgis #should automatically install 'postgresql-12-postgis' as well 
 +sudo apt-get install imagemagick 
 +sudo apt-get install composer 
 +</code> 
 + 
 +Database setup: 
 +<code>sudo -u postgres psql 
 + 
 +CREATE USER informatrisk_user WITH PASSWORD 'herpderp'; 
 +CREATE DATABASE informatrisk OWNER informatrisk_user; 
 +\c informatrisk 
 +CREATE EXTENSION postgis;</code> 
 + 
 +Web server setup and example config: 
 +<code> 
 +sudo openssl req -x509 -nodes -days 700 -newkey rsa:2048 -keyout /etc/ssl/private/InformAtRisk.key -out /etc/ssl/certs/InformAtRisk.crt 
 +/etc/apache2/sites-enabled/{your used site configuration}.conf 
 +</code> 
 +<code> 
 +NameVirtualHost *:8070 
 +Listen 8070 
 +<VirtualHost *:8070> 
 +        Serveradmin admin@admin.de 
 +        DocumentRoot /var/www/InformAppRisk_Webserver/public 
 +        ServerName 192.168.83.198/informatrisk 
 +        ServerAlias www.laravel.dev 
 + 
 +        <Directory /var/www/InformAppRisk_Webserver/public/> 
 +                Options Indexes FollowSymLinks MultiViews 
 +                AllowOverride All 
 +                Order allow,deny 
 +                allow from all 
 +                Require all granted 
 +        </Directory> 
 + 
 +        SSLEngine on 
 +        SSLCertificateFile /etc/ssl/certs/InformAtRisk.crt 
 +        SSlCertificateKeyFile /etc/ssl/private/InformAtRisk.key 
 + 
 +        LogLevel debug 
 +        ErrorLog ${APACHE_LOG_DIR}/error.log 
 +        CustomLog ${APACHE_LOG_DIR}/access.log combined 
 +</VirtualHost> 
 +</code> 
 +UBUNTU 
 +<code> 
 +sudo a2enmod ssl 
 +sudo a2enmod header 
 +sudo a2enmod rewrite 
 +</code> 
 +MAC 
 +    You need to manuall activate the specific packages installed in step 1 by editing httpd.conf 
 +    Also follow the instructions at the bottom of the PHP homebrew page 
 + 
 +Web project setup in project directory: 
 +<code>composer install</code> 
 +<code>php artisan storage:link</code> 
 + 
 +Create the following folders if they do not exist yet: 
 +</code> 
 +create public/storage 
 +create public/storage/uploads 
 +copy public/storage/tiles 
 +sudo chmod 777 public/storage/uploads/ 
 +<code>
  
-installation and setup instructions below+<code> 
 +php artisan migrate:fresh 
 +php artisan db:seed 
 +php artisan passport:install 
 +php artisan key:generate 
 +</code> 
 +Create a file named '.env' according to the template of '.env.example' and fill in relevant information like app name and database connection parameters
  
 +Copy the Firebase credential file into config folder and add Firebase config to .env
 +<code>
 +FIREBASE_CREDENTIALS=config/informatrisk-abc16-firebase-adminsdk-y5nqn-89585b4ecd.json
 +FIREBASE_DATABASE_URL=https://informatrisk-abc16.firebaseio.com
 +</code>
  
 ===== Sensor Communication API ===== ===== Sensor Communication API =====
  
-insert download link for html based communication api+HTML based interactive API {{Informatrisk_API.zip|Download}}
  
  
en/resources/app.1689255773.txt.gz · Last modified: 2023/07/13 13:42 by s-schroeck