GithubHelp home page GithubHelp logo

modulo's Introduction

Modulo

The Modulo project.

How to install

  • Clone the project using git clone [email protected]:YummYume/modulo.git
  • Copy the .env file in the root folder and name it .env.local, override any needed variable (!!if you change the db username and/or password, you also need to change the configuration for the mariadb connection in api/.env!!)
  • Copy the docker-compose-dev.yml.dist in the root folder and name it docker-compose-dev.yml, override any needed configuration
  • Run make start
  • Extra : add 127.0.0.1 modulo.local api.modulo.local admin.modulo.local in your hosts file
  • Extra : copy the api/.php-cs-fixer.dist.php file and rename it .php-cs-fixer.php and configure your IDE to use this file with the PHP-CS-Fixer extension
  • You can now access the different services of Modulo (using localhost or modulo.local)

Ports

  • API (Symfony) : 80 (http, redirects to 443) and 443 (https)
  • App (React) : 3000 (!!uses https for jwt!!)
  • DB (default mariadb port) : 3306
  • phpmyadmin : 8080
  • Mailcatcher : 1080

Commands

  • make start : executes make rm, make up, make perm, make jwt-keypair, make db-drop, make yarn-api-compile and make sync-dependencies, in this exact order
  • make up : kills every running container and rebuilds + run them, then executes make perm, make composer and make jwt-keypair, in this exact order
  • make up-db : executes make up and make db, in this exact order
  • make stop : stops and kills every running container
  • make rm : remove stopped containers
  • make down : stops and removes all containers, networks, volumes and images
  • make db : creates everything related to the database (including fixtures)
  • make db-drop : drops the current database and recreates it with make db
  • make db-migrate : execute migrations for the api
  • make perm : grants permissions for the api folders
  • make ssh-api : sh in the api container
  • make ssh-app : sh in the app container
  • make ssh-nginx : bash in the nginx container
  • make composer : runs composer install -n for the api container
  • make jwt-keypair : runs php bin/console lexik:jwt:generate-keypair in the api container to generate the jwt keys
  • make yarn : runs yarn install for the app container
  • make yarn-api : runs yarn install for the api container
  • make yarn-api-compile : runs make yarn-api, make assets-api and yarn dev for the api container
  • make yarn-api-watch : runs make yarn-api, make assets-api and yarn watch for the api container
  • make assets-api : installs assets for the api container
  • make composer-sync : runs make composer and make sync-dependencies-api, in this exact order
  • make yarn-sync : runs make yarn and make sync-dependencies-app, in this exact order
  • make yarn-api-sync : runs make yarn-api and make sync-dependencies-yarn-app, in this exact order
  • make cc : clears cache for the api container
  • make cl : clears the nginx logs (the nginx container must be STOPPED to run this command)
  • make php-cs-fixer : runs php-cs fixer for the src folder of the api
  • make lint : runs yarn lint for the app folder
  • make analyze : runs yarn analyze for the app folder (reports are under app/.next/analyze)
  • make sync-dependencies-api : syncs the vendor api folder with the host
  • make sync-dependencies-app : syncs the node_modules app folder with the host
  • make sync-dependencies-yarn-api : syncs the node_modules api folder with the host
  • make sync-dependencies : runs make sync-dependencies-api, make sync-dependencies-app and make sync-dependencies-yarn-api, in this exact order
  • make cypress : runs yarn cypress in the app container (see the Tests section below for more info)
  • make cypress-headless : runs yarn cypress:headless in the app container (no GUI)

Install a new dependency

This is important : To install a yarn or composer package, ssh into the container (make ssh-app or make ssh-api) and install it there, then run make sync-dependencies (or any sync-dependencies command to sync only the required container)

Extra

  • Nginx logs are available in nginx/logs
  • Use make commands for Windows :
    • Install GnuWin32 here
    • Add the make.exe (GnuWin32/bin) to your PATH
  • If a command does not work, use make perm and make sure you are running your cmd as an administrator

Formatters

  • JS : Prettier (using .prettierrc config file) and Eslint (using .eslintrc.json config file)
    In case the VScode extension doesn't work properly and throws errors like Parsing error : Cannot find module 'next/babel', add the following in your settings.json file :
    "eslint.workingDirectories": [
      "./app"
    ]
    
  • PHP : PHP-CS-Fixer (using api/.php-cs-fixer.php config file)

Tests

You can run tests with Cypress :

  • Download VNC Viewer here
  • Connect to 127.0.0.1:5920 in VNC Viewer
  • Run make cypress to launch the Cypress GUI in the VNC Viewer
  • You can also run make cypress-headless for CL tests only (no GUI)

Demo

modulo's People

Contributors

yummyume avatar leobruant avatar tristan-evenot avatar nicolas-nodevo avatar

Watchers

 avatar

modulo's Issues

Improve Docker

  • - Improve performances for Windows
  • - Allow node_modules to be accessible by the IDE
  • - Make hot reload work for Windows

US-24 - Fonctions nominatives

En tant qu’utilisateur habilité, je ne peux ajouter des invitations nominatives à un événement que si ma fonction actuelle est dotée de cette habilitation.

US-15 - Changement de scope

En tant qu’utilisateur connecté, à tout moment je peux changer de scope en choisissant parmi tous ceux disponibles.

US-23 - Fonctions invitées

En tant qu’utilisateur habilité, je ne peux personnaliser les fonctions invitées d’un événement que si ma fonction actuelle est dotée de cette habilitation.

US-4 - Fonctions invitées

En tant qu’admin, je peux définir quelles fonctions sont invitées par défaut à une catégorie d’événement.

US-38 - Invité par fonction

En tant qu’utilisateur, je suis invité à un événement si la structure associée à au moins un de mes scopes fait partie des structures invitées ou est enfant de l’une d’elles et que la fonction de ce même scope est invitée.

Style global de l'application

Voir pour le style global de l'application (alerts, navbar, couleurs primaires, etc...) et implémenter ce style grâce aux modules scss et le fournisseur de thème MUI (déjà mis en place).

US-32 - Événement annulé

En tant qu’utilisateur invité à un événement, si ce dernier est annulé alors que j’ai déjà été notifié par mail je dois recevoir une nouvelle notification par mail pour m’indiquer l’annulation.

US-34 - Blocage invitations

En tant qu’utilisateur habilité, lorsque je modifie un événement pour lequel les invitations ont été envoyées, je ne peux plus modifier la date d’envoi des invitations.

US-31 - Suppression des événements enfants

En tant qu’utilisateur habilité, je peux supprimer les événements des structures enfant de celle de mon scope si ma fonction courante est dotée de l’habilitation correspondante.

US-37 - Filtre structure

En tant qu’utilisateur habilité, je peux filtrer les événements affichés dans le calendrier par structure.

US-17 - Agenda direct

En tant qu’utilisateur connecté je peux voir les événements actifs de la structure associée à mon scope actuel ou aux structures enfants de celle-ci.

US-14 - Accueil connecté

En tant qu’utilisateur, une fois connecté, sur la page d’accueil je dois voir mes scopes disponibles et si mon profil le permet, je peux aussi accéder à l’agenda et à la création d’un nouvel événement.

US-6 - Création scope

En tant qu’admin je peux créer un ou plusieurs scopes pour un utilisateur (fonction + structure).

US-28 - Modification des événements enfants

En tant qu’utilisateur habilité, je peux modifier les événements des structures enfant de celle de mon scope si ma fonction courante est dotée de l’habilitation correspondante.

US-35 - Envoi d'invitations

En tant qu’utilisateur habilité, lorsque je modifie un événement pour lequel les invitations ont été envoyées, je peux envoyer des invitations aux nouveaux invités via un bouton.

US-33 - Compteur

En tant qu’utilisateur habilité, au fur et à mesure de la création / modification d’un événement, je vois le nombre d’invités se mettre à jour automatiquement.

US-36 - Filtre fonction

En tant qu’utilisateur habilité, je peux filtrer les événements affichés dans le calendrier par fonction.

US-7 - Envoi des invitations

En tant qu’utilisateur, je reçois une invitation aux événements auxquels je suis invité au moment opportun selon la configuration prévue.

US-19 - Agenda amont adhérent

En tant qu’utilisateur connecté je peux voir les événements actifs de la structure parente de celle de mon scope actuel si j’ai été invité nominativement.

US-25 - Visibilité

En tant qu’utilisateur habilité, je ne peux changer le statut “Événement visible” que si ma fonction est dotée de cette habilitation.

US-21 - Création événement

Si je suis habilité je peux créer un nouvel événement en cliquant sur une journée ou en cliquant sur un bouton “+”.

US-12 - Authentification

En tant qu’utilisateur je peux me connecter à l’application avec mon n° d’adhérent et mon mot de passe.

Transition changement de page

Le but est d'ajouter une transition ou au moins d'empêcher l'utilisateur de pouvoir cliquer autre part sur la page alors qu'il est déjà en train de changer de page. Voir AnimatePresence ou router.events. Le but est de ne pas permettre une surcharge ou un résultat inattendu pendant le chargement d'une page.

US-16 - Agenda

En tant qu’utilisateur connecté, si je suis habilité je peux voir l’agenda. L’affichage est adaptatif selon ma résolution.

US-18 - Agenda amont fonction

En tant qu’utilisateur connecté je peux voir les événements actifs de la structure parente de celle de mon scope actuel si la fonction de mon scope est invitée.

US-39 - Invité nominatif

En tant qu’utilisateur, je suis invité à un événement si je fais partie de la liste des personnes invitées nominativement.

US-20 - Agenda amont public

En tant qu’utilisateur connecté je peux voir les événements actifs de la structure parente de celle de mon scope actuel si leur visibilité est publique.

US-22 - Événement vide

En tant qu’utilisateur habilité, je ne peux enregistrer un événement que s’il concerne au moins un invité.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.