A web-based application to promote open science and track science publications within Fisheries and Oceans Canada.
For now, we'll use spatie.be's excellent guidelines. Additional guidelines will be added here as we progress.
Before you begin, ensure you have the following prerequisites installed:
- PHP 8.3 (see php.net)
- WSL if you are on Windows
- Redis
- MySQL (to mimic production, though SQLite can be used for development)
-
Install dependencies:
composer install pnpm install
-
Set up environment variables:
cp .env.example .env php artisan key:generate
-
Run database migrations:
php artisan migrate
-
Start the development servers:
composer run dev
This repo has both the front end and backend code. The front end is a SPA that consumes the API backend.
- TypeScript
- Vue.js (TS with Composition API
script setup
) - Vue-i18n (app supports en-CA and fr-CA, with vite-plugin-vue-i18n,
globalInjection: true
) - Vue-Router (SPA routing)
- Pinia (State management)
- Quasar (Vite Plugin flavour - Vue.js framework component library)
Some helper libraries of note here:
- VueUse (Collection of Vue Composition Utilities)
- unplugin-auto-import
- PHP 8.3
- Laravel (framework)
- Laravel Sanctum (auth)
All changes must be done via a PR to the main
branch. PR should be descriptive and provide
reference to any issues as required.
For commits, messages, use Conventional Commits
The commit message should be structured as follows:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
]
php artisan test
We use Cypress for the front-end E2E tests. It must run with the
env.ci
environment.
Before starting the test, start the dev server. For the frontend,
you can either use pnpnm dev
or pnmp build
. In most cases, dev
is better as changes to the code can instantently be tested again.
pnpm dev
php artisan server --env=ci
Once the local server is up and running, you can launch Cypress
with pnpm cy:open
or just run the tests with pnpm cy:run
If using WSL, you will need to follow this guide first.