Skip to content

dfo-osdt/osp

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Dec 2, 2024
Dec 5, 2024
Aug 22, 2024
Dec 4, 2024
Dec 4, 2024
Sep 16, 2024
Nov 29, 2024
Dec 5, 2024
Nov 28, 2024
Jul 12, 2022
Dec 3, 2024
Jul 12, 2022
Aug 21, 2024
Nov 29, 2024
Jul 12, 2022
Nov 6, 2024
Sep 27, 2023
Nov 20, 2024
Feb 22, 2023
Jul 12, 2022
Jun 28, 2023
Apr 10, 2024
Dec 2, 2024
Dec 5, 2024
Oct 1, 2024
Aug 9, 2024
Dec 5, 2024
Feb 27, 2023
Aug 21, 2024
Aug 9, 2024
Dec 5, 2024
Oct 1, 2024
Oct 31, 2024

Repository files navigation

DFO Open Science Portal

A web-based application to promote open science and track science publications within Fisheries and Oceans Canada.

Contribution Guidelines

For now, we'll use spatie.be's excellent guidelines. Additional guidelines will be added here as we progress.

Get Started

Before you begin, ensure you have the following prerequisites installed:

  1. Install dependencies:

    composer install
    pnpm install
  2. Set up environment variables:

    cp .env.example .env
    php artisan key:generate
  3. Run database migrations:

    php artisan migrate
  4. Start the development servers:

    composer run dev

Built With

This repo has both the front end and backend code. The front end is a SPA that consumes the API backend.

Front-end Stack (Single Page Application)

  • 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:

Back-end Stack

Contributions

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)]

Commit Types

[
  'build',
  'chore',
  'ci',
  'docs',
  'feat',
  'fix',
  'perf',
  'refactor',
  'revert',
  'style',
  'test'
]

Running Tests Locally

Backend Tests

php artisan test

Frontend Tests

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.