Laravel web application for Crowdsourcing projects and Questionnaires
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bootstrap Initial commit Jun 13, 2018
config Added App versioning to sentry Sep 20, 2018
database Changed english_translation column to be of LONGTEXT type. Oct 16, 2018
resources Project latest contributors are only displayed to admins Oct 17, 2018
routes Added basic functionality regarding questionnaire language deletion. … Sep 18, 2018
storage Initial commit Jun 13, 2018
tests Initial commit Jun 13, 2018
.env.example Integrated Sentry Sep 20, 2018
.gitattributes Initial commit Jun 13, 2018
.gitignore Initial commit Jun 13, 2018 Added Licence file Sep 13, 2018 Added more badges Sep 25, 2018
artisan Initial commit Jun 13, 2018
composer.json Integrated Sentry Sep 20, 2018
composer.lock Integrated Sentry Sep 20, 2018
phpunit.xml Initial commit Jun 13, 2018
server.php Initial commit Jun 13, 2018
webpack.mix.js - Added check for valid crowdsourcing project when readin the project… Sep 20, 2018

Crowdsourcing Web Application

dependencies Status JavaScript Style Guide: Good Parts HitCount contributions welcome License Maintenance Website Ask Me Anything !

Laravel 5.7 web application for Crowdsourcing Projects and Questionnaires

This project is used by the European Citizen Action Service (ECAS) in order to facilitate questionnaires for the FAIR EU project.

Project URL

Installation Instructions:

First time install (setup database and install dependencies)

  1. Make sure php 7.1.3 (or newer) is installed.

Install graphics library

 sudo apt-get install php7.1-gd
  1. After cloning the project, create an .env file (should be a copy of .env.example), containing the information about your database name and credentials. Then run php artisan migrate to create the DB schema and php artisan db:seed --class=DatabaseSeederRunOnEmptyDB in order to insert the starter data to the DB

  2. Install laravel/back-end dependencies

composer install

  1. Install front-end dependencies
npm install
  1. Create symbolic link for uploaded images By default images are stored at app/storage/public. Run
php artisan storage:link

to link this folder with the public directory

Apache configuration:

The following assumes that the website will be rendered under dev.ecas url. You can edit the /etc/hosts/ file and add a record  dev.ecas
% sudo touch /etc/apache2/sites-available/ecas.conf
% sudo nano /etc/apache2/sites-available/ecas.conf
<VirtualHost *:80>
        ServerName dev.ecas
        ServerAlias dev.ecas
        DocumentRoot "/home/path/to/project/public"
        <Directory "/home/path/to/project/public">
            Require all granted
            AllowOverride all
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined


Make the symbolic link:

% cd /etc/apache2/sites-enabled && sudo ln -s ../sites-available/ecas.conf

Enable mod_rewrite, mod_ssl and restart apache:

% sudo a2enmod rewrite && sudo a2enmod ssl && sudo service apache2 restart

Fix permissions for storage directory:

sudo chown -R user:www-data storage
chmod 775 storage
cd storage/
find . -type f -exec chmod 664 {} \;
find . -type d -exec chmod 775 {} \;

Change host file so points to to localhost

sudo nano /etc/hosts       dev.ecas

Social Login - Sign Up with Socialite

This app uses Socialite Laravel Plugin to handle social login.

In order to get it working in your development environment, you need to make sure that you have API keys and secrets for Facebook and Twitter (guides here and here), and that you can access https://dev.ecas/ (notice the https) on your machine.

A guide for enabling https on your local machine can be found here.

Basically, you need to run

openssl req -new -sha256 -newkey rsa:2048 -nodes \
-keyout dev.ecas.key -x509 -days 365 \
-out dev.ecas.crt

And then reference the 2 files generated in the ecas.conf file of the application. Make sure you change the port to 443 as shown below:

% sudo touch /etc/apache2/sites-available/ecas.conf
% sudo nano /etc/apache2/sites-available/ecas.conf
<VirtualHost *:443>
	SSLEngine on
	SSLCertificateFile "/etc/apache2/sites-available/dev.ecas.crt"
	SSLCertificateKeyFile "/etc/apache2/sites-available/dev.ecas.key"

        ServerName dev.ecas
        ServerAlias dev.ecas
        DocumentRoot "/home/alex/Projects/crowdsourcing-platform-backend/public"
        <Directory "/home/alex/Projects/crowdsourcing-platform-backend/public">
            Require all granted
            AllowOverride all
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

Also, make sure to restart Apache, by running

sudo service apache2 restart

Related HTML Template

This project uses the free AdminLTE template. More specifically, it makes use of Laravel-AdminLTE for easier integration.

How to debug

  • Install and configure Xdebug on your machine
  • At Chrome install Xdebug helper
  • At PhpStorm/IntelliJ click the "Start listening for PHP debug connections"