_This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version._
_This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details._
## Description
Cette application permet de comparer l'impact environnemental de trois différents scénarios de réunions, pour différentes sphères de dommage : impact sur la santé humaine, sur la qualité des écosystèmes, sur le changement climatique et sur les ressources.
Les résultats sont présentés sous forme de pourcentage, par rapport à celui ayant le plus d'impact.
## Captures d'écran


## Technologies
Le back-end utilise `Node.js` tandis que le front-end utilise `VueJS`.
Avec Windows : [télécharger le .msi](https://nodejs.org/dist/v12.14.0/node-v12.14.0-x86.msi)
Avec Windows : [télécharger le .msi](https://nodejs.org/dist/v12.14.0/node-v12.14.0-x86.msi)
### Installer Vue CLI
```bash
npm install-g @vue/cli
```
### Pour lancer le projet
### Pour lancer le projet
```bash
```bash
# Installer les dépendances
# Installer les dépendances
...
@@ -20,15 +49,286 @@ $ npm run devstart
...
@@ -20,15 +49,286 @@ $ npm run devstart
```
```
### Vérifier la syntaxe
### Vérifier la syntaxe
Ce projet respecte les [règles syntaxiques standard](https://standardjs.com/rules.html) de Javascript. Pour vérifier le code :
Pour vérifier le code :
```bash
```bash
$ npm run lint
$ npm run lint
```
```
### Lancer les tests unitaires
## Communication entre le front-end et le back-end
```bash
$ npm test
Le client effectue une requête POST sur la route `api/meeting` afin d'obtenir les impacts comparatifs et équivalents.
### Exemple de payload JSON pour la requête POST
Avec 3 scénarios.
```json
[
{
"meetingDuration":60,
"numberOfParticipants":9,
"hardware":[
{
"name":"LAPTOP",
"french":"Ordinateurs portables",
"qty":4
},
{
"name":"DESKTOP",
"french":"Ordinateurs fixes",
"qty":3
},
{
"name":"LOGITECH_KIT",
"french":"Kits de vidéo-conférence",
"qty":0
},
{
"name":"COMPUTER_SCREEN_LCD",
"french":"Ecrans supplémentaires",
"qty":1
},
{
"name":"PROJECTOR",
"french":"Vidéo-projecteurs",
"qty":0
}
],
"software":{
"name":"HANGOUTS"
},
"journey":[
{
"distance":14,
"mean":"PLANE_INTERCONTINENTAL_ONE_PERSON_KM"
}
],
"meetingScenario":"Scenario A"
},
{
"meetingDuration":60,
"numberOfParticipants":11,
"hardware":[
{
"name":"LAPTOP",
"french":"Ordinateurs portables",
"qty":4
},
{
"name":"DESKTOP",
"french":"Ordinateurs fixes",
"qty":7
},
{
"name":"LOGITECH_KIT",
"french":"Kits de vidéo-conférence",
"qty":0
},
{
"name":"COMPUTER_SCREEN_LCD",
"french":"Ecrans supplémentaires",
"qty":0
},
{
"name":"PROJECTOR",
"french":"Vidéo-projecteurs",
"qty":0
}
],
"software":{
"name":"JITSI"
},
"journey":[
{
"distance":8,
"mean":"TRAIN_REGIONAL_ONE_PERSON_KM"
},
{
"distance":5,
"mean":"TRAMWAY_ONE_PERSON_KM"
}
],
"meetingScenario":"Scenario B"
},
{
"meetingDuration":120,
"numberOfParticipants":6,
"hardware":[
{
"name":"LAPTOP",
"french":"Ordinateurs portables",
"qty":2
},
{
"name":"DESKTOP",
"french":"Ordinateurs fixes",
"qty":1
},
{
"name":"LOGITECH_KIT",
"french":"Kits de vidéo-conférence",
"qty":1
},
{
"name":"COMPUTER_SCREEN_LCD",
"french":"Ecrans supplémentaires",
"qty":0
},
{
"name":"PROJECTOR",
"french":"Vidéo-projecteurs",
"qty":4
}
],
"software":{
"name":""
},
"journey":[
],
"meetingScenario":"Scenario C"
}
]
```
```
### Exemple de retour JSON pour la requête POST
## Wiki
```JSON
Voir le [wiki](https://gitlab.utc.fr/tx-techno-num/impactometre/wikis/Accueil) pour détails sur certains aspects du projet, notamment des définitions sur les données manipulées, et des guides sur les technos utilisées.