Skip to content
KrugT edited this page Oct 15, 2015 · 2 revisions

General things

  • we want to deploy early. Maybe two environments? One for a early showcase of new features and one for "production"
  • Registration with Facebook should be available as soon as possible
  • User aged under 18 are not allowed to register as volunteer
  • Backend set's boolean properties to false if not provided by frontend
  • Volunteer data has to be protected against miss use. Only verified organisations get access to a limited number of properties.
  • REST API is implemented with Spring-boot
  • Web frontent is implemented with AngularJS, bootstrap. It has a responsive design
  • We want automated builds using Travis CI. The build breaks if tests or analysis tools fail.
  • High test coverage from the beginning
  • Automated as much as possible

Action items

  • Classify GitHub issues by milestones
  • Define REST API to enable backend and frontend teams to develop independently

Registration

User register with

  • with mail
  • with OAuth 2.0 (Facebook, Google, etc.)

In a later step, organisations should be able to register users manually. For example someone who usually do not use internet things calls a organisation and want to help. The organisation then should be able to add the User. Maybe the user is displayed in the available volunteers list. Or is assigned to one operation only...

Phases of project

1

  • User can register them selves
  • Organisations are created manually
  • Organisation can query for available volunteers by criteria. They are contacted manually by phone or email

2

  • Organisations are able to create new operations/events
  • Users are able to apply for operations

REST API

The following endpoints should be provided by the Backend.

/user/ [POST]
/user/{id} [GET, PUT]

/ability [GET(all)]
/findVolunteer/ [GET] parameter->to be defined (json body or parameter)

/login (to be defined for OAuth)

inPhase2:

/organisation/list [GET] all organisations to display on website
/organisation/full [GET] all organisations with full information (if enough privileges)

Objects transfered by the API

User

TODO:

The User should be able to specify how to be contacted in case of request(email and/or phone). This information should be also availabe in User_foundVolunteer. - to be modeled

Model the abilities. In the first step a complete set of abilities is transfered with the user.

Email is only required if the registration is done by email. If OAuth is used for registration the email is optional.

"$schema": "http://json-schema.org/draft-04/schema#",
"title": "User",
"type": "object",
"properties": {
  "id": {
    "type": "integer"
  },
  "email": {
    "type": "string"
  },
  "givenName": {
    "type": "string"
  },
  "surname": {
    "type": "string"
  },
  "zipCode": {
    "type": "string",
    "description": "Zip code can be used to find available users within a distance."
  },
  "phone": {
    "type": "string"
  },
  "dateOfBirth": {
    "type": "string"
  },
  "isAdult": {
    "type": "boolean",
    "description": "It should be possible to flag a user as aged over 18 without forcing him to provide his date of birth."
  },
  "isBonusProgramAccepted": {
    "type": "boolean",
    "description": "false if not set by the user"
  },
  "password": {
    "type": "string",
    "description": "Is not serialised in anny response"
  },
  "insurance": {
    "type": "string",
    "description": "to be defined, which information is needed"
  },
  "abilities": {
    "type": "TODO"
  },
  "maxRadiusOfAction": {
    "type": "integer",
    "description": "Max radius in km a user is willing to help"
  }
},
"required": [
  "id",
  "email",
  "givenName",
  "surname",
  "password",
  "isAdult"
]

User: found volunteer response

"$schema": "http://json-schema.org/draft-04/schema#",
"title": "User_foundVolunteer",
"type": "object",
"properties": {
  "id": {
    "type": "integer"
  },
  "email": {
    "type": "string"
  },
  "givenName": {
    "type": "string"
  },
  "surname": {
    "type": "string"
  },
  "zipCode": {
    "type": "string",
    "description": "Zip code can be used to find available users within a distance."
  },
  "phone": {
    "type": "string"
  },
  "abilities": {
    "type": "TODO"
  }
}

Ability

TODO: complete model like proposal in ->picture

"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Ability",
"type": "object",
"properties": {
  "id": {
    "type": "integer"
  },
  "name": {
    "type": "string"
  }
}
Clone this wiki locally