{"id":18683565,"url":"https://github.com/scify/crowdsourcing-platform","last_synced_at":"2025-04-12T04:31:46.932Z","repository":{"id":37589720,"uuid":"148643817","full_name":"scify/Crowdsourcing-Platform","owner":"scify","description":"Laravel web application for Crowdsourcing projects and Questionnaires","archived":false,"fork":false,"pushed_at":"2024-10-24T09:29:36.000Z","size":34889,"stargazers_count":20,"open_issues_count":0,"forks_count":11,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-25T02:54:31.297Z","etag":null,"topics":["adminlte","adminlte-template","adminlte3","bootstrap","bootstrap-4","bootstrap4","hacktoberfest","hacktoberfest-accepted","javascript","laravel","laravel-application","laravel-framework","laravel-mix","tests","vuejs","web","web-app","web-application","webpack"],"latest_commit_sha":null,"homepage":"https://crowdsourcing.scify.org/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-13T13:43:44.000Z","updated_at":"2024-10-24T09:29:40.000Z","dependencies_parsed_at":"2023-02-17T20:00:29.866Z","dependency_job_id":"5fc4c985-cc35-451a-bdf8-ecc30edb820d","html_url":"https://github.com/scify/Crowdsourcing-Platform","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scify%2FCrowdsourcing-Platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scify%2FCrowdsourcing-Platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scify%2FCrowdsourcing-Platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scify%2FCrowdsourcing-Platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scify","download_url":"https://codeload.github.com/scify/Crowdsourcing-Platform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248517189,"owners_count":21117411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adminlte","adminlte-template","adminlte3","bootstrap","bootstrap-4","bootstrap4","hacktoberfest","hacktoberfest-accepted","javascript","laravel","laravel-application","laravel-framework","laravel-mix","tests","vuejs","web","web-app","web-application","webpack"],"created_at":"2024-11-07T10:14:57.148Z","updated_at":"2025-04-12T04:31:41.924Z","avatar_url":"https://github.com/scify.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crowdsourcing Web Application\n\n[![GitHub Issues](https://img.shields.io/github/issues/scify/Crowdsourcing-Platform)](https://img.shields.io/github/issues/scify/Crowdsourcing-Platform)\n[![GitHub Stars](https://img.shields.io/github/stars/scify/Crowdsourcing-Platform)](https://img.shields.io/github/stars/scify/Crowdsourcing-Platform)\n[![GitHub forks](https://img.shields.io/github/forks/scify/Crowdsourcing-Platform)](https://img.shields.io/github/forks/scify/Crowdsourcing-Platform)\n[![JavaScript Style Guide: Good Parts](https://img.shields.io/badge/code%20style-goodparts-brightgreen.svg?style=flat)](https://github.com/dwyl/goodparts \"JavaScript The Good Parts\")\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)\n[![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://crowdsourcing.scify.org/)\n[![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://GitHub.com/scify)\n[![GitHub release](https://img.shields.io/github/release/scify/Crowdsourcing-Platform.svg)](https://github.com/scify/Crowdsourcing-Platform/releases/tag/v8.0)\n\n## Introduction\n\nThis is a [Laravel](https://laravel.com/) Web Application for Crowdsourcing Projects and Questionnaires.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Organizations using the Crowdsourcing platform](#organizations-using-the-crowdsourcing-platform)\n- [Installation Instructions](#installation-instructions)\n    - [Method 1: Docker Compose](#method-1-docker-compose-recommended)\n        - [Step 1: Install Docker and Docker Compose](#step-1-install-docker-and-docker-compose)\n        - [Step 2: Build and Run Containers](#step-2-build-and-run-containers)\n        - [Step 3: Launch the Application](#step-3-launch-the-application)\n    - [Method 2: Manual Installation](#method-2-manual-installation)\n        - [Step 1: Install PHP](#step-1-install-php)\n        - [Step 2: Install Composer](#step-2-install-composer)\n        - [Step 3: Install Node.js and npm](#step-3-install-nodejs-and-npm)\n        - [Step 4: Install Nginx](#step-4-install-nginx)\n            - [Nginx Configuration](#nginx-configuration)\n        - [Step 5: Install MySQL](#step-5-install-mysql)\n            - [Database Considerations](#database-considerations)\n- [Run the Laravel Application commands](#run-the-laravel-application-commands)\n    - [Step 1: Fix permissions for storage directory](#step-1-fix-permissions-for-storage-directory)\n    - [Step 2: Create the `.env` file](#step-2-create-the-env-file)\n    - [Step 3: Create A Database](#step-3-create-a-database)\n        - [Add the DB schema and the DB data](#add-the-db-schema-and-the-db-data)\n            - [Option 1: Use an existing database (MySQL dump)](#option-1-use-an-existing-database-mysql-dump)\n            - [Option 2: Run the migrations and seed the database](#option-2-run-the-migrations-and-seed-the-database)\n    - [Step 4: Install Laravel (back-end) dependencies](#step-4-install-laravel-back-end-dependencies)\n    - [Step 5: Generate the application key](#step-5-generate-the-application-key)\n    - [Step 6: Install and compile the front-end dependencies:](#step-6-install-and-compile-the-front-end-dependencies)\n    - [Step 7: Create symbolic link for uploaded files](#step-7-create-symbolic-link-for-uploaded-files)\n    - [Step 8: Cache the `.env` settings](#step-8-cache-the-env-settings)\n- [Social Login - Sign Up with Socialite](#social-login---sign-up-with-socialite)\n- [SEO - Generate Sitemap](#seo---generate-sitemap)\n- [Related HTML Template](#related-html-template)\n- [PHP code style - Laravel Pint](#php-code-style---laravel-pint)\n- [Installation-specific resources](#installation-specific-resources)\n- [Development Guidelines](#development-guidelines)\n    - [Directory Structure](#directory-structure)\n    - [About the Repository Pattern](#about-the-repository-pattern)\n- [Run Tests](#run-tests)\n- [How to debug](#how-to-debug)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [License](#license)\n- [Credits](#credits)\n- [Contact](#contact)\n\n## Features\n\n- Administration panel to set up questionnaires \u0026 projects\n- Questionnaires with and without login: Questionnaires can be responded anonymously or eponymoysly\n- The questionnaires can be automatically translated via google translations (to facilitate the manual translations)\n- The citizen responses are automatically translated via google translations  (and at the results you can see both the\n  original and the translated)\n- Setting targets for goals (number of responses needed for the questionnaire) to be reached\n- Gamification elements: The platform motivates users to respond to questionnaires or invite others to respond\n- Mailchimp integration: All the emails of registered users are collected to a mailchimp list\n- Google Analytics integration (with anonymized settings turned on) with custom events: We track anonymously people who\n  do actions in the website\n- Voting mechanism for provided answers: Users can vote the best answers, Platform moderators can highlight the most\n  interesting answers and reject/demote the not interesting ones\n- Extract the results: You can download the answers to excel\n- View statistics\n- Login function with Facebook, Google, LinkedIn, Twitter, Microsoft\n- The platform is available in many languages (and new translations can be added with relative low cost)\n- GDPR compliant\n\n## Benefits of Open Source applications\n\nOffering the code under open source licenses includes many benefits. Of those, the ones related to our project, are:\n\n- There is no dependency on the developer of the solution (SciFY), but other collaborators can be used after the end of\n  the project. The code remains always freely available.\n- Stakeholders can add features, change it, improve it, adjust to their needs.\n- New contributions are added to the existing solution so that everyone benefit\n\n# Organizations using the Crowdsourcing platform\n\n[ECAS official installation](https://crowdsourcing.ecas.org/en)\n\n[SciFY official installation](https://crowdsourcing.scify.org/)\n\n# Installation Instructions\n\n## Method 1: Docker Compose (recommended)\n\n### Step 1: Install Docker and Docker Compose\n\n- **Docker**: Follow the installation guide for your operating system on\n  the [Docker website](https://docs.docker.com/get-docker/).\n- **Docker Compose**: Docker Compose is included with Docker Desktop for Windows and Mac. For Linux, follow the\n  instructions [here](https://docs.docker.com/compose/install/).\n\n### Step 2: Build and Run Containers\n\nRun the following command to build and start the containers:\n\n```sh\ndocker compose up --build\n```\n\n### Step 3: Launch the Application\n\nIn order to run the application, you will need to run the Laravel commands inside the Docker container.\nSo see the [Run the Laravel Application commands](#run-the-laravel-application-commands) section.\n\nAfter you have run these commands, you can access the application in your browser:\n\nThe application will be available at [http://localhost:89](http://localhost:89).\nTo access PHPMyAdmin, visit [http://localhost:8081](http://localhost:8081).\n\n## Method 2: Manual Installation\n\n### Step 1: Install PHP\n\n- **PHP**: Install PHP 8.2 or newer. You can follow the installation guide for your operating system on\n  the [PHP website](https://www.php.net/manual/en/install.php).\n\n```bash\nsudo apt update\n\nsudo apt install php php-cli php-fpm php-mysql php-xml php-mbstring php-curl php-gd php-zip php-bcmath\n```\n\n### Step 2: Install Composer\n\n- **Composer**: Install Composer by following the instructions on\n  the [Composer website](https://getcomposer.org/download/).\n\n```bash\nphp -r \"copy('https://getcomposer.org/installer', 'composer-setup.php');\"\n\nphp composer-setup.php\n\nphp -r \"unlink('composer-setup.php');\"\n\nsudo mv composer.phar /usr/local/bin/composer\n```\n\n### Step 3: Install Node.js and npm\n\n- **Node.js**: Install Node.js and npm by following the instructions on\n  the [Node.js website](https://nodejs.org/en/download/).\n\n```bash\nsudo apt install nodejs npm\n```\n\nOr, if using [nnm](https://github.com/nvm-sh/nvm), run the following command:\n\n```bash\nnvm use\n```\n\n### Step 4: Install Nginx\n\n- **Nginx**: Install Nginx by following the instructions on the [Nginx website](https://nginx.org/en/docs/install.html).\n\n```bash\nsudo apt install nginx\n```\n\n#### Nginx Configuration\n\nCreate an Nginx configuration file for your Laravel project:\n\n```bash\nsudo nano /etc/nginx/sites-available/crowdsourcing\n```\n\nAdd the necessary configuration to the file. Refer to the Nginx documentation for detailed configuration.\n\nExample configuration:\n\n```nginx\nserver {\n    listen 80;\n    server_name crowdsourcing.local;\n    root /var/www/crowdsourcing/public;\n\n    add_header X-Frame-Options \"SAMEORIGIN\";\n    add_header X-XSS-Protection \"1; mode=block\";\n    add_header X-Content-Type-Options \"nosniff\";\n\n    index index.php index.html index.htm index.nginx-debian.html;\n\n    charset utf-8;\n\n    location / {\n        try_files $uri $uri/ /index.php?$query_string;\n    }\n\n    location = /favicon.ico { access_log off; log_not_found off; }\n    location = /robots.txt  { access_log off; log_not_found off; }\n\n    error_page 404 /index.php;\n\n    location ~ \\.php$ {\n        include snippets/fastcgi-php.conf;\n        fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;\n    }\n\n    location ~ /\\.ht {\n        deny all;\n    }\n}\n```\n\nEnable the configuration:\n\n```bash\nsudo ln -s /etc/nginx/sites-available/crowdsourcing /etc/nginx/sites-enabled/\n\nsudo systemctl restart nginx\n```\n\n### Step 5: Install MySQL\n\n- **MySQL**: Install MySQL by following the instructions on\n  the [MySQL website](https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/).\n\n```bash\nsudo apt install mysql-server\n```\n\n#### Database Considerations\n\nIf you are running MySQL version 8.0 and above, there is a certain [bug](https://bugs.mysql.com/bug.php?id=103465)\nregarding memory overflow when trying to sort results in tables that have columns of JSON data type.\n\nA workaround to fix this is to tweak the memory buffer size for sorting.\nIn order to do so, please follow:\n\n```bash\nsudo nano /etc/mysql/mysql.conf.d/mysqld.cnf\n```\n\nAnd append the following options:\n\n```bash\n[mysqld]\nsort_buffer_size = 10485760\ninnodb_sort_buffer_size = 10485760\n```\n\nAfter you save the file, restart the MySQL service:\n\n```bash\nsudo service mysql restart\n```\n\n## Run the Laravel Application commands\n\nRegardless of the installation method, you will need to run the following commands to set up the application.\n\n### Step 1: Fix permissions for storage directory\n\nThese commands should be run **outside** any Docker container:\n\n```bash\nsudo chown -R `whoami`:www-data storage\n\nchmod 775 storage\n\ncd storage/\n\nfind . -type f -exec chmod 664 {} \\;\n\nfind . -type d -exec chmod 775 {} \\;\n```\n\nDepending on the installation method, you should run the rest of the steps either in the Docker container or on your\nlocal machine.\n\n**Note:** If you are using Docker Compose, you will first need first to enter the PHP container:\n\n```bash\ndocker exec -it crowdsourcing_platform_server bash\n```\n\nand then run the rest of the commands.\n\nIf you are running the commands on your local machine, you can run the following commands directly.\n\nIf you have started Ddev, you should run all the commands prefixed with `ddev exec`.\n\n### Step 2: Create the `.env` file\n\nAfter cloning the project, create an .env file (should be a copy of .env.example):\n\n```bash\ncp .env.example .env\n```\n\n### Step 3: Create A Database\n\nIn case of a manual installation, you will need to create a Database for the application.\n\nIn case of a Docker environment, enter the `crowdsourcing_platform_db` container, and create a Database\nnamed `crowdsourcing_db_docker`:\n\n```bash\ndocker exec -it crowdsourcing_platform_db bash\n```\n\nEnter the MySQL shell:\n\n```bash\nmysql -u root -p\n```\n\nThen, run the following MySQL command:\n\n```mysql\nCREATE DATABASE IF NOT EXISTS crowdsourcing_db_docker;\n```\n\n#### Add the DB schema and the DB data\n\n##### Option 1: Use an existing database (MySQL dump)\n\nFirst you will need to enter the DB container:\n\n```bash\ndocker exec -it crowdsourcing_platform_db bash\n```\n\nIf you have an existing MySQL dump file, make sure that is in the current directory, and import it into the database:\n\n```bash\nmysql -u root -p crowdsourcing_db_docker \u003c dump.sql\n```\n\nThen, add the following to the `.env` file:\n\n```bash\nDB_CONNECTION=mysql\nDB_HOST=db\nDB_PORT=3306\nDB_DATABASE=crowdsourcing_db_docker\nDB_USERNAME=root\nDB_PASSWORD=root\n```\n\n##### Option 2: Run the migrations and seed the database\n\n**Note:** If you are using Docker Compose, you will need first to enter the **server** container:\n\n```bash\ndocker exec -it crowdsourcing_platform_server bash\n```\n\n1. Run the Laravel migrations:\n\n```bash\nphp artisan migrate\n```\n\n2. Run the Database seeder:\n\n```bash\nphp artisan db:seed\n```\n\n### Step 4: Install Laravel (back-end) dependencies\n\nEnter the PHP container (if using Docker Compose):\n\n```bash\ndocker exec -it crowdsourcing_platform_server bash\n```\n\nThen, run the following commands:\n\n```bash\ncomposer install\n\ncomposer dump-autoload\n```\n\n### Step 5: Generate the application key\n\n```bash\nphp artisan key:generate\n```\n\n### Step 6: Install and compile the front-end dependencies:\n\n```bash\nnpm install\n\nnpm run dev # (if in development mode, use for live changes)\n\nnpm run build # (if in development mode)\n\nnpm run prod # (if in production mode)\n```\n\n### Step 7: Create symbolic link for uploaded files\n\nBy default, images are stored at app/storage/public. Run\n\n```bash\nphp artisan storage:link\n```\n\n### Step 8: Cache the `.env` settings\n\nAnd then persist the `.env` settings to Laravel Cache:\n\n```bash\nphp artisan config:cache\n```\n\nin order to link this folder with the public directory\n\n## Social Login - Sign Up with Socialite\n\nThis app uses [Socialite Laravel Plugin](https://laravel.com/docs/5.6/socialite) to handle social login.\n\nIn order to get it working in your development environment, you need to make sure that you have API keys and secrets for\nFacebook and Twitter (guides [here](https://appdividend.com/2017/07/12/laravel-facebook-login/)\nand [here](https://appdividend.com/2017/07/21/laravel-5-twitter-login/)),\nand that you can access [https://dev.crowdsourcing/](https://dev.crowdsourcing/) (notice the https) on your machine.\n\nA guide for enabling https on your local machine can be\nfound [here](https://deliciousbrains.com/https-locally-without-browser-privacy-errors/).\n\nBasically, you need to run\n\n```bash\nopenssl req -new -sha256 -newkey rsa:2048 -nodes \\\n-keyout dev.crowdsourcing.key -x509 -days 365 \\\n-out dev.crowdsourcing.crt\n```\n\n### Nginx Configuration for Social Login (only for Non-Docker installations)\n\nReference the 2 generated files in the Nginx configuration file of the application.\nMake sure you change the port to 443 as shown below:\n\n```nginx\nserver {\n    listen 443 ssl;\n    server_name dev.crowdsourcing;\n\n    ssl_certificate /path/to/dev.crowdsourcing.crt;\n    ssl_certificate_key /path/to/dev.crowdsourcing.key;\n\n    root /var/www/crowdsourcing/public;\n\n    add_header X-Frame-Options \"SAMEORIGIN\";\n    add_header X-XSS-Protection \"1; mode=block\";\n    add_header X-Content-Type-Options \"nosniff\";\n\n    index index.php index.html index.htm index.nginx-debian.html;\n\n    charset utf-8;\n\n    location / {\n        try_files $uri $uri/ /index.php?$query_string;\n    }\n\n    location = /favicon.ico { access_log off; log_not_found off; }\n    location = /robots.txt  { access_log off; log_not_found off; }\n\n    error_page 404 /index.php;\n\n    location ~ \\.php$ {\n        include snippets/fastcgi-php.conf;\n        fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;\n    }\n\n    location ~ /\\.ht {\n        deny all;\n    }\n}\n```\n\nAlso, make sure to restart Nginx, by running\n\n```bash\nsudo systemctl restart nginx\n```\n\n## SEO - Generate Sitemap\n\nThis application uses [Spatie - Laravel Sitemap](https://github.com/spatie/laravel-sitemap) plugin, in order to create\nthe `public/sitemap.xml` file (which is excluded from git), that will be crawled by the search engines.\nIn order to run the generator for the current application installation, run the embedded Laravel command:\n\n```bash\nphp artisan sitemap:generate\n```\n\n## Code Linting \u0026 Formatting\n\n### PHP code style - Laravel Pint\n\nThis application uses [Laravel Pint](https://laravel.com/docs/9.x/pint) in order to perform code-style.\n\nIn order to run the styler, run :\n\n```bash\n./vendor/bin/pint --test -v # the --test will not do any changes, it will just output the changes needed\n\n./vendor/bin/pint -v # this command will actually perform the code style changes \n```\n\n### JavaScript \u0026\u0026 CSS code style - ESLint \u0026\u0026 Prettier\n\nThis application uses [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/) in order to perform code-style.\n\nIn order to run the styler \u0026 formatter, run :\n\n```bash\nnpm run lint # this command will check the code style\n\nnpm run format # this command will format the code style\n```\n\n## Related HTML Template\n\nThis project uses the free [AdminLTE](https://adminlte.io/docs/3.0/) template.\n\nIt also makes use of [Bootstrap 4](https://getbootstrap.com/docs/4.4/getting-started/introduction/)\n\n## Installation-specific resources\n\nThe application can be tweaked and personalized for each installation.\nIn the `.env` file you can set the `INSTALLATION_RESOURCES_DIR` variable accordingly. This variable must take a value\nthat represents a directory name in the `resourcess/views/home/partials` directory. For example, see\nthe `resourcess/views/home/partials/together` directory. This directory must contain the partial blade files for the\ninstallation.\n\n## Development Guidelines\n\n### Directory Structure\n\nThis part of the documentation describes the directory structure of the Laravel application.\n\nIt is mostly scoped to the custom directories and files that are used in the application. For the general Laravel\ndirectory structure, please refer to the [official documentation](https://laravel.com/docs/11.x/structure).\n\n```text\n├── app                         # Laravel application directory\n│   ├── BusinessLogicLayer      # Business Logic Layer classes (services that contain the business logic and delegate from Controllers towards the Data Access Layer)  \n│   ├── Http/Controllers        # Controllers directory (classes that handle the HTTP requests, perform the necessary validations/operations and return the responses)\n│   ├── Http/Middleware         # Middleware directory (classes that handle the HTTP requests before they reach the Controllers)\n│   ├── Models                  # Models directory (ORM classes that represent the database tables and contain the relationships between them)\n│   ├── Notifications           # Notifications directory (classes that handle the notifications, like emails)\n│   ├── ViewModels              # View Models directory (classes that contain the data that will be passed to the views)\n│   ├── Repository              # Repository directory (classes that handle the database operations and contain the DB/ORM queries)\n│   resources                   # Resources directory (contains the views, assets, front-end files, and other resources)\n│   ├── views                   # Views directory (contains the blade files that are used to render the HTML)\n│   ├── assets                  # Assets directory (contains the front-end assets like CSS, JS, images, etc.)\n│       ├── js                  # JavaScript files (contains the Vue.js components and other JS files)\n│       ├── sass                # SASS files (contains the SASS files that are compiled to CSS)\n│   ├── lang                    # Language files (contains the language files for the translations)\n```\n\n### About the Repository Pattern\n\nThe application uses the Repository Pattern to separate the business logic from the data access logic.\n\nAll the database operations are handled by the Repository classes, which contain the DB/ORM queries.\n\nThese classes are located in the `app/Repository` directory, and they all extend the `app/Repository/Repository` class.\n\nEach child class represents a database table/entity and contains the queries for that table. This entity is defined in\nthe `app/Models` directory, and is referenced by the child Repository class, in the `getModelClassName` method.\n\nSo, we can use the base methods that are defined in the `Repository` class, like `getAll`, `getById`, `create`,\n`update`, without having to write the same queries in each child class. We can also define custom queries in the child\nclasses, or override the base methods if needed.\n\nThe Repository classes are used by the Business Logic Layer classes, which contain the business logic and delegate from\nthe Controllers towards the Data Access Layer.\n\nMore information about the Repository Pattern can be\nfound [here](https://designpatternsphp.readthedocs.io/en/latest/More/Repository/README.html).\n\n## Run Tests\n\nYou may use a separate MySQL database, for testing purposes.\nGenerally, the fields for testing should be defined in a `.env.testing` file, which should start as a copy of\nthe `.env.testing.example` file.\nThen, run the `migrate` and `seed` commands for the testing Database:\n\n```bash\ncp .env.testing.example .env.testing\n\nphp artisan migrate --env=testing --database=sqlite_testing\n\nphp artisan db:seed --env=testing --database=sqlite_testing --class=DatabaseSeeder\n```\n\nThen, you can run the tests:\n\n```bash\nphp artisan test --env=testing\n```\n\n## How to debug\n\n- Install and configure Xdebug on your machine\n- At Chrome\n  install [Xdebug helper](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?utm_source=chrome-app-launcher-info-dialog)\n- At PhpStorm/IntelliJ click the \"Start listening for PHP debug connections\"\n\n## Troubleshooting\n\nIf you encounter any issues, refer to the following steps:\n\n1. Check container logs if using Docker Compose: `docker compose logs`\n2. Verify Nginx and PHP-FPM status: `systemctl status nginx` and `systemctl status php-fpm`\n3. Review Laravel logs located in `storage/logs/laravel.log`\n4. Ensure your `.env` file has the correct database credentials\n5. Verify the MySQL service is running: `systemctl status mysql`\n6. Check the Nginx configuration: `nginx -t`\n\n## Contributing\n\nTo contribute to the application, follow these steps:\n\n1. Fork this repository.\n2. Read the [CONTRIBUTING](CONTRIBUTING.md) file.\n3. Create a branch: `git checkout -b \u003cbranch_name\u003e`.\n4. Make your changes and commit them: `git commit -m '\u003ccommit_message\u003e'`\n5. Push to the original branch: `git push origin \u003cproject_name\u003e/\u003clocation\u003e`\n6. Create the pull request.\n\n## License\n\nThis project is open-sourced software licensed under\nthe [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n\n## Credits\n\nThis project is developed by [SciFY](https://www.scify.org/) and [ECAS](https://ecas.org/) and is based on\nthe [Laravel](https://laravel.com/) framework. The project is maintained by [SciFY](https://www.scify.org/).\n\nSome of the images used in the application are from [Freepik](https://www.freepik.com/).\n\n## Contact\n\nFeel free to contact the project maintainers:\n\n- [SciFY](https://www.scify.org/)\n- [ECAS](https://ecas.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscify%2Fcrowdsourcing-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscify%2Fcrowdsourcing-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscify%2Fcrowdsourcing-platform/lists"}