Best laravel framework open-source packages.

Dianoia Marketplace

A Marketplace app to create content for people with dementia.
Updated 4 months ago

Dianoia Marketplace Web Application

GitHub Issues GitHub Stars GitHub forks JavaScript Style Guide: Good Parts contributions welcome License Maintenance Ask Me Anything !

Laravel 10 Web Application for Creating content for the Dianoia mobile app

Project URL

Installation Instructions:

Pre-initialization steps

After cloning the project, create an .env file (should be a copy of .env.example), containing the information about your database name and credentials:

cp .env.example .env

Take a look at the .env file that was created. You may need to update the DB_* variables, in order to set up the DB connection. Also, make sure that the APP_URL is set to the correct domain and port that you will be using.


First time install (setup database and install dependencies)

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

  2. 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 in order to insert the starter data to the DB

  3. Install laravel/back-end dependencies

composer install

composer dump-autoload
  1. Front-end dependencies

It is very easy to install multiple versions of NodeJS and npm, by using Node Version Manager (nvm).

If you are using nvm, run this command in order to sync to the correct NodeJS version for the project:

nvm use

Then, install and compile the front-end dependencies:

npm install

npm run dev #(use prod if in production)
  1. Create the symbolic link for user-uploaded files.
php artisan storage:link

in order to link the /public/storage folder with the /storage/app/public directory

SEO - Generate Sitemap

This application uses Spatie - Laravel Sitemap plugin, in order to create the public/sitemap.xml file (which is excluded from git), that will be crawled by the search engines. In order to run the generator for the current application installation, run the embedded Laravel command:

php artisan sitemap:generate

PHP code style - Laravel Pint

This application uses Laravel Pint in order to perform code-style.

In order to run the styler, run :

./vendor/bin/pint --test -v # the --test will not do any changes, it will just output the changes needed

./vendor/bin/pint -v # this command will actually perform the code style changes 

Apache configuration example:

% sudo touch /etc/apache2/sites-available/dianoiamarketplace.conf
% sudo nano /etc/apache2/sites-available/dianoiamarketplace.conf
<VirtualHost *:80>
       
        ServerName dev.dianoiamarketplace
        ServerAlias dev.dianoiamarketplace
        DocumentRoot "/home/path/to/project/public"
        <Directory "/home/path/to/project/public">
            Require all granted
            AllowOverride all
        </Directory>
       
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Make the symbolic link:

% cd /etc/apache2/sites-enabled && sudo ln -s ../sites-available/dianoiamarketplace.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 {} \;

Or run the set-file-permissions.sh script (needs sudo):

sudo ./set-file-permissions.sh www-data {{app_user}} .

Change hosts file so dev.dianoiamarketplace points to localhost

sudo nano /etc/hosts

127.0.0.1       dev.dianoiamarketplace

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"