/platform

The Accessibility Exchange platform.

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

The Accessibility Exchange

Project license Latest release Check status Code coverage Localization status

The Accessibility Exchange is a two-year initiative managed by the Institute for Research and Development on Inclusion and Society (IRIS) that sets out to create an online platform which will support processes where people with disabilities have the power to make sure that policies, programs, and services by federally regulated organizations are accessible to them and respect their human rights. Current consultation processes are built on a foundation of systemic ableism—they lack accountability, follow-through, and don't honour the expertise of people with disabilities.

The Accessibility Exchange platform is co-designed and developed by the Inclusive Design Research Centre at OCAD University.

Technical Details

The platform is built as a progressive web application using the Laravel 8 framework.

Installation

For general deployment information, please see the Laravel 8.x deployment documentation.

The platform requires the following:

The deployment process should follow all the recommended optimization processes.

Development environments

In development environments, a deployment should be followed by running a fresh migration and the development database seeder:

php artisan migrate:fresh --force
php artisan db:seed DevSeeder --force

NOTE: This will overwrite all existing database tables.

Production environments

In production environments, a deployment should be followed by running all available migrations:

php artisan migrate

Development

Local development uses either the Laravel Sail Docker environment or Laravel Valet.

Local development setup using Laravel Sail

  1. Install Docker Desktop.

  2. Add an alias to your shell as described here.

  3. Fork and clone the project repository (easiest with the Github CLI):

    gh repo fork accessibility-exchange/platform --clone
    cd platform
  4. Create a .env file from the included example file:

    cp .env.example .env

    Then, change the APP_ENV value to local:

    APP_ENV=local
  5. Generate an encryption key for CipherSweet:

    openssl rand -hex 32

    Add it to your .env file:

    CIPHERSWEET_KEY="<your key>"
  6. Start the development environment by running the following command from within the project directory:

    sail up -d
  7. Install Composer and NPM dependencies:

    sail composer install
    sail npm install
  8. Generate an application key:

    sail artisan key:generate
  9. Run the required database migrations:

    sail artisan migrate
  10. Download the application fonts:

    sail artisan google-fonts:fetch

For comprehensive instructions, consult the Laravel documentation. Here's an overview of how some key tasks can be carried out using Sail:

  • Composer commands may be executed by using sail composer <command>.
  • NPM commands may be executed by using sail npm <command>.
  • Artisan commands may be executed by using sail artisan <command>.

Local development setup using Laravel Valet

  1. Install Homebrew.

  2. Install PHP 8.1 via Homebrew:

    brew install php@8.1
  3. Install Composer.

  4. Install Valet:

    composer global require laravel/valet
    valet install
  5. Fork and clone the project repository (easiest with the Github CLI):

    gh repo fork accessibility-exchange/platform --clone
    cd platform
  6. Create a .env file from the included example file:

    cp .env.example .env

    Then, change the APP_ENV value to local:

    APP_ENV=local
  7. Generate an encryption key for CipherSweet:

    openssl rand -hex 32

    Add it to your .env file:

    CIPHERSWEET_KEY="<your key>"
  8. Install Composer and NPM dependencies:

    composer install
    npm install
  9. Generate an application key:

    php artisan key:generate
  10. Create a database:

    mysql -uroot -e "create database accessibilityexchange;"
  11. Run the required database migrations:

    php artisan migrate
  12. Download the application fonts:

    php artisan google-fonts:fetch
  13. Tell Valet to serve the application:

    valet link
  14. Install Mailhog so that you can access transactional email from the platform:

    brew install mailhog
    brew services start mailhog

    Then, make sure that your .env file contains the following values:

    MAIL_MAILER=smtp
    MAIL_HOST=127.0.0.1
    MAIL_PORT=1025

    You will now be able to access mail that the platform sends by visiting http://127.0.0.1:8025 or http://localhost:8025. For more information and additional configuration options, read this blog post.

For comprehensive instructions, consult the Laravel documentation. Here's an overview of how some key tasks can be carried out using Valet:

  • Composer commands may be executed by using composer <command>.
  • NPM commands may be executed by using npm <command>.
  • Artisan commands may be executed by using php artisan <command>.

Running tests

The project uses Pest for testing. For more information about testing Laravel, read the documentation.

Development workflow

  • This project uses Conventional Commits, enforced by commitlint. All commit messages and pull request titles must follow these standards.
  • The dev branch contains features that have been prototyped and gone through one or more co-design sessions.
  • Feature development must take place in a fork, in a branch based on the dev branch. Feature branches must be named according to the format feat/<feature>.
  • Before opening a pull request, developers should run composer format && composer analyze && php artisan test --coverage to ensure that their code is properly formatted, does not cause static analysis errors, and passes tests. Depending on the code coverage, more tests may need to be written to ensure that code coverage does not drop.
  • Once a feature is ready to merge into dev, the merge must be performed using a squash commit.
  • The production branch contains refined features that are considered production-ready.
  • Prereleases must be tagged from the dev branch.
  • Releases must be tagged from the production branch.

License

The Accessibility Exchange platform is available under the BSD 3-Clause License.