The project involves creating a mobile-first web application centred on the cultural itineraries of the canton of Vaud, highlighting various points of interest along the way.
The code documentation, generated with PHP Documentor, can be found in the /docs
directory at the root of the project.
Please note that this app requires the OpenRoute Service API key
In addition, you can configure the minimum distance radius in the .env
file for proximity with points of interest and routes.
To deploy this project in your local environment, follow the steps below:
Create a folder for your project and move to it
git clone https://github.com/HEIG-COMEM/HEIG-VD_ProjArt_Sentiers-Culturels.git
composer install
npm ci
Copy the example file and edit it to your needs
cp .env.example .env
Create an account on Openroute Service, generate an API token and put it in the .env
file
php artisan key:generate
Create link to storage directory php artisan storage:link
Create a database in your mysql DB with the same name as defined in the .env
file
Then run
php artisan migrate:fresh --seed
To create tables and populate them
Then in two separate terminals:
php artisan serve
npm run dev
To deploy this project on a server, follow the steps below:
- connect to the server using SSH
- go to the site directory by executing the command
cd path-to-site
. - clone the project from github
git clone https://github.com/HEIG-COMEM/HEIG-VD_ProjArt_Sentiers-Culturels.git
- Install dependencies with
composer install
andnpm ci
. - Create .env file from model
cp .env.example .env
. - Create an account on Openroute Service, generate an API token and put it in the
.env
file - modify the
.env
file in the hosting root to update the connection parameters for the new database:
DB_CONNECTION=mysql
DB_HOST=xxxx.myd.infomaniak.com
DB_PORT=3306
DB_DATABASE= the name of the MySQL database (xxxx_newbdd)
DB_USERNAME= the MySQL user with rights to this database
DB_PASSWORD= its password
-
Create the application key
php artisan key:generate
-
Create link to storage directory
php artisan storage:link
-
Perform migrations and database seeding
php artisan migrate:fresh --seed
-
(Optional) Optimization
composer install --optimize-autoloader --no-dev
php artisan config:cache
php artisan route:cache
php artisan view:cache
-
Pause the site
php artisan down
-
Update the site
git pull composer install npm ci php artisan migrate
-
Restart queue (optional)
php artisan queue:restart
-
Clear cache (optional)
php artisan cache:clear
-
Set back up the site
php artisan up