Skip to content

Latest commit

 

History

History
120 lines (84 loc) · 3.17 KB

DEV.md

File metadata and controls

120 lines (84 loc) · 3.17 KB

Development

Installation

Requirements

To run the development environment you need at least:

  • Docker
  • PHP 5.3 (to run Composer)

Install application

To install the application simply run the commands

make install
make app

Start the application

To start the application and the server, run the following command

make run

If correctly configured, the application will be available at the address https://livres.localhost

Stack

Ops Stack

The development stack is based on Docker (and Docker Compose) and Traefik.

Backend Stack

The backend stack use:

Frontend Stack

The frontend stack use Svelte and Sass (SCSS)

Code quality stack

The code quality stack use:

Making a modification

Validate your code

To validate your code (to ensure that it meet the project quality requirement), you can use analyze option of make. This command came in several variations:

  • analyze-php to only check for PHP code
  • analyze-svelte to only check Svelte code
  • analyze-css to only validate CSS and SCSS code
  • analyze to do the three above in one go
make analyze

Auto-fixing your code

You can fix some errors automatically with the fix-code option of make. The command came in several variations:

  • fix-code-php to fix PHP coding standard as well as rearrange the composer.json
  • fix-code-svelte to fix Svelte coding standard
  • fix-code-css to fix CSS and SCSS coding standard
  • fix-code to do the three above in one go
make fix-code

NOTICE: Please be careful, auto-fixing the code will make changes in your code, some changes can alter the behavior!

Tips

Create a demo content

make demo

Useful commands

Reindex the book search index

docker-compose exec php bin/console book:search:reindex

Reindex the book suggestion index

docker-compose exec php bin/console book:search:rebuild-suggestion

Create an admin user

docker-compose exec php bin/console admin:create:user admin --role ROLE_ADMIN