Wir verbinden freiwillige Helfer und medizinische Einrichtungen
Clone the project and get it running on a local http hosting such as XAMPP. Everything is included except the following config.php which has to be placed into the project directory:
<?php
// This is for your mysql database
$servername = ''; // E.g. when you run locally, this will be 'localhost'
$username = ''; // Username for your database
$password = ''; // Password for your database
// This is for your smtp server.
$mailPw = ''; // TODO: This is not fully configurizable yet, sorry guys! :-(
To talk to our backend, you could need some help by SoapUi or any other REST application of your choice. Using SoapUi, we have created THIS project to work with the backend.
The backend is communicating using json requests and responses. Following functions are implemented so far:
(this documentation will be extended in the next days - last state: 23.03.2020)
- endpoints/auth/
- endpoints/institutionProfile/
- endpoints/volunteerProfile/
- endpoints/confirmationKey/
Result headers:
- HTTP 200: Everything worked fine!
- HTTP 400: There went something wrong. Errors will be received as JSON array
- HTTP 401: Unauthorized: Is the user logged in? Most probably not.
Type: POST
Body: JSON
{
"email": "",
"pass": ""
}
Type: POST
Body: JSON
{
"email": "",
"pass": ""
}
Type: GET
Body: None
Type: POST
Body: JSON
{
"id": "",
"email": "",
"forename": "",
"surname": ""
}
Type: POST
Body: JSON
{
"email": "",
"passwordOld": "",
"passwordNew": ""
}
Type: POST
Body: JSON
{
"name": "",
"street": "",
"house_number": 0,
"postal_code": "",
"city": "",
"description": ""
}
Type: POST
Body: JSON
{
"institution_profile_id": 0,
"name": "",
"street": "",
"house_number": 0,
"postal_code": "",
"city": "",
"description": ""
}
This will be changed in further version. There was a miscommunication while development so this returns an array of 1.
Type: POST
Body: JSON
{
"user_id": 0
}
Type: POST
Body: JSON
{
"id": 0
}
Returns a boolean as json telling if the specified user is an institution.
Type: POST
Body: JSON
{
"user_id": 0
}
Returns an array of institutions nearby for the user that is logged in. Obviously, the user has to have a volunteer profile created.
Type: GET
Body: None
Type: POST
Body: JSON
{
"time_from": "",
"time_to": "",
"radius": 5,
"drivinglicense": "",
"medical_experience": "",
"postal_code": "",
"bio": "",
"phone": ""
}
Type: POST
Body: JSON
{
"volunteer_profile_id": 0,
"time_from": "",
"time_to": "",
"radius": 5,
"drivinglicense": "",
"medical_experience": "",
"postal_code": "",
"bio": "",
"phone": ""
}
Type: POST
Body: JSON
{
"user_id": 0
}
Type: POST
Body: JSON
{
"id": 0
}
Returns a boolean as json telling if the specified user is a volunteer.
Type: POST
Body: JSON
{
"user_id": 0
}
This is a temporary solution for having a user confirmation without any frontend. Key will be used for activation and removed if correct. Correct or not, the user will be redirected immediately.
Type: GET\
http://api.volunteervsvirus.de/endpoints/confirmationKey/userConfirmation.php?key=<CONFIRMATION_KEY>
These instructions will get you a copy of the backend up and running on your local machine or server for development and testing purposes.
- Start docker
- Open shell/cmd in the root folder
- Enter docker-compose up
Now you can access the backend on port 8001 and phpmyadmin on port 8000. You can login into phpmyadmin with the following login: 'user' and password: 'test'.
The following API-Endpoints are available through this backend: https://docs.google.com/document/d/1W5YEYDJ3H4pCuPrSsXS0OftaG_0oMlIJ037p7Ys7-xw/edit#
Deployment of master-branch to production is ensured through pipeline