Skip to content

Latest commit

 

History

History
89 lines (66 loc) · 1.68 KB

README.md

File metadata and controls

89 lines (66 loc) · 1.68 KB

Ma petite permanence

MPP is a simple progressive web app that allows users to note data about permanences

Setup

Backend

It is a Symfony application with API platform, so you will need

Database

  • Install Psql
  • Connect to postgres psql
  • Create a db, user, and grant privileges
CREATE USER mpp WITH PASSWORD 'mpp';
CREATE DATABASE mpp;
GRANT ALL PRIVILEGES ON DATABASE "mpp" to mpp;

To start up run :

symfony composer install
symfony console doctrine:migrations:migrate
symfony server:ca:install
symfony serve

Frontend

It is a React application, so you need:

  • NodeJs (11 is good)
  • yarn (1.19 is good)

Then to start, open in another terminal

cd client
yarn
yarn start
  • You can now browse the frontend here
  • As usual, you will get a CORS error on your local computer when the frontend will query the backend, there are plenty ways of solving the problem

Authenticating

  • Login via login form
  • Or SSI via a reconnect.fr Google account
  • Or SSO via a Reconnect Pro Account

Testing

php ./vendor/bin/simple-phpunit tests
# Or using makefile
make test

Deployment

php ./vendor/bin/dep deploy
# Or using Make
make deploy

Code quality standards

We use php-cs-fixer, rector, and phpstan

php ./vendor/bin/rector process
php ./vendor/bin/phpstan analyse
php ./vendor/bin/php-cs-fixer fix src --allow-risky=yes
php ./vendor/bin/php-cs-fixer fix tests --allow-risky=yes
# Or using Make
make rector
make stan
make lint
# Or running all at once
make cs