Skip to content

Ecodev/artisans

Folders and files

NameName
Last commit message
Last commit date
Sep 6, 2024
Oct 11, 2024
Feb 18, 2025
Nov 15, 2024
Nov 20, 2024
Nov 13, 2024
Sep 29, 2024
Apr 2, 2019
Feb 27, 2025
Jan 17, 2025
Nov 8, 2024
Nov 13, 2024
Apr 25, 2023
Mar 4, 2022
Nov 26, 2024
Apr 1, 2024
Nov 7, 2018
Apr 27, 2023
Oct 17, 2024
Jun 21, 2024
Feb 5, 2025
Mar 26, 2025
Jun 21, 2023
Mar 10, 2025
Nov 7, 2018
Jul 11, 2024
Nov 2, 2023
Oct 30, 2020
May 11, 2023
Feb 15, 2021
Oct 3, 2024
Mar 10, 2025

Repository files navigation

Les artisans de la transition

Build Status Scrutinizer Code Quality   Code Coverage

Introduction

Les artisans de la transition is a web application based on GraphQL for the API and Angular for the client.

Installation

The recommended way to get a working copy is the following:

  1. Set up a nginx virtual host to point to htdocs/ directory and to include configuration/nginx.conf
  2. Create a database in MariaDB named "artisans"
  3. Configure database in config/autoload/local.php (see example config/autoload/local.php.dist)
  4. Finally, build the app:
./bin/build.sh

Development

Server

To switch the API to development (to enable logging), run:

composer development-enable

Logs will be available in logs/all.log.

Configuration caching

When in development mode, the configuration cache is disabled, and switching in and out of development mode will remove the configuration cache.

You may need to clear the configuration cache in production when deploying if you deploy to the same directory. You may do so using the following:

$ composer clear-config-cache

Client

Run yarn dev for a dev server. Navigate to http://artisans.lan:4210/. The app will automatically reload if you change any of the source files.

Testing

PHPUnit

PHPUnit tests require a reference database dump. When the dump is loaded it will destroy existing database. This must be done once before running tests. Then each test is ran within a transaction which is rolled back, so the database state is always predictable.

To run PHPunit test:

./bin/load-test-data.php
./vendor/bin/phpunit # as many times as necessary

Karma

Run ng test to execute the unit tests via Karma.