Skip to content

oSoc15/leiedal-plong

Repository files navigation

Leiedal plong

Determine your energy label through an interactive platform


Server Requirements

  • PHP >= 5.5.9
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • Database (one of these)
    • MySQL
    • Postgres
    • SQLite
    • SQL Server

Getting up and running

If this is the first time that you use laravel, check out the getting started guide from laravel.

A good PHP development environment is Homestead.

  1. Clone this repo from https://github.com/oSoc15/leiedal-plong
  2. Run composer install from the root directory of the cloned repository
  3. Change your environment to your credentials (copy env.example, rename to .env and fill out your credentials)
  4. Run php artisan migrate to create the database tables and relationships
  5. Run php artisan db:seed to seed the tables
  6. Run npm install -g gulp bower to install to build system and client package manager
  7. Run npm install to pull the dependencies
  8. Run bower install to pull the client dependencies
  9. Run gulp to monitor the changes in CSS and JS files. Has to be launched to develop the frontend

Manual


The manual can be found here: Manual.

API Routes

GET /api/questions

This shows all the questions in the API. A question consist of multiple answers.

GET /api/questions/id

Gives the specific information of the section. The answers bound to this question will also be shown.

GET /api/residences

Gives an overview of all residences that are in the system, with their score and other information.

POST/api/residence

Creates a residence.

parameters:

  • city : string
  • postalCode : integer
  • street : string
  • number : integer
  • lat : float
  • long : float

This returns the instance of residence with all attributes with the provided hashids for identification.

POST/api/residence/reply

Post the choosen answer to the question.

parameters:

  • residence (the returned hashids when you created the residence) : string
  • question (the id of the current question) : integer
  • answer (the id of the choosen answer) : integer
  • unknown (has the user choosen the 'Weet ik niet' reply) : boolean
  • input (the input from the user, set answer and unknown to null)

Returns the updated residence, the current question and the possible answers.

This project uses the laravel framework and AngularJS.

View contributors

About

Determine your energy label through an interactive platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •