Skip to content

Latest commit

 

History

History

platform

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

OpenVolunteerPlatform Starter

This project contains reference implementation for volunteer and admin application.

Project structure

  • Volunteer Client application /client
  • Admin application /client-admin
  • Server application /server
  • Data model representing system api ./model
  • OpenShift deployment ./.openshift

Getting Started

Requirements:

Running Apps and Server

  1. Install yarn and project dependencies
npm install -g yarn
yarn
  1. Build client admin and client
yarn
yarn prepare:all
  1. Start the server
cd ./server
docker-compose up -d
## Wait at least minute for containers to start
yarn keycloak:init
yarn start
  1. Links to applications should be printed in console.
    🎮 Ionic PWA application available at http://localhost:4000
    🎮 Admin PWA application available at http://localhost:4000/admin

Volunteer accounts for logging to voulnteer app that can be used:

hzaub	
kudi
msash
tgers
tmaure
ukon
wtrocki

Admin application user:

ovp-admin

The password is the same as the username.

Volunteers can register to the application in login screen

Technical details

Keycloak integration

Follow these instructions to set up Keycloak for Authentication/Authorization.

  1. Configure the Keycloak Server
cd ./server
yarn keycloak:init

This command creates the necessary resources in Keycloak and prints instructions you must follow to enable the integration.

Follow the instructions and copy the JSON configurations to the appropriate locations. The Starter app and server will read these configurations and the integration will be enabled when they are started.

Running clients as Mobile Applications

For IOS

cd ./client
yarn cap add ios
yarn run:ios

For Android:

cd ./client
yarn cap add android
yarn run:android

When running locally you will need to also enable http traffic. For example for android add android:usesCleartextTraffic#"true" to AndroidManifest.xml

Project should stard in IDE and can be launched as any other native application

Using MQTT for GraphQL subscriptions

By default platform will use in memory subscription mechanism that is not recomended to production. For OpenShift deployment we are using AMQ MQTT protocol. On local machine this can be configured using following steps.

  1. Go to server/scripts ./mqtt
  2. Execute docker-compose up
  3. Set MQTT_HOST environment variable in .env file

MQTT_HOST#127.0.0.1

Running On OpenShift

Please check link:./.openshift[.openshift] folder for more information.

Development

Starter template is basing on https://graphback.dev open source project. Please follow Getting Started guide for Graphback to learn how to modify OpenVolunteer platform:

https://graphback.dev/docs/intro/datamodel

Executing Graphback source generator

The below command will generate client side queries, mutations for the client side

yarn generate:all