diff --git a/docs/ecolyo/application/deploy.md b/docs/ecolyo/application/deploy.md index 02267e2935beaddf7af4d51c443f39a7a3b037c5..0bb39a306d88e4eaf3bfb007158bc7b2b4d09d46 100644 --- a/docs/ecolyo/application/deploy.md +++ b/docs/ecolyo/application/deploy.md @@ -31,12 +31,12 @@ Now you should see the name of your distribution in the list. ### Setup your distribution -Start Up Updating the packages list by typing : +Start updating the packages list by typing : ``` sudo apt update ``` -Install the nodejs using the apt package manager +Install nodejs using the apt package manager ``` sudo apt install @@ -87,7 +87,7 @@ First open a new session and connect to the distant host **192.168.62.31**. Don' ## Deploy Ecolyo -### Deploy on Alpha +### Deploy on Alpha - Scaleway #### Windows @@ -112,4 +112,4 @@ To deploy on the llle-build environment, you'll have to drag and drop your build #### Linux -From your current branch, run ```yarn build``` then ```sudo yarn deploy_dev``` to instantly deploy your working branch on the latest tagged Ecolyo container registry. +From your current branch, run ```yarn build``` then ```sudo yarn deploy_dev``` to instantly deploy your working branch on the latest tagged Ecolyo-dev container registry. diff --git a/docs/ecolyo/application/scaffolding.md b/docs/ecolyo/application/scaffolding.md index ba021eefec8ee5a2d94fcb6cf345d11209daf1d3..0110961c29e93a6c2f64e8e316ca275c26959a41 100644 --- a/docs/ecolyo/application/scaffolding.md +++ b/docs/ecolyo/application/scaffolding.md @@ -5,16 +5,17 @@ In this section, you will find information about the project file structure and | Folder/File | Purpose | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | assets | The application's assets, contains fonts, svg and png files | +| components | The application's components. | | components/CommonKit | In this folder you'll find global components such as Buttons, Cards, Icons, etc... Many of these components are overrided material-ui components | | components/Hooks | This folder contains the hooks of the application | -| App.jsx | The root component, it calls the Container component '**ViewContainer**' which is our main component | +| components/App.tsx | The root component, it calls the Routes component | | constants | This folder contains constants files such as **config.json** for the konnectors fluid config, **connexionWaitingText.json** for the sentences displayed while fetching fluid data, and a folder **consumptionConstants** that contains json files with constants for consumption calculation and comparison | | db | In this folder, you'll find JSON data used for challenges, ecogestures, and the FAQ. | | doctypes | This folder contains the **cozy** doctypes, you can see more on [Cozy Documentation](https://github.com/cozy/cozy-doctypes) | -| enum | This folder contains enums for Fluid types, Screen types, and Timesteps. | +| enum | This folder contains all enums like Fluid types, Screen types, and Timesteps. | | locales | This folder contains JSON data used by the translation system i18n provided by [Cozy-ui](https://github.com/cozy/cozy-ui) | | models | This folder contains all models | -| services | Here you'll find all the services | +| services | This folder contains all the services | | store | This folder contains all actions and reducers classified by component | | styles | The styles folder you'll find a **base** folder that contains our variables and a **components** folder that contains components styles | | targets | diff --git a/docs/ecolyo/application/services.md b/docs/ecolyo/application/services.md index 9dd6dde8a4df76df7fb002c525992b57a490780d..9fba35ad5599200adfb2955f98daec69eeb986a1 100644 --- a/docs/ecolyo/application/services.md +++ b/docs/ecolyo/application/services.md @@ -1,6 +1,3 @@ -!!! warning "" - :construction: Section under Construction :construction: - ## Cron Services In order to build an automated task within our cozy-stack, we can create *services* which are javascript files called from a trigger job. @@ -15,12 +12,35 @@ File location is determined after the build, see [here](https://forge.grandlyon. !!! note "Cron" See the cron definition at [cozy-stack](https://docs.cozy.io/en/cozy-stack/jobs/#cron-syntax). -### Services +## Ecolyo services Located under **src\targets\services** -#### Monthly report notification +### Monthly report notification + +#### Definition of the service +The service will run the 3rd of each month at 10.00 am, as defined in the manifest: + +``` +"monthlyReportNotification": { + "type": "node", + "file": "services/monthlyReportNotification/ecolyo.js", + "trigger": "@cron 0 0 10 3 * *" + } +``` +#### Main responsabilities of the service + +The service is reponsible of sending a mail to user to warn him about the availability of a new information in the Analyse. + +Main steps are the following: + - Check the "sendReportNotification" attribute in the com.grandlyon.ecolyo.profile doctype. If true, service will continue, else it will stop. + - Fetches metadata to customize the mail (Public name, instance url). + - Build the mail. + - Send the mail. + +### Sending mail -Fetches metadata to customize the mail (Public name, instance url). +Doc of cozy for sendmail worker: https://docs.cozy.io/en/cozy-stack/workers/#sendmail-worker -Send mail containing a link to the user instance so that he can be warned about the update of its monthly report and visualize it. +!!! Send mail in local + In local you can use the mail hog tools to see the mail sent by the stack using http://cozy.tools:8025/ \ No newline at end of file diff --git a/docs/ecolyo/functionalities/challenge.md b/docs/ecolyo/functionalities/challenge.md index c6f738227f93cdf59cc547c374830b0721f5fe78..4e5dc2a3d6ceb844cf01715f9daf68d3418830ef 100644 --- a/docs/ecolyo/functionalities/challenge.md +++ b/docs/ecolyo/functionalities/challenge.md @@ -8,27 +8,79 @@ A quiz includes 4 basic questions and one custom question. All basics Questions are created in the quizEntity.json. We have to add : -- questionLabel => Label of the question -- Answers => An array of three answers (answerLabel, isTrue) -- description => Explain the question -- source => Source of the explanaition +| Field | Description | +| ------- | --------- | +| questionLabel | Label of the question | +| answers | Array of 3 answers (answerLabel, isTrue) | +| description | Explains the question | +| source | Source of the explanation | This questions and answers are in random order. In the question page the user have to select an answer and click validate. + Then, he sees the right answer and a modal with the explanation and the source. After this modal, he goes to the next question. -Depends on the answer, the question result state is set either correct or incorrect. + +Depending on the answer, the question result state is set either to correct or incorrect. If it is a right answer, the quiz result is incremented by one. ### Custom Question -At the end of every quiz, we're creating a custom question. During the creation of the quiz, we have to add : +At the end of every quiz, we're creating a custom question. +Here are the fields used to create a custom question + +| Field | Type | Description | +| ---------- | ------------------ | ---------------------------------------------------------------- | +| type | CustomQuestionType | Type of custom qusetion: DATA or CALCULATION. | +| timeStep | TimeStep | Time step of the result value (DAY / WEEK / MONTH / YEAR). For CALCULATION type it's represent daily / weekly / monthly / yearly average. | +| interval | TimeStep | Interval in which the data will be searched (DAY / WEEK / MONTH / YEAR) | +| period | CustomPeriod | Use to define a specific period for the interval { day? / month? / year? }. If not assigned the period will be the last interval (example: last week) | +| result | UserQuizState | Indicate the state of the custom question (UNLOCKED, CORRECT, UNCORRECT) | + +Calculation of custom question is done by conbinaison of all parameters: + +#### Type DATA + + - If *period* is empty. + + Retrieve the **max load** of day/month/year (define by *timeStep*) from the last week, month, year (define by *interval*). + => example: What day did I consumme the most on the last week ? + type = CustomQuestionType.DATA + timeStep = TimeStep.DAY + interval = TimeStep.WEEK + period = {} + + - If *period* is not empty + + Retrieve the **max load** of day/month/year (define by *timeStep*) from week, month, year (define by *interval*) of *period* + => example: What month did I consumme the most on year 2020 ? + type = CustomQuestionType.DATA + timeStep = TimeStep.MONTH + interval = TimeStep.YEAR + period = {year: 2020} -- type => data or calculation -- period => the period selected for the calcul -- timestep => the interval of the calcul (Day, Month, Year) - We get all this information to determine the custom question (All information are in the quizEntity.json). Depending of the question type, the system calcul a maximum or an average data. - Then, he generate two randoms answers following the right answer. +#### Type CALCULATION + + - If *period* is empty + + Retrieve the **average** of day/month/year (define by *timeStep*) from the last week, month, year (define by *interval*). + => example: Which is your daily average consumption on last week ? + type = CustomQuestionType.CALCULATION + timeStep = TimeStep.DAY + interval = TimeStep.WEEK + period = {} + + - If *period* is not empty + + Retrieve the **average** of day/month/year (define by *timeStep*) from week, month, year (define by *interval*) of *period* + => example: Which is your daily average consumption on january ? + type = CustomQuestionType.DATA + timeStep = TimeStep.DAY + interval = TimeStep.MONTH + period = {month: 1} + + +Then, two randoms answers are generated after defining the right answer. A user can stop during a quiz and picks up where he left off. To define where the user left off, we have to check if at least one of the question result status is unlocked. @@ -36,17 +88,17 @@ Once the custom question is answered, the quiz state is set to done. Then, the u ## Exploration -Exploration is a feature which in the user got to do an action in order to help him to discover all features of this app. -They are 4 types of action : +Exploration is a feature where the user has to do an action in order to help him discover all features from ecolyo. +They are 4 types of actions: - DECLARATIVE : The user has to do something outside of the app => No way for the app to know if the user did it so we trust him. -- ACTION : Action whitin the app. When the user finish he got a notification. -- CONSUMPTION : He got to do something in his consumption view. -- ECOGESTURE : He need to have a look to a specific Ecogesture. +- ACTION : Action whitin the app. When the user finishes he gets a notification. +- CONSUMPTION : He has to do something in his consumption view. +- ECOGESTURE : He needs to look at a specific Ecogesture. In order to check if an exploration (which is not declarative) is done, a hook called useExploration is used.It is called on component that has to check if an exploration is done. -This hook called exploration service to check exploration by passing two parameter(the current challenge and the user exploration id associated with the exploration id of the current challenge). This check is done only if: +This hook called exploration service to check exploration by passing two parameters (the current challenge and the user exploration id associated with the exploration id of the current challenge). This check is done only if: - There is a current challenge - exploration.id of the current challenge is equal to the user exploration id @@ -54,7 +106,7 @@ This hook called exploration service to check exploration by passing two paramet Depends on the type of an exploration, either the exploration remains in progress until it is fully done or it ends. -When the user finish the exploration, he got a success message and five more stars on his challenge progression. +When the user finish the exploration, he gets a success message and five more stars are added to his challenge progression. ## Action @@ -94,14 +146,20 @@ The accomplishment of an action is only conditionned by the duration. Once the u ### On launch In order to find a valid reference period we search for a period which is defined by the duel duration. - We check the most recent period first if it's complete and then we go farther and farther in the time if the ones before got missing values. - We also define a threshold for a maximum old period (6 months for the moment determined in the code ==> hardcoding). + +We check the most recent period first if it's complete and then we go farther and farther in time if the ones before got missing values. +We also define a threshold for a maximum old period + +!!! note "6 months for the moment - hardcoded." If the thresold is reached and no valid period was found, we alert the user that he can't launch the duel and have to wait before he can retry this process. ### On going -Every time the user go into the duel mode, we are checking if the duel is finished. -if (actualDate - startDate) > duelDuration, the duel is done. +Every time the user goes into the duel mode, we are checking if the duel is finished. +if we have retrieved all data to calculate the user consumption on the duel duration, the duel is done. + +!!! info "In order to not block the user if a value is mising, we are also setting the duel as done when we reach the startDate + delay in day to retrieve the data (based on the fluid) + 1 day. In this case the user consumption is done on known values." + ### On finish diff --git a/docs/ecolyo/functionalities/consumption.md b/docs/ecolyo/functionalities/consumption.md new file mode 100644 index 0000000000000000000000000000000000000000..f3fb274942ab030230995087f55f77c51bcfa0e1 --- /dev/null +++ b/docs/ecolyo/functionalities/consumption.md @@ -0,0 +1,29 @@ +## Description + +Ecolyo allow user to see its consumption in two way: +- with an aggregated view aka HomeView +- with a specific view for a fluid aka SingleFluidView + +## Modal old fluid data + +In order to warn a user that its data is too old regarding a fluid, a modal is displayed when the last date of a fluid is greater than 5 days. + +Depending of the konnector status the user will receive 2 differents messages: + +- if the konnector is in error, the user will be invited to check the konnector +- if the konnector has run successfully but hasn't retrieved data from the last 5 days, the user will be invited to contact the supplier + +## Comparison + +The user can compare its data with a previous period using a switch which will display the previous period on the same chart. +This feature is only available on single fluid charts and is not available at the year time step + +## Time step + +Different time steps can be selected by the user which will display different period on the graph according to the time step. + +- Day: display data at half-an-hour step on a period of one day +- Week: display data at daily step on a period of a week +- Month: display data at daily step on a period of a month +- Year: display data at monthly step on a period of a year +- 5 years: display data at yearly step on a period of 5 years (5 last years) \ No newline at end of file diff --git a/docs/ecolyo/functionalities/ecogesture.md b/docs/ecolyo/functionalities/ecogesture.md new file mode 100644 index 0000000000000000000000000000000000000000..cb9f8a51eb6bbab4ad4f25184b247b3e6974750d --- /dev/null +++ b/docs/ecolyo/functionalities/ecogesture.md @@ -0,0 +1,53 @@ +# Ecogesture + +## All ecogestures screen + +This screen display the full list of ecogestures. User can filter ecogesture by usage. + +## Ecogestures filtered by profile + +This screen display is based on a filtered ecogesture list that fit to the user profile type. +The user can also filter ecogesture by usage. + +Following rules are used to filter the ecogesture: + +### Case ecogesture usage is heating + +We will display the ecogesture if: + +- the ecogesture has electricity fluid and profile type has an individual heating which use electricity fluid. + +OR + +- the ecogesture has gas fluid and profile type has an individual heating which use gas fluid. + +### Case ecogesture usage is ECS +>`ECS = Eau chaude sanitaire` + +We will display the ecogesture if: +- the ecogesture has electricity fluid and profile type has an individual hot water which use electricity fluid. + +OR +- the ecogesture has gas fluid and profile type has an individual hot water which use gas fluid. + +### Case ecogesture usage is ECS + +We will display the ecogesture if: + +- the ecogesture has electricity fluid and profile type has an electricity fluid for cooking. + +OR + +- the ecogesture has gas fluid and profile type has an gas fluid for cooking. + +### Case ecogesture usage is cold water + +We will display the ecogesture if the profile type has individual cold water. + +### Case ecogesture usage is specific electricity + +We will display the ecogesture. + +### Case ecogesture usage is air conditioning + +We will NOT display the ecogesture. \ No newline at end of file diff --git a/docs/ecolyo/functionalities/initialization.md b/docs/ecolyo/functionalities/initialization.md index 006543814096c688f7e6d2b2d285995a1a72d872..f305104199fd2f949d6600423aa54a5ca38bce4c 100644 --- a/docs/ecolyo/functionalities/initialization.md +++ b/docs/ecolyo/functionalities/initialization.md @@ -2,7 +2,7 @@ This section explains how to handle data storage. We handle data storage according to the following process : -The folder /db contains all the JSON entities that are directly stored in the couchDB during the initialization process that is executed in the splash screen. They are stored under their related doctype. +The folder ```/src/db``` contains all the JSON entities that are directly stored in the couchDB during the initialization process that is executed in the splash screen. They are stored under their related doctype. ## Initialization and Updating diff --git a/docs/ecolyo/functionalities/profile_type.md b/docs/ecolyo/functionalities/profile_type.md index ff93bf1ee271bfa6fbd7d4272e6b63557ebc8aed..446563f519b46244b658a282f5bc6ad1c9a8f6fe 100644 --- a/docs/ecolyo/functionalities/profile_type.md +++ b/docs/ecolyo/functionalities/profile_type.md @@ -1,6 +1,6 @@ This section explains the profileType creation process in order to make different comparisons between the actual user's consumtion and its profile type. -# Profile type data +## Profile type data The profileType data are stored in the profile doctype and includes the following informations : @@ -14,6 +14,7 @@ The profileType data are stored in the profile doctype and includes the followin floor: Floor heating: IndividualOrCollective hotWater: IndividualOrCollective + coldWater: IndividualOrCollective individualInsulationWork: IndividualInsulationWork facilitiesInstallation: FacilitiesInstallation hotWaterEquipment: HotWaterEquipment[] @@ -25,14 +26,14 @@ The profileType data are stored in the profile doctype and includes the followin Each profileType value is an enum that you can find in the application. The values are set by default to a default profileType and needs to be completed by the user in order to become accurate. -# Profile type form +## Profile type form User should answer a form to be able to set its profile type. Here is the flow of questions:  -# Profile type methods +## Profile type methods Here you can see the different methods provided by the profileType service. These methods allows to calculate the average consumption depending on the information gathered in user's profileType. @@ -53,7 +54,7 @@ Here you can see the different methods provided by the profileType service. Thes | calculateWarmingCorrectedConsumption(estimatedConsumption: number): number | Apply the different corrections to the estimated heating consumption | | calculateWarmingMonthConsumption(correctedConsumption: number, month: number): number | Apply dju ratio to the corrected heating consumption | -Here is an example of a MonthlyForecast, which is the only function directly called by the analizis component : +Here is an example of a MonthlyForecast, which is the only function directly called by the analyzis component : ```jsx { diff --git a/docs/ecolyo/getting_started/launch_local_application.md b/docs/ecolyo/getting_started/launch_local_application.md index db3cb00a08f9a1ecd1e68ddf11b727938cdcd5ac..31e0edd376ec0bc943ca2c1630d638904427eec4 100644 --- a/docs/ecolyo/getting_started/launch_local_application.md +++ b/docs/ecolyo/getting_started/launch_local_application.md @@ -10,45 +10,7 @@ Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git ``` -### User settings - -Open the project with VSCode and add the following code into .vscode/settings.json: - -``` -{ - "workbench.colorCustomizations": { - /* Put anything you like here */ - }, - "editor.snippetSuggestions": "top", - "editor.tabSize": 2, - "editor.formatOnSave": true, - "diffEditor.ignoreTrimWhitespace": false, - "window.zoomLevel": 0, - "gitlens.advanced.messages": { - "suppressShowKeyBindingsNotice": true - }, - "breadcrumbs.enabled": true, - "workbench.settings.editor": "json", - "editor.tabSize": 2, - "editor.formatOnSave": true, - "editor.formatOnPaste": true -} -``` - -If this file is not empty, you can simply add the follwing lines to it: - -``` - "gitlens.advanced.messages": { - "suppressShowKeyBindingsNotice": true - }, - "breadcrumbs.enabled": true, - "workbench.settings.editor": "json", - "editor.formatOnSave": true, - "diffEditor.ignoreTrimWhitespace": false, - "window.zoomLevel": 0, -``` - -## Installation of the projet +## Installation of the project ### Installation of node modules @@ -73,11 +35,6 @@ If the application starts successfully you should obtain the following message: Once the application is started, run the easy-cozy stack with docker. -!!! info "Fix webpack error on cozy script" -**Deprecated** Updated cozy-script lib -To fix it launch the following command in node_modules/cozy-script folder: -` yarn add webpack ` - ### Run easy-cozy dev stack The dev stack will contain the cozy-stack with some default applications and konnectors and allow you to run this stack locally. @@ -98,7 +55,7 @@ docker pull registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/co #### On windows -Launch the stack will following command: +Launch the stack with the following command: ``` yarn winstack @@ -110,6 +67,7 @@ A Powershell window will open. Wait until the success message: > To exit, press ^C Once successfull you can launch your local cozy with following url: [Cozy local url](http://cozy.tools:8080/) + Local database can also be consulted at the following url: [Cozy local DB](http://localhost:5984/_utils/) #### On Linux @@ -126,12 +84,13 @@ Wait until the success message: > To exit, press ^C Once successfull you can launch your local cozy with following url [Cozy local url](http://cozy.tools:8080/) and connect with the password '**cozy**'. + Local database can also be consulted at the following url: [Cozy local DB](http://localhost:5984/_utils/) ## Import moke data -!!! info "Requirement" -Your dev stack should be running to import the moke data +!!! info "Requirement" + Your dev stack should be running to import the moke data First install ACH using yarn : @@ -142,7 +101,7 @@ yarn global add cozy-ach Next create the "config.js" file base on the "config.template.js" !!! info "" -You can change the period of data generated by changing the following lines: + You can change the period of data generated by changing the following lines: ``` const startingdate = DateTime.local() @@ -155,7 +114,7 @@ You can change the period of data generated by changing the following lines: Just replace -120 by the value needed -Next launch the script **createDayDataFiles.js** available into **scripts** folder +Next launch the script **createDayDataFiles.js** available into the **scripts** folder ``` cd scripts @@ -171,7 +130,7 @@ cd scripts ``` !!! info "" -You'll be prompted for a cozysessid, you can get it in the web console ; in the 'application' tab, look for the cookies and just copy the cozysessid value. +You'll be prompted for a cozysessid, you can get it in the web console ; in the `application` tab, look for the cookies and just copy the cozysessid value. A new browser windows will open and asking you approval to import data. Just click on **Approve** @@ -180,16 +139,16 @@ Finally your data is loaded in the Ecolyo Application ! ## Simulate konnectors connection !!! info "Requirement" -Your dev stack should be running to import data needed to simulate konnectors connection + Your dev stack should be running to import data needed to simulate konnectors connection When using local environment, konnectors are not able to connect. To simulate the connection you can use the script **createConnection.js** available in **scripts** folder. -First update the authorization and cookie information from the "config.js" file (if not create just create it from the "config.template.js" file): +First update the authorization and cookie information from the "config.js" file (if not created just create it from the "config.template.js" file): ``` const authorization = - 'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' + 'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' const cookie = 'cozysessid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ``` diff --git a/docs/ecolyo/getting_started/launch_local_konnector.md b/docs/ecolyo/getting_started/launch_local_konnector.md index 2f4f692dba5c6228a0130fccce621b4c7e2d7452..6ec5953ee2fc0ef2ae2d3ca12e760c1b193315ad 100644 --- a/docs/ecolyo/getting_started/launch_local_konnector.md +++ b/docs/ecolyo/getting_started/launch_local_konnector.md @@ -1,2 +1,25 @@ -!!! info "" - :construction: Section under Construction :construction: \ No newline at end of file +## Cozy ressources + +Please see also the [official cozy documentation](https://docs.cozy.io/en/cozy-konnector-libs/). + +## Run a konnector locally + +To develop a konnector or test it, you will need to be able to run a konnector without the constraints imposed by the cozy stack. + +To help you, cozy developped a **standalone** mode for konnectors. +Simply launch it by typing: + +`yarn standalone` + +This command will create a **konnector-dev-config.json** file if it was not in your project folder before. +This file needs to hold all the informations transmitted by the cozy stack when the konnector runs by default + +- baseUrl +- apiAuthKey +- login +- password and so on... + +Type them all in the *fields* object. + +All data recovered by the standalone konnector will be sotred in the *data* folder. + diff --git a/docs/ecolyo/getting_started/setup_your_environment.md b/docs/ecolyo/getting_started/setup_your_environment.md index 09149b74f4625c25191103d7d8de2fb4c1bb9163..9cee5dcda5d9f27747e3d1a58486a7ab3c11bf73 100644 --- a/docs/ecolyo/getting_started/setup_your_environment.md +++ b/docs/ecolyo/getting_started/setup_your_environment.md @@ -28,8 +28,41 @@ Optional extensions: ### User settings -User settings for Ecolyo are described in this section: **LINK TO SECTION TO ADD** - +Open the project with VSCode and add the following code into .vscode/settings.json: + +``` +{ + "workbench.colorCustomizations": { + /* Put anything you like here */ + }, + "editor.snippetSuggestions": "top", + "editor.tabSize": 2, + "editor.formatOnSave": true, + "diffEditor.ignoreTrimWhitespace": false, + "window.zoomLevel": 0, + "gitlens.advanced.messages": { + "suppressShowKeyBindingsNotice": true + }, + "breadcrumbs.enabled": true, + "workbench.settings.editor": "json", + "editor.tabSize": 2, + "editor.formatOnSave": true, + "editor.formatOnPaste": true +} +``` + +If this file is not empty, you can simply add the follwing lines to it: + +``` + "gitlens.advanced.messages": { + "suppressShowKeyBindingsNotice": true + }, + "breadcrumbs.enabled": true, + "workbench.settings.editor": "json", + "editor.formatOnSave": true, + "diffEditor.ignoreTrimWhitespace": false, + "window.zoomLevel": 0, +``` ## Git The project is using GitLab, you will need to install Git to checkout the projet. diff --git a/docs/ecolyo/index.md b/docs/ecolyo/index.md index 890fe3d37ffffaf93afe226d1d6f82fff5012407..2a44754ea564a35cca83636289c6fae9e819c02d 100644 --- a/docs/ecolyo/index.md +++ b/docs/ecolyo/index.md @@ -1,4 +1,4 @@ -LLLE - Ecolyo is a multi-fluid application solution towards users of the grand lyon metropolis to monitor and optimize their energy consumption. +Ecolyo is a multi-fluid application solution towards users of the grand lyon metropolis to monitor and optimize their energy consumption. !!! info "" If you are a new developper tasked to work on this project, check the [setup your environment](./getting_started/setup_your_environment.md) and [launch the application on local](./getting_started/launch_local_application.md) to start the application. diff --git a/docs/ecolyo/konnectors/egl.md b/docs/ecolyo/konnectors/egl.md index 8a4f7a1ebed4af44b58572e6319d97bce3345c3e..68be63c0f0824a23d5875e5fcbf83618b8afc7a2 100644 --- a/docs/ecolyo/konnectors/egl.md +++ b/docs/ecolyo/konnectors/egl.md @@ -131,10 +131,5 @@ If you're looking for more information about the API, checkout the [complete API | processData | Parse data. Remove existing data from DB using hydrateAndFilter, store filtered data and return the list of filtered data | | authenticate | Authentication method. Requires login, password, baseUrl and ApiAuthKey. | | storeData | Save data in the right doctype db and prevent duplicated keys | -| format | Format data for DB storage and remove bad data | -| processYearAgregation | | -| processMonthlyAgregation | | -| groupBy | | -| reduceYearFunction | | -| reduceMonthFunction | | +| format | Format data for DB storage and remove bad data (former "T" typeagregats remain in response even if the data was added later, leading to duplicated data) | | resetInProgressAggregatedData | Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.egl.year : `{ load: 76.712, year: 2020, ... }` need to be replace by `{ load: 82.212, year: 2020, ... }` after egl data reprocess | diff --git a/docs/ecolyo/konnectors/enedis.md b/docs/ecolyo/konnectors/enedis.md index 0940bbf66666fe74458bd883069dcfaccabfcd5e..615119cb4f33cac9d8e693da3147cc8cde9c79cf 100644 --- a/docs/ecolyo/konnectors/enedis.md +++ b/docs/ecolyo/konnectors/enedis.md @@ -7,7 +7,7 @@ You should also check Cozy's official documentations for konnectors : ## Enedis Konnector -The Oauth protocol does not take place in the konnector code, therefore it is also important to take a look at the [proxy](../../proxy/description.md) to fully understand all the interactions that will be told below. +The Oauth protocol does not take place in the konnector code, therefore it is also important to take a look at the [proxy](../../proxy/description.md) documentation to fully understand all the interactions that will be told below. All the actions performed by the stack are targetted from pre-registered paramaters, here is the list of all parameters needed by the stack to perform the Oauth protocol and allow the konnector to fetch data. On its first launch, following the Oauth Client Connect authentification. diff --git a/docs/ecolyo/project_architecture/architecture.md b/docs/ecolyo/project_architecture/architecture.md index 2d3ac1ca08c073b91b5d54a082bc86b4c6295367..26f2105bdccaf37c202519169b1d4bf3c8336fc3 100644 --- a/docs/ecolyo/project_architecture/architecture.md +++ b/docs/ecolyo/project_architecture/architecture.md @@ -1,6 +1,6 @@ ## Libraries -For this project, we use libraries below: +For this project, we use the libraries below: ###React diff --git a/docs/ecolyo/project_architecture/doctypes.md b/docs/ecolyo/project_architecture/doctypes.md index fcff0a9a98a46c57887c03dfb2fe71a87cb6ae5e..2436f0d57245f9eeb713cd6c15a9a051f8e5ee39 100644 --- a/docs/ecolyo/project_architecture/doctypes.md +++ b/docs/ecolyo/project_architecture/doctypes.md @@ -4,11 +4,11 @@ Each fluid has its own doctype wildcard and one doctype per time step. Each available time step for a fluid depends of the available data from the energy provider. Here are the different time step: -- minute -- hour -- day -- month -- year +- **half an hour** - use com.grandlyon.*.minute doctype +- **week** - use com.grandlyon.*.day doctype +- **day** - use com.grandlyon.*.day doctype +- **month** - use com.grandlyon.*.month doctype +- **year** - use com.grandlyon.*.year doctype ### Doctype @@ -16,8 +16,8 @@ Here are the available doctypes: | Fluid type | Doctype wildcard | Doctypes | | ------------------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| electricity fluid / enedis | **`com.grandlyon.enedis.*`** | **`com.grandlyon.enedis.minute`**<br>**`com.grandlyon.enedis.hour`**<br>**`com.grandlyon.enedis.day`**<br>**`com.grandlyon.enedis.month`**<br>**`com.grandlyon.enedis.year`** | -| gaz fluid / grdf | **`com.grandlyon.grdf.*`** | **`com.grandlyon.grdf.hour`**<br>**`com.grandlyon.grdf.day`**<br>**`com.grandlyon.grdf.month`**<br>**`com.grandlyon.grdf.year`** | +| electricity fluid / enedis | **`com.grandlyon.enedis.*`** | **`com.grandlyon.enedis.minute`**<br>**`com.grandlyon.enedis.day`**<br>**`com.grandlyon.enedis.month`**<br>**`com.grandlyon.enedis.year`** | +| gaz fluid / grdf | **`com.grandlyon.grdf.*`** | **`com.grandlyon.grdf.day`**<br>**`com.grandlyon.grdf.month`**<br>**`com.grandlyon.grdf.year`** | | water fluid / eau du grand lyon | **`com.grandlyon.egl.*`** | **`com.grandlyon.egl.day`**<br>**`com.grandlyon.egl.month`**<br>**`com.grandlyon.egl.year`** | ### Structure @@ -65,7 +65,6 @@ This doctype is used to store all information about the user. | quizHash | string | Hash used to verify the content of quiz | | explorationHash | string | Hash used to verify the content of exploration | | isFirstConnection | boolean | Boolean used to inform if the user connects for the first time | -| haveSeenFavoriteModal | boolean | Boolean used to inform if user has seen the favorite modal | | haveSeenLastReport | boolean | Boolean used to inform if user has seen the last report | | haveSeenOldFluidModal | Datetime or boolean | Used to inform if user has seen the modal display when his data are too old. Its value is false or a DateTime when he saw it | | sendReportNotification | boolean | Boolean used to inform if user has seen the report notification | @@ -79,7 +78,6 @@ This doctype is used to store all information about the user. "challengeHash": "4cbcafe514788757c377534f1a407e022c29e38c", "duelHash": "48371ffabb2853b0503b882f11e1fa8e730bac76", "ecogestureHash": "9798a0aaccb47cff906fc4931a2eff5f9371dd8b", - "haveSeenFavoriteModal": true, "haveSeenLastReport": true, "haveSeenOldFluidModal": false, "isFirstConnection": false, diff --git a/docs/img/profile_type/profile_type_form.png b/docs/img/profile_type/profile_type_form.png index 7bbf47ff73bcec87b02d10a4abc70a1791406e4f..239a38f2c7b35437f67a9e3539127d5b639d0f55 100644 Binary files a/docs/img/profile_type/profile_type_form.png and b/docs/img/profile_type/profile_type_form.png differ diff --git a/docs/pilote/Pilote - TS - Back/application/deploy.md b/docs/pilote/Pilote - TS - Back/application/deploy.md index 0ab69a0db7893fb591de6441ed4a9bba18f093e9..cf41a3fd851a0b009feb93a1c2a54042225f5088 100644 --- a/docs/pilote/Pilote - TS - Back/application/deploy.md +++ b/docs/pilote/Pilote - TS - Back/application/deploy.md @@ -1,9 +1,3 @@ -!!! info "" - :construction: Section under Construction :construction: - -This section will show you how to deploy your project on different environments. - - ### Deployment For each environment, the CI-CD is implemented. diff --git a/docs/pilote/Pilote - TS - Back/functionalities/routes.md b/docs/pilote/Pilote - TS - Back/functionalities/routes.md new file mode 100644 index 0000000000000000000000000000000000000000..ea55a4625a0a47a4bfad38d17507c0aac93e79cf --- /dev/null +++ b/docs/pilote/Pilote - TS - Back/functionalities/routes.md @@ -0,0 +1,35 @@ +This section explains the different API route. + +# Auth + +- `api/auth/signin`: It is used for local and dev authentification. It is linked to two different password into the database. + + +- `api/auth/token` : It is used for generate one token. Only for internal process. This route is not call from another apps. + + +- `api/auth/token/check`: It is used for check one token. It is called from cozy-stack service of the usager. + +- `api/auth/token`: It is used for generate one token. Only for internal process. This route is not call from another apps. + +- `api/auth/login`: It is used for Sign&Go authentification. Linked to AuthStrategy. + +- `login/callback`: Get the authentification from Sign&Go process. + + +# Beneficiary + +- `/api/beneficiaire`: Get all usager known from Postgre database. + +- `/api/beneficiaire/create'`: This rotue is used in order to store Usager domain and his trigger proccess from Cozy. + + + +# Cozy + +- `api/redirect/cozy`: Allow to send information to the cozy-stack in order to run smsProccess on cozy-stask side. + +# Users + +Authentification only used for local or dev environment because Sign&Go is only available for rec and prod env. + diff --git a/docs/pilote/Pilote - TS - Back/getting_started/launch_local_application.md b/docs/pilote/Pilote - TS - Back/getting_started/launch_local_application.md index 072a887fd5aefa54640c594a6e6babd65dde3b14..942de67200e15ff491bd8cc74fc95165b2319426 100644 --- a/docs/pilote/Pilote - TS - Back/getting_started/launch_local_application.md +++ b/docs/pilote/Pilote - TS - Back/getting_started/launch_local_application.md @@ -1,8 +1,3 @@ -!!! info "" -:construction: Section under Construction :construction: - -This section will allow you to launch a proper local environment of the Pilote TS back application - ## Initialisation of the project ### Clone the project repository diff --git a/docs/pilote/Pilote - TS - Back/index.md b/docs/pilote/Pilote - TS - Back/index.md index 60729ec5114ebf0d929e6a9f6db4ce5a263b063f..531f19da60eec19f669c281997f4343198cb4a67 100644 --- a/docs/pilote/Pilote - TS - Back/index.md +++ b/docs/pilote/Pilote - TS - Back/index.md @@ -15,4 +15,4 @@ Pilote is a social application. - DEV : https://pilote-agent-dev.grandlyon.com/ - REC : https://pilote-agent-rec.grandlyon.com/ - +- PROD : https://pilote-agent.grandlyon.com/ diff --git a/docs/pilote/Pilote - TS - Back/project_architecture/Partage_SMS.png b/docs/pilote/Pilote - TS - Back/project_architecture/Partage_SMS.png new file mode 100644 index 0000000000000000000000000000000000000000..54485ef3adc73e9a9497a501b680145e623ea32a Binary files /dev/null and b/docs/pilote/Pilote - TS - Back/project_architecture/Partage_SMS.png differ diff --git a/docs/pilote/Pilote - TS - Back/project_architecture/architecture.md b/docs/pilote/Pilote - TS - Back/project_architecture/architecture.md index a0b4d59a813eb65fabfd70bf5d062a2f55bf1e35..9817c7f27171d002b5567ae6a128af2dae5a063f 100644 --- a/docs/pilote/Pilote - TS - Back/project_architecture/architecture.md +++ b/docs/pilote/Pilote - TS - Back/project_architecture/architecture.md @@ -1,13 +1,18 @@ -!!! info "" - :construction: Section under Construction :construction: - - -## Techno used +# Techno used - NestJS -- Jest for th tests +- Jest for the tests - Docker - PostgreSQL +# Docker-compose + +Two docker-compose are available into the project: +- the general one +- the local one + + +For the general one, all service are details. The env variable used are available on Synapps server. +The local one is used with the docker-compose_dev.yml \ No newline at end of file diff --git a/docs/pilote/Pilote - TS - Front/application/deploy.md b/docs/pilote/Pilote - TS - Front/application/deploy.md index 4463cf85eb16a098cbe1cc4a005d92117a40ed24..c54a693706c9895183f3ca504c1953b11deb7171 100644 --- a/docs/pilote/Pilote - TS - Front/application/deploy.md +++ b/docs/pilote/Pilote - TS - Front/application/deploy.md @@ -1,10 +1,4 @@ -!!! info "" - :construction: Section under Construction :construction: - -This section will show you how to deploy your project on different environments. - - -### Deployment +# Deployment For each environment, the CI-CD is implemented. diff --git a/docs/pilote/Pilote - TS - Front/functionalities/functions.md b/docs/pilote/Pilote - TS - Front/functionalities/functions.md new file mode 100644 index 0000000000000000000000000000000000000000..e48e62494a5db1449f25d16c2df11dc5d03c2f6e --- /dev/null +++ b/docs/pilote/Pilote - TS - Front/functionalities/functions.md @@ -0,0 +1,11 @@ +This section explains the different functionalitites : + +# Beneficiairies + +Once you are authenticated, you'll redirect into /liste-beneficiaire route. + +You are getting all usager known. + +# Sharing + +For each beneficiary, you can ask the sharing. It means that you will be redirect into the public page of the cozy usager. In the same time, one process is running in order to send the sms. This sms contain one sharecode in order to provide some right on the cozy usager. \ No newline at end of file diff --git a/docs/pilote/Pilote - TS - Front/getting_started/launch_local_application.md b/docs/pilote/Pilote - TS - Front/getting_started/launch_local_application.md index 87fe58f37e880b8851eebc60cd55d6a5d9426254..2f01b100f993ac1c80ad0b4b0500dbaa89d6d6b2 100644 --- a/docs/pilote/Pilote - TS - Front/getting_started/launch_local_application.md +++ b/docs/pilote/Pilote - TS - Front/getting_started/launch_local_application.md @@ -1,8 +1,3 @@ -!!! info "" -:construction: Section under Construction :construction: - -This section will allow you to launch a proper local environment of the Pilote TS front application - ## Initialisation of the project ### Clone the project repository diff --git a/docs/pilote/Pilote - TS - Front/index.md b/docs/pilote/Pilote - TS - Front/index.md index 8e14e109e72c472d4725e09c3ce43e2c9d9fb99c..5710f131f7467793dd8565bb2f3c46e894d0eb8d 100644 --- a/docs/pilote/Pilote - TS - Front/index.md +++ b/docs/pilote/Pilote - TS - Front/index.md @@ -6,4 +6,11 @@ Pilote is a social application. [Pilote gitlab repository](https://forge.grandlyon.com/solidarite/monparcourssocial) -[Pilote TS front - gitlab repository](https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial) \ No newline at end of file +[Pilote TS front - gitlab repository](https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial) + + +## Acces to the application deployed + +- DEV : https://pilote-agent-dev.grandlyon.com/ +- REC : https://pilote-agent-rec.grandlyon.com/ +- PROD : https://pilote-agent.grandlyon.com/ diff --git a/docs/pilote/Pilote - Usager/application/deploy.md b/docs/pilote/Pilote - Usager/application/deploy.md index 4fb31f7812a39224f0358a5c6f1e696cb983124f..831f08ea72d6a8f6c23c586d5e8bdb36e4904a87 100644 --- a/docs/pilote/Pilote - Usager/application/deploy.md +++ b/docs/pilote/Pilote - Usager/application/deploy.md @@ -108,8 +108,6 @@ If you want to deploy on the pilote-build environment, use : yarn deploy ``` -To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm. - #### Linux From your current branch, run ```yarn build``` then ```sudo yarn deploy_dev``` to instantly deploy your working branch on the latest tagged Pilote container registry. diff --git a/docs/pilote/Pilote - Usager/application/doctypes.md b/docs/pilote/Pilote - Usager/application/doctypes.md index 087646e539ffd49bd2543e500a3bfd65fd4deaf4..dcccd052477bfa11eb3e754c554bf3dc6d511a6e 100644 --- a/docs/pilote/Pilote - Usager/application/doctypes.md +++ b/docs/pilote/Pilote - Usager/application/doctypes.md @@ -14,7 +14,6 @@ The following is a full description of the doctypes we use and their fields. Coz - [`io.cozy.contacts`](https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.contacts): Contacts - [`io.cozy.contacts.groups`](https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.contacts.groups): Contacts groups - [`io.cozy.files`](https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.files): Files -- [`io.cozy.konnectors`](https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.konnectors): Connectors installed in the cozy - [`io.cozy.permissions`](https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.permissions): Permissions of the instance - [`io.cozy.todos.item`](https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.todos.item): Todos item - [`io.cozy.todos.list`](https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.todos.list): Todos list diff --git a/docs/pilote/Pilote - Usager/getting_started/launch_local_doctypes.md b/docs/pilote/Pilote - Usager/getting_started/launch_local_doctypes.md index 86fb0836c18c6f1385d381b6d77692ce2d0b65d5..b565d9567d7ad885fb53d4f5ae7e88ae0436917a 100644 --- a/docs/pilote/Pilote - Usager/getting_started/launch_local_doctypes.md +++ b/docs/pilote/Pilote - Usager/getting_started/launch_local_doctypes.md @@ -1,8 +1,3 @@ -!!! info "" - :construction: Section under Construction :construction: - - - ## Use cozy-doctype in local In order to be able to use our own cozy-doctype, especialy remote doctype here, we need to use them in local. diff --git a/docs/pilote/Pilote - Usager/getting_started/launch_local_services.md b/docs/pilote/Pilote - Usager/getting_started/launch_local_services.md index 7220022ec9114957465da44412089b3bc0d52c89..1ad538d65050e969e999b206bda66ded9a4d0fa2 100644 --- a/docs/pilote/Pilote - Usager/getting_started/launch_local_services.md +++ b/docs/pilote/Pilote - Usager/getting_started/launch_local_services.md @@ -1,7 +1,3 @@ -!!! info "" - :construction: Section under Construction :construction: - - ### Use services in local ## Configure the cozy-stack on local In order to be able to use your sercice, follow these steps: diff --git a/docs/proxy/description.md b/docs/proxy/description.md index e2201012bc94b6ce19f952c2c4cd599b5edbf019..83ef69063e6341288c7948d69f5c990fb30eb91f 100644 --- a/docs/proxy/description.md +++ b/docs/proxy/description.md @@ -1,6 +1,3 @@ -!!! warning "" - :construction: Section under Construction :construction: - This section of documentation refers to the Oauth protocols working hand in hand with our custom proxy and the cozy-stack. To fully understand its whereabouts, you should also look at the [enedis konnector](../ecolyo/konnectors/enedis.md) and [grdf konnector](../ecolyo/konnectors/grdf.md) documentation. @@ -172,6 +169,3 @@ Gathering from query or parameters all params. Sends a post request to the provider /token endpoint. The stack will store the response params in a *accounts* couchdb database. - -## What Happens Next - diff --git a/docs/proxy/monitoring.md b/docs/proxy/monitoring.md new file mode 100644 index 0000000000000000000000000000000000000000..da9a6c209769bb70ead05e50eb4a95228bf3fdf8 --- /dev/null +++ b/docs/proxy/monitoring.md @@ -0,0 +1,10 @@ +All logs printed by the Proxy are read and translated into statistics on a grafana dashboard. + +!!! info "Grafana" + [scaleway monitoring](https://grafana.self-data.alpha.grandlyon.com/) + + [production](https://oauth-logs.cozycloud.cc/d/xSRhz8fMk/cozy-oauth-proxy?orgId=1&refresh=5s) + +Thanks to this monitoring system, the team is able to understand when something goes wrong with a konnector if the konnector or the proxy are to blame or if an issue was coming from Enedis or Grdf. + +Learn more about how it works [here](https://forge.grandlyon.com/web-et-numerique/llle_project/logs-monitoring). diff --git a/docs/proxy/use_cases/enedis.md b/docs/proxy/use_cases/enedis.md index 732bc1d5dd4d62a054ad5b27cc730d55c65d9687..8cc8f46fe3717e3d76e1ba7a6043c72953afdec0 100644 --- a/docs/proxy/use_cases/enedis.md +++ b/docs/proxy/use_cases/enedis.md @@ -2,7 +2,10 @@ !!! info "enedis documentation" Create an account on https://datahub-enedis.fr/ to explore all the services exposed by Enedis. - > [Authorize API](https://datahub-enedis.fr/data-connect/documentation/authorize-v1/) swagger + + [Authorize API](https://datahub-enedis.fr/data-connect/documentation/authorize-v1/) swagger. + + [Api healthcheck](https://datahub-enedis.fr/data-connect/ressources/etat-des-services/). Regarding Enedis, two endpoints are exposed: diff --git a/mkdocs.yml b/mkdocs.yml index 2aaf8eb3b1afa4f18c6a13c62af46b8810907359..4b5f7578ad08abc74ba49c02900b618f6543de56 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -29,6 +29,8 @@ nav: - Index: pilote/Pilote - TS - Back/index.md - Application: - Deploy: pilote/Pilote - TS - Back/application/deploy.md + - Functionalities: + - Routes: pilote/Pilote - TS - Back/functionalities/routes.md - Getting Started: - Launch the application on local: pilote/Pilote - TS - Back/getting_started/launch_local_application.md - Setup your environment: pilote/Pilote - TS - Back/getting_started/setup_your_environment.md @@ -37,9 +39,11 @@ nav: - Index: pilote/Pilote - TS - Front/index.md - Application: - Deploy: pilote/Pilote - TS - Front/application/deploy.md + - Functionalities: + - Routes: pilote/Pilote - TS - Front/functionalities/functions.md - Getting Started: - - Launch the application on local: pilote/Pilote - TS - Front/getting_started/launch_local_application.md - - Pilote - TS - Usager: + - Launch the application on local: pilote/Pilote - TS - Front/getting_started/launch_local_application.md + - Pilote - Usager: - Application: - Deploy: pilote/Pilote - Usager/application/deploy.md - Doctypes: pilote/Pilote - Usager/application/doctypes.md @@ -73,10 +77,13 @@ nav: - Eau du Grand Lyon: ecolyo/konnectors/egl.md - Functionalities: - Initialization: ecolyo/functionalities/initialization.md + - Consumption: ecolyo/functionalities/consumption.md + - Ecogesture: ecolyo/functionalities/ecogesture.md - Challenge: ecolyo/functionalities/challenge.md - Profile Type: ecolyo/functionalities/profile_type.md - Proxy: - Description: proxy/description.md + - Monitoring: proxy/monitoring.md - Use cases: - Enedis: proxy/use_cases/enedis.md - Grdf Adict: proxy/use_cases/grdfadict.md diff --git a/site/404.html b/site/404.html index 879fde91b74e624004b2061fe8dd9bfc9191d4d7..2c05b6b13282a7c58d0992258b1438dcc3fc2ff6 100644 --- a/site/404.html +++ b/site/404.html @@ -1,10 +1,14 @@ + + + <!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="description" content="Self Data Grand Lyon Project Documentation with Markdown."> @@ -13,8 +17,26 @@ <meta name="author" content="Métropole de Lyon"> + <meta name="lang:clipboard.copy" content="Copy to clipboard"> + + <meta name="lang:clipboard.copied" content="Copied to clipboard"> + + <meta name="lang:search.language" content="en"> + + <meta name="lang:search.pipeline.stopwords" content="True"> + + <meta name="lang:search.pipeline.trimmer" content="True"> + + <meta name="lang:search.result.none" content="No matching documents"> + + <meta name="lang:search.result.one" content="1 matching document"> + + <meta name="lang:search.result.other" content="# matching documents"> + + <meta name="lang:search.tokenizer" content="[\s\-]+"> + <link rel="shortcut icon" href="/img/self_data_grdlyon.png"> - <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.2.3"> + <meta name="generator" content="mkdocs-1.1, mkdocs-material-4.6.3"> @@ -22,26 +44,27 @@ - <link rel="stylesheet" href="/assets/stylesheets/main.3b61ea93.min.css"> + <link rel="stylesheet" href="/assets/stylesheets/application.adb8469c.css"> + + <link rel="stylesheet" href="/assets/stylesheets/application-palette.a8b3c06d.css"> + - <link rel="stylesheet" href="/assets/stylesheets/palette.39b8e14a.min.css"> - - - - <meta name="theme-color" content="#ffffff"> + <meta name="theme-color" content=""> + <script src="/assets/javascripts/modernizr.86422ebf.js"></script> + - - <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> + <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback"> - <style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style> + <style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style> + <link rel="stylesheet" href="/assets/fonts/material-icons.css"> <link rel="stylesheet" href="/stylesheets/extra.css"> @@ -52,78 +75,67 @@ </head> - - - - - <body dir="ltr" data-md-color-scheme="" data-md-color-primary="white" data-md-color-accent="red"> - + <body dir="ltr" data-md-color-primary="white" data-md-color-accent="red"> - + <svg class="md-svg"> + <defs> + + + </defs> + </svg> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> - <label class="md-overlay" for="__drawer"></label> - <div data-md-component="skip"> - - </div> - <div data-md-component="announce"> - - </div> + <label class="md-overlay" data-md-component="overlay" for="__drawer"></label> - - -<header class="md-header" data-md-component="header"> - <nav class="md-header-nav md-grid" aria-label="Header"> - <a href="/." title="Self Data Grand Lyon - Technical Docs" class="md-header-nav__button md-logo" aria-label="Self Data Grand Lyon - Technical Docs"> - - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg> - - </a> - <label class="md-header-nav__button md-icon" for="__drawer"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> - </label> - <div class="md-header-nav__title" data-md-component="header-title"> - <div class="md-header-nav__ellipsis"> - <div class="md-header-nav__topic"> - <span class="md-ellipsis"> - Self Data Grand Lyon - Technical Docs - </span> - </div> - <div class="md-header-nav__topic"> - <span class="md-ellipsis"> - + + <header class="md-header" data-md-component="header"> + <nav class="md-header-nav md-grid"> + <div class="md-flex"> + <div class="md-flex__cell md-flex__cell--shrink"> + <a href="/." title="Self Data Grand Lyon - Technical Docs" aria-label="Self Data Grand Lyon - Technical Docs" class="md-header-nav__button md-logo"> + + <i class="md-icon">î Œ</i> + + </a> + </div> + <div class="md-flex__cell md-flex__cell--shrink"> + <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label> + </div> + <div class="md-flex__cell md-flex__cell--stretch"> + <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title"> + + <span class="md-header-nav__topic"> + Self Data Grand Lyon - Technical Docs + </span> + <span class="md-header-nav__topic"> - - </span> + + + </span> + </div> </div> - </div> - - <label class="md-header-nav__button md-icon" for="__search"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> - </label> - + <div class="md-flex__cell md-flex__cell--shrink"> + + <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label> + <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> - <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> - <label class="md-search__icon md-icon" for="__search"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> - </label> - <button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> + <input type="text" class="md-search__input" aria-label="search" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active"> + <label class="md-icon md-search__icon" for="__search"></label> + <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1"> +  </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> - <div class="md-search-result" data-md-component="search-result"> + <div class="md-search-result" data-md-component="result"> <div class="md-search-result__meta"> - Initializing search + Type to start searching </div> <ol class="md-search-result__list"></ol> </div> @@ -131,101 +143,468 @@ </div> </div> </div> + + </div> + + <div class="md-flex__cell md-flex__cell--shrink"> + <div class="md-header-nav__source"> + + + + + +<a href="https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" title="Go to repository" class="md-source" data-md-source=""> + + <div class="md-source__repository"> + Clone the Project + </div> +</a> + </div> + </div> + + </div> + </nav> +</header> + <div class="md-container"> + + + + + <main class="md-main" role="main"> + <div class="md-main__inner md-grid" data-md-component="container"> + + + <div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> + <div class="md-sidebar__scrollwrap"> + <div class="md-sidebar__inner"> + <nav class="md-nav md-nav--primary" data-md-level="0"> + <label class="md-nav__title md-nav__title--site" for="__drawer"> + <a href="/." title="Self Data Grand Lyon - Technical Docs" class="md-nav__button md-logo"> + + <i class="md-icon">î Œ</i> + + </a> + Self Data Grand Lyon - Technical Docs + </label> + + <div class="md-nav__source"> + + + + + +<a href="https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" title="Go to repository" class="md-source" data-md-source=""> + + <div class="md-source__repository"> + Clone the Project + </div> +</a> + </div> + + <ul class="md-nav__list" data-md-scrollfix> - <div class="md-header-nav__source"> + + + + + + <li class="md-nav__item"> + <a href="/." title="Home" class="md-nav__link"> + Home + </a> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2"> + + <label class="md-nav__link" for="nav-2"> + Pilote + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> + <label class="md-nav__title" for="nav-2"> + Pilote + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-1" type="checkbox" id="nav-2-1"> + + <label class="md-nav__link" for="nav-2-1"> + Pilote - TS - Back + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-2-1"> + Pilote - TS - Back + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20TS%20-%20Back/" title="Index" class="md-nav__link"> + Index + </a> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-1-2" type="checkbox" id="nav-2-1-2"> + + <label class="md-nav__link" for="nav-2-1-2"> + Application + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-1-2"> + Application + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20TS%20-%20Back/application/deploy/" title="Deploy" class="md-nav__link"> + Deploy + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-1-3" type="checkbox" id="nav-2-1-3"> + + <label class="md-nav__link" for="nav-2-1-3"> + Getting Started + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-1-3"> + Getting Started + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/" title="Launch the application on local" class="md-nav__link"> + Launch the application on local + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/" title="Setup your environment" class="md-nav__link"> + Setup your environment + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20TS%20-%20Back/project_architecture/architecture/" title="Project Architecture" class="md-nav__link"> + Project Architecture + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-2" type="checkbox" id="nav-2-2"> + + <label class="md-nav__link" for="nav-2-2"> + Pilote - TS - Front + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-2-2"> + Pilote - TS - Front + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20TS%20-%20Front/" title="Index" class="md-nav__link"> + Index + </a> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-2-2" type="checkbox" id="nav-2-2-2"> + + <label class="md-nav__link" for="nav-2-2-2"> + Application + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-2-2"> + Application + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20TS%20-%20Front/application/deploy/" title="Deploy" class="md-nav__link"> + Deploy + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-2-3" type="checkbox" id="nav-2-2-3"> + + <label class="md-nav__link" for="nav-2-2-3"> + Getting Started + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-2-3"> + Getting Started + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/" title="Launch the application on local" class="md-nav__link"> + Launch the application on local + </a> + </li> + + + </ul> + </nav> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-3" type="checkbox" id="nav-2-3"> + + <label class="md-nav__link" for="nav-2-3"> + Pilote - TS - Usager + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-2-3"> + Pilote - TS - Usager + </label> + <ul class="md-nav__list" data-md-scrollfix> -<a href="https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" title="Go to repository" class="md-source"> - <div class="md-source__icon md-icon"> - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg> - </div> - <div class="md-source__repository"> - Clone the Project - </div> -</a> - </div> + + + + + + + <li class="md-nav__item md-nav__item--nested"> - </nav> -</header> + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-3-1" type="checkbox" id="nav-2-3-1"> - <div class="md-container" data-md-component="container"> - - + <label class="md-nav__link" for="nav-2-3-1"> + Application + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-3-1"> + Application + </label> + <ul class="md-nav__list" data-md-scrollfix> + - - <main class="md-main" data-md-component="main"> - <div class="md-main__inner md-grid"> - - - <div class="md-sidebar md-sidebar--primary" data-md-component="navigation" > - <div class="md-sidebar__scrollwrap"> - <div class="md-sidebar__inner"> - + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20Usager/application/deploy/" title="Deploy" class="md-nav__link"> + Deploy + </a> + </li> + + + + -<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> - <label class="md-nav__title" for="__drawer"> - <a href="/." title="Self Data Grand Lyon - Technical Docs" class="md-nav__button md-logo" aria-label="Self Data Grand Lyon - Technical Docs"> - - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg> + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20Usager/application/doctypes/" title="Doctypes" class="md-nav__link"> + Doctypes </a> - Self Data Grand Lyon - Technical Docs - </label> - - <div class="md-nav__source"> - -<a href="https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" title="Go to repository" class="md-source"> - <div class="md-source__icon md-icon"> - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg> - </div> - <div class="md-source__repository"> - Clone the Project - </div> -</a> - </div> - - <ul class="md-nav__list" data-md-scrollfix> - - - - + </li> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20Usager/application/gitflow/" title="Gitflow" class="md-nav__link"> + Gitflow + </a> + </li> + + + + <li class="md-nav__item"> - <a href="/." class="md-nav__link"> - Home + <a href="/pilote/Pilote%20-%20Usager/application/scaffolding/" title="Scaffolding" class="md-nav__link"> + Scaffolding </a> </li> - - - - + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20Usager/application/services/" title="Services" class="md-nav__link"> + Services + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20Usager/application/store/" title="Store" class="md-nav__link"> + Store + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + - <li class="md-nav__item md-nav__item--nested"> + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-3-2" type="checkbox" id="nav-2-3-2"> - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2" > - - <label class="md-nav__link" for="nav-2"> - Pilote - <span class="md-nav__icon md-icon"></span> + <label class="md-nav__link" for="nav-2-3-2"> + Getting Started </label> - <nav class="md-nav" aria-label="Pilote" data-md-level="1"> - <label class="md-nav__title" for="nav-2"> - <span class="md-nav__icon md-icon"></span> - Pilote + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-3-2"> + Getting Started </label> <ul class="md-nav__list" data-md-scrollfix> @@ -235,10 +614,21 @@ + <li class="md-nav__item"> + <a href="/pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/" title="Launch local doctypes" class="md-nav__link"> + Launch local doctypes + </a> + </li> + + + + + + <li class="md-nav__item"> - <a href="/pilote/index.md" class="md-nav__link"> - Introduction + <a href="/pilote/Pilote%20-%20Usager/getting_started/launch_local_services/" title="Launch local services" class="md-nav__link"> + Launch local services </a> </li> @@ -247,26 +637,31 @@ </nav> </li> + + </ul> + </nav> + </li> + + + </ul> + </nav> + </li> + - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3"> <label class="md-nav__link" for="nav-3"> Ecolyo - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Ecolyo" data-md-level="1"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> <label class="md-nav__title" for="nav-3"> - <span class="md-nav__icon md-icon"></span> Ecolyo </label> <ul class="md-nav__list" data-md-scrollfix> @@ -277,9 +672,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/" class="md-nav__link"> + <a href="/ecolyo/" title="Introduction" class="md-nav__link"> Introduction </a> </li> @@ -290,20 +684,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3-2" type="checkbox" id="nav-3-2" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-2" type="checkbox" id="nav-3-2"> <label class="md-nav__link" for="nav-3-2"> Getting started - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Getting started" data-md-level="2"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> <label class="md-nav__title" for="nav-3-2"> - <span class="md-nav__icon md-icon"></span> Getting started </label> <ul class="md-nav__list" data-md-scrollfix> @@ -314,9 +703,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/getting_started/setup_your_environment/" class="md-nav__link"> + <a href="/ecolyo/getting_started/setup_your_environment/" title="Setup your environment" class="md-nav__link"> Setup your environment </a> </li> @@ -327,9 +715,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/getting_started/launch_local_application/" class="md-nav__link"> + <a href="/ecolyo/getting_started/launch_local_application/" title="Launch the application on local" class="md-nav__link"> Launch the application on local </a> </li> @@ -340,9 +727,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/getting_started/launch_local_konnector/" class="md-nav__link"> + <a href="/ecolyo/getting_started/launch_local_konnector/" title="Launch a konnector on local" class="md-nav__link"> Launch a konnector on local </a> </li> @@ -358,20 +744,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3-3" type="checkbox" id="nav-3-3" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-3" type="checkbox" id="nav-3-3"> <label class="md-nav__link" for="nav-3-3"> Project Architecture - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Project Architecture" data-md-level="2"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> <label class="md-nav__title" for="nav-3-3"> - <span class="md-nav__icon md-icon"></span> Project Architecture </label> <ul class="md-nav__list" data-md-scrollfix> @@ -382,9 +763,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/project_architecture/architecture/" class="md-nav__link"> + <a href="/ecolyo/project_architecture/architecture/" title="Architecture" class="md-nav__link"> Architecture </a> </li> @@ -395,9 +775,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/project_architecture/cozy/" class="md-nav__link"> + <a href="/ecolyo/project_architecture/cozy/" title="Cozy" class="md-nav__link"> Cozy </a> </li> @@ -408,9 +787,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/project_architecture/environments/" class="md-nav__link"> + <a href="/ecolyo/project_architecture/environments/" title="Environments" class="md-nav__link"> Environments </a> </li> @@ -421,9 +799,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/project_architecture/doctypes/" class="md-nav__link"> + <a href="/ecolyo/project_architecture/doctypes/" title="DocTypes" class="md-nav__link"> DocTypes </a> </li> @@ -439,20 +816,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3-4" type="checkbox" id="nav-3-4" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-4" type="checkbox" id="nav-3-4"> <label class="md-nav__link" for="nav-3-4"> Application - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Application" data-md-level="2"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> <label class="md-nav__title" for="nav-3-4"> - <span class="md-nav__icon md-icon"></span> Application </label> <ul class="md-nav__list" data-md-scrollfix> @@ -463,9 +835,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/application/description/" class="md-nav__link"> + <a href="/ecolyo/application/description/" title="Description" class="md-nav__link"> Description </a> </li> @@ -476,9 +847,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/application/scaffolding/" class="md-nav__link"> + <a href="/ecolyo/application/scaffolding/" title="Scaffolding" class="md-nav__link"> Scaffolding </a> </li> @@ -489,9 +859,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/application/services/" class="md-nav__link"> + <a href="/ecolyo/application/services/" title="Services" class="md-nav__link"> Services </a> </li> @@ -502,9 +871,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/application/gitflow/" class="md-nav__link"> + <a href="/ecolyo/application/gitflow/" title="Gitflow" class="md-nav__link"> Gitflow </a> </li> @@ -515,9 +883,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/application/deploy/" class="md-nav__link"> + <a href="/ecolyo/application/deploy/" title="Deploy" class="md-nav__link"> Deploy </a> </li> @@ -533,20 +900,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3-5" type="checkbox" id="nav-3-5" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-5" type="checkbox" id="nav-3-5"> <label class="md-nav__link" for="nav-3-5"> Konnectors - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Konnectors" data-md-level="2"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> <label class="md-nav__title" for="nav-3-5"> - <span class="md-nav__icon md-icon"></span> Konnectors </label> <ul class="md-nav__list" data-md-scrollfix> @@ -557,9 +919,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/konnectors/enedis/" class="md-nav__link"> + <a href="/ecolyo/konnectors/enedis/" title="Enedis" class="md-nav__link"> Enedis </a> </li> @@ -570,9 +931,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/konnectors/grdf/" class="md-nav__link"> + <a href="/ecolyo/konnectors/grdf/" title="GRDF" class="md-nav__link"> GRDF </a> </li> @@ -583,9 +943,8 @@ - <li class="md-nav__item"> - <a href="/ecolyo/konnectors/egl/" class="md-nav__link"> + <a href="/ecolyo/konnectors/egl/" title="Eau du Grand Lyon" class="md-nav__link"> Eau du Grand Lyon </a> </li> @@ -596,6 +955,90 @@ </li> + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-6" type="checkbox" id="nav-3-6"> + + <label class="md-nav__link" for="nav-3-6"> + Functionalities + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-3-6"> + Functionalities + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="/ecolyo/functionalities/initialization/" title="Initialization" class="md-nav__link"> + Initialization + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="/ecolyo/functionalities/consumption/" title="Consumption" class="md-nav__link"> + Consumption + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="/ecolyo/functionalities/ecogesture/" title="Ecogesture" class="md-nav__link"> + Ecogesture + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="/ecolyo/functionalities/challenge/" title="Challenge" class="md-nav__link"> + Challenge + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="/ecolyo/functionalities/profile_type/" title="Profile Type" class="md-nav__link"> + Profile Type + </a> + </li> + + + </ul> + </nav> + </li> + + </ul> </nav> </li> @@ -606,20 +1049,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4"> <label class="md-nav__link" for="nav-4"> Proxy - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Proxy" data-md-level="1"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> <label class="md-nav__title" for="nav-4"> - <span class="md-nav__icon md-icon"></span> Proxy </label> <ul class="md-nav__list" data-md-scrollfix> @@ -630,9 +1068,8 @@ - <li class="md-nav__item"> - <a href="/proxy/description/" class="md-nav__link"> + <a href="/proxy/description/" title="Description" class="md-nav__link"> Description </a> </li> @@ -643,20 +1080,27 @@ + <li class="md-nav__item"> + <a href="/proxy/monitoring/" title="Monitoring" class="md-nav__link"> + Monitoring + </a> + </li> + + + + + + - <li class="md-nav__item md-nav__item--nested"> + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4-3" type="checkbox" id="nav-4-3"> - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-4-2" type="checkbox" id="nav-4-2" > - - <label class="md-nav__link" for="nav-4-2"> + <label class="md-nav__link" for="nav-4-3"> Use cases - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Use cases" data-md-level="2"> - <label class="md-nav__title" for="nav-4-2"> - <span class="md-nav__icon md-icon"></span> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-4-3"> Use cases </label> <ul class="md-nav__list" data-md-scrollfix> @@ -667,9 +1111,8 @@ - <li class="md-nav__item"> - <a href="/proxy/use_cases/enedis/" class="md-nav__link"> + <a href="/proxy/use_cases/enedis/" title="Enedis" class="md-nav__link"> Enedis </a> </li> @@ -680,9 +1123,8 @@ - <li class="md-nav__item"> - <a href="/proxy/use_cases/grdfadict/" class="md-nav__link"> + <a href="/proxy/use_cases/grdfadict/" title="Grdf Adict" class="md-nav__link"> Grdf Adict </a> </li> @@ -728,10 +1170,11 @@ <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> - Made with + powered by + <a href="https://www.mkdocs.org" target="_blank" rel="noopener">MkDocs</a> + and <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> - Material for MkDocs - </a> + Material for MkDocs</a> </div> </div> @@ -740,18 +1183,9 @@ </div> - <script src="/assets/javascripts/vendor.08c56446.min.js"></script> - <script src="/assets/javascripts/bundle.6ced434e.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> - - <script> - app = initialize({ - base: "/", - features: [], - search: Object.assign({ - worker: "/assets/javascripts/worker/search.8c7e0a7e.min.js" - }, typeof search !== "undefined" && search) - }) - </script> + <script src="/assets/javascripts/application.c33a9706.js"></script> + + <script>app.initialize({version:"1.1",url:{base:"/"}})</script> </body> diff --git a/site/assets/images/favicon.png b/site/assets/images/favicon.png index 1cf13b9f9d978896599290a74f77d5dbe7d1655c..76d17f57ad903c3ea2f1b564cafb95bf9af84ee3 100644 Binary files a/site/assets/images/favicon.png and b/site/assets/images/favicon.png differ diff --git a/site/index.html b/site/index.html index d42277970bb80018491dfeb1b297328fafb56466..81086321d026440e74975a31efe698b4083b70b3 100644 --- a/site/index.html +++ b/site/index.html @@ -1,10 +1,14 @@ + + + <!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="description" content="Self Data Grand Lyon Project Documentation with Markdown."> @@ -13,8 +17,26 @@ <meta name="author" content="Métropole de Lyon"> + <meta name="lang:clipboard.copy" content="Copy to clipboard"> + + <meta name="lang:clipboard.copied" content="Copied to clipboard"> + + <meta name="lang:search.language" content="en"> + + <meta name="lang:search.pipeline.stopwords" content="True"> + + <meta name="lang:search.pipeline.trimmer" content="True"> + + <meta name="lang:search.result.none" content="No matching documents"> + + <meta name="lang:search.result.one" content="1 matching document"> + + <meta name="lang:search.result.other" content="# matching documents"> + + <meta name="lang:search.tokenizer" content="[\s\-]+"> + <link rel="shortcut icon" href="img/self_data_grdlyon.png"> - <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.2.3"> + <meta name="generator" content="mkdocs-1.1, mkdocs-material-4.6.3"> @@ -22,26 +44,27 @@ - <link rel="stylesheet" href="assets/stylesheets/main.3b61ea93.min.css"> + <link rel="stylesheet" href="assets/stylesheets/application.adb8469c.css"> + + <link rel="stylesheet" href="assets/stylesheets/application-palette.a8b3c06d.css"> + - <link rel="stylesheet" href="assets/stylesheets/palette.39b8e14a.min.css"> - - - - <meta name="theme-color" content="#ffffff"> + <meta name="theme-color" content=""> + <script src="assets/javascripts/modernizr.86422ebf.js"></script> + - - <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> + <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback"> - <style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style> + <style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style> + <link rel="stylesheet" href="assets/fonts/material-icons.css"> <link rel="stylesheet" href="stylesheets/extra.css"> @@ -52,78 +75,67 @@ </head> - - - - - <body dir="ltr" data-md-color-scheme="" data-md-color-primary="white" data-md-color-accent="red"> - + <body dir="ltr" data-md-color-primary="white" data-md-color-accent="red"> - + <svg class="md-svg"> + <defs> + + + </defs> + </svg> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> - <label class="md-overlay" for="__drawer"></label> - <div data-md-component="skip"> - - </div> - <div data-md-component="announce"> - - </div> + <label class="md-overlay" data-md-component="overlay" for="__drawer"></label> - - -<header class="md-header" data-md-component="header"> - <nav class="md-header-nav md-grid" aria-label="Header"> - <a href="." title="Self Data Grand Lyon - Technical Docs" class="md-header-nav__button md-logo" aria-label="Self Data Grand Lyon - Technical Docs"> - - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg> - - </a> - <label class="md-header-nav__button md-icon" for="__drawer"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> - </label> - <div class="md-header-nav__title" data-md-component="header-title"> - <div class="md-header-nav__ellipsis"> - <div class="md-header-nav__topic"> - <span class="md-ellipsis"> - Self Data Grand Lyon - Technical Docs - </span> - </div> - <div class="md-header-nav__topic"> - <span class="md-ellipsis"> - - Home - - </span> + + <header class="md-header" data-md-component="header"> + <nav class="md-header-nav md-grid"> + <div class="md-flex"> + <div class="md-flex__cell md-flex__cell--shrink"> + <a href="." title="Self Data Grand Lyon - Technical Docs" aria-label="Self Data Grand Lyon - Technical Docs" class="md-header-nav__button md-logo"> + + <i class="md-icon">î Œ</i> + + </a> + </div> + <div class="md-flex__cell md-flex__cell--shrink"> + <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label> + </div> + <div class="md-flex__cell md-flex__cell--stretch"> + <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title"> + + <span class="md-header-nav__topic"> + Self Data Grand Lyon - Technical Docs + </span> + <span class="md-header-nav__topic"> + + Home + + </span> + </div> </div> - </div> - - <label class="md-header-nav__button md-icon" for="__search"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> - </label> - + <div class="md-flex__cell md-flex__cell--shrink"> + + <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label> + <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> - <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> - <label class="md-search__icon md-icon" for="__search"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> - </label> - <button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> + <input type="text" class="md-search__input" aria-label="search" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active"> + <label class="md-icon md-search__icon" for="__search"></label> + <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1"> +  </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> - <div class="md-search-result" data-md-component="search-result"> + <div class="md-search-result" data-md-component="result"> <div class="md-search-result__meta"> - Initializing search + Type to start searching </div> <ol class="md-search-result__list"></ol> </div> @@ -131,108 +143,475 @@ </div> </div> </div> - - - <div class="md-header-nav__source"> -<a href="https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" title="Go to repository" class="md-source"> - <div class="md-source__icon md-icon"> - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg> + </div> + + <div class="md-flex__cell md-flex__cell--shrink"> + <div class="md-header-nav__source"> + + + + + +<a href="https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" title="Go to repository" class="md-source" data-md-source=""> + + <div class="md-source__repository"> + Clone the Project </div> +</a> + </div> + </div> + + </div> + </nav> +</header> + + <div class="md-container"> + + + + + <main class="md-main" role="main"> + <div class="md-main__inner md-grid" data-md-component="container"> + + + <div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> + <div class="md-sidebar__scrollwrap"> + <div class="md-sidebar__inner"> + <nav class="md-nav md-nav--primary" data-md-level="0"> + <label class="md-nav__title md-nav__title--site" for="__drawer"> + <a href="." title="Self Data Grand Lyon - Technical Docs" class="md-nav__button md-logo"> + + <i class="md-icon">î Œ</i> + + </a> + Self Data Grand Lyon - Technical Docs + </label> + + <div class="md-nav__source"> + + + + + +<a href="https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" title="Go to repository" class="md-source" data-md-source=""> + <div class="md-source__repository"> Clone the Project </div> </a> - </div> + </div> + + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + + <li class="md-nav__item md-nav__item--active"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc"> + + + <a href="." title="Home" class="md-nav__link md-nav__link--active"> + Home + </a> + + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2"> + + <label class="md-nav__link" for="nav-2"> + Pilote + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> + <label class="md-nav__title" for="nav-2"> + Pilote + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-1" type="checkbox" id="nav-2-1"> + + <label class="md-nav__link" for="nav-2-1"> + Pilote - TS - Back + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-2-1"> + Pilote - TS - Back + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20TS%20-%20Back/" title="Index" class="md-nav__link"> + Index + </a> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-1-2" type="checkbox" id="nav-2-1-2"> + + <label class="md-nav__link" for="nav-2-1-2"> + Application + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-1-2"> + Application + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20TS%20-%20Back/application/deploy/" title="Deploy" class="md-nav__link"> + Deploy + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-1-3" type="checkbox" id="nav-2-1-3"> + + <label class="md-nav__link" for="nav-2-1-3"> + Getting Started + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-1-3"> + Getting Started + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/" title="Launch the application on local" class="md-nav__link"> + Launch the application on local + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/" title="Setup your environment" class="md-nav__link"> + Setup your environment + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20TS%20-%20Back/project_architecture/architecture/" title="Project Architecture" class="md-nav__link"> + Project Architecture + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-2" type="checkbox" id="nav-2-2"> + + <label class="md-nav__link" for="nav-2-2"> + Pilote - TS - Front + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-2-2"> + Pilote - TS - Front + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20TS%20-%20Front/" title="Index" class="md-nav__link"> + Index + </a> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-2-2" type="checkbox" id="nav-2-2-2"> + + <label class="md-nav__link" for="nav-2-2-2"> + Application + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-2-2"> + Application + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20TS%20-%20Front/application/deploy/" title="Deploy" class="md-nav__link"> + Deploy + </a> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-2-3" type="checkbox" id="nav-2-2-3"> + + <label class="md-nav__link" for="nav-2-2-3"> + Getting Started + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-2-3"> + Getting Started + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/" title="Launch the application on local" class="md-nav__link"> + Launch the application on local + </a> + </li> + + + </ul> + </nav> + </li> + + + </ul> + </nav> + </li> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-3" type="checkbox" id="nav-2-3"> + + <label class="md-nav__link" for="nav-2-3"> + Pilote - TS - Usager + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-2-3"> + Pilote - TS - Usager + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item md-nav__item--nested"> - </nav> -</header> + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-3-1" type="checkbox" id="nav-2-3-1"> - <div class="md-container" data-md-component="container"> - - + <label class="md-nav__link" for="nav-2-3-1"> + Application + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-3-1"> + Application + </label> + <ul class="md-nav__list" data-md-scrollfix> + - - <main class="md-main" data-md-component="main"> - <div class="md-main__inner md-grid"> - - - <div class="md-sidebar md-sidebar--primary" data-md-component="navigation" > - <div class="md-sidebar__scrollwrap"> - <div class="md-sidebar__inner"> - + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20Usager/application/deploy/" title="Deploy" class="md-nav__link"> + Deploy + </a> + </li> + + + + -<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> - <label class="md-nav__title" for="__drawer"> - <a href="." title="Self Data Grand Lyon - Technical Docs" class="md-nav__button md-logo" aria-label="Self Data Grand Lyon - Technical Docs"> - - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg> + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20Usager/application/doctypes/" title="Doctypes" class="md-nav__link"> + Doctypes </a> - Self Data Grand Lyon - Technical Docs - </label> - - <div class="md-nav__source"> - -<a href="https://forge.grandlyon.com/web-et-numerique/llle_project/self-data-technical-doc" title="Go to repository" class="md-source"> - <div class="md-source__icon md-icon"> - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg> - </div> - <div class="md-source__repository"> - Clone the Project - </div> -</a> - </div> - - <ul class="md-nav__list" data-md-scrollfix> - - - - + </li> + + + + - + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20Usager/application/gitflow/" title="Gitflow" class="md-nav__link"> + Gitflow + </a> + </li> - <li class="md-nav__item md-nav__item--active"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> - - - <a href="." class="md-nav__link md-nav__link--active"> - Home + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20Usager/application/scaffolding/" title="Scaffolding" class="md-nav__link"> + Scaffolding </a> - </li> - - - - + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20Usager/application/services/" title="Services" class="md-nav__link"> + Services + </a> + </li> + + + + + + + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20Usager/application/store/" title="Store" class="md-nav__link"> + Store + </a> + </li> + + + </ul> + </nav> + </li> + + + + + - <li class="md-nav__item md-nav__item--nested"> + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2-3-2" type="checkbox" id="nav-2-3-2"> - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2" > - - <label class="md-nav__link" for="nav-2"> - Pilote - <span class="md-nav__icon md-icon"></span> + <label class="md-nav__link" for="nav-2-3-2"> + Getting Started </label> - <nav class="md-nav" aria-label="Pilote" data-md-level="1"> - <label class="md-nav__title" for="nav-2"> - <span class="md-nav__icon md-icon"></span> - Pilote + <nav class="md-nav" data-md-component="collapsible" data-md-level="3"> + <label class="md-nav__title" for="nav-2-3-2"> + Getting Started </label> <ul class="md-nav__list" data-md-scrollfix> @@ -242,10 +621,21 @@ + <li class="md-nav__item"> + <a href="pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/" title="Launch local doctypes" class="md-nav__link"> + Launch local doctypes + </a> + </li> + + + + + + <li class="md-nav__item"> - <a href="pilote/index.md" class="md-nav__link"> - Introduction + <a href="pilote/Pilote%20-%20Usager/getting_started/launch_local_services/" title="Launch local services" class="md-nav__link"> + Launch local services </a> </li> @@ -254,26 +644,31 @@ </nav> </li> + + </ul> + </nav> + </li> + + + </ul> + </nav> + </li> + - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3"> <label class="md-nav__link" for="nav-3"> Ecolyo - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Ecolyo" data-md-level="1"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> <label class="md-nav__title" for="nav-3"> - <span class="md-nav__icon md-icon"></span> Ecolyo </label> <ul class="md-nav__list" data-md-scrollfix> @@ -284,9 +679,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/" class="md-nav__link"> + <a href="ecolyo/" title="Introduction" class="md-nav__link"> Introduction </a> </li> @@ -297,20 +691,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3-2" type="checkbox" id="nav-3-2" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-2" type="checkbox" id="nav-3-2"> <label class="md-nav__link" for="nav-3-2"> Getting started - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Getting started" data-md-level="2"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> <label class="md-nav__title" for="nav-3-2"> - <span class="md-nav__icon md-icon"></span> Getting started </label> <ul class="md-nav__list" data-md-scrollfix> @@ -321,9 +710,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/getting_started/setup_your_environment/" class="md-nav__link"> + <a href="ecolyo/getting_started/setup_your_environment/" title="Setup your environment" class="md-nav__link"> Setup your environment </a> </li> @@ -334,9 +722,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/getting_started/launch_local_application/" class="md-nav__link"> + <a href="ecolyo/getting_started/launch_local_application/" title="Launch the application on local" class="md-nav__link"> Launch the application on local </a> </li> @@ -347,9 +734,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/getting_started/launch_local_konnector/" class="md-nav__link"> + <a href="ecolyo/getting_started/launch_local_konnector/" title="Launch a konnector on local" class="md-nav__link"> Launch a konnector on local </a> </li> @@ -365,20 +751,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3-3" type="checkbox" id="nav-3-3" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-3" type="checkbox" id="nav-3-3"> <label class="md-nav__link" for="nav-3-3"> Project Architecture - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Project Architecture" data-md-level="2"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> <label class="md-nav__title" for="nav-3-3"> - <span class="md-nav__icon md-icon"></span> Project Architecture </label> <ul class="md-nav__list" data-md-scrollfix> @@ -389,9 +770,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/project_architecture/architecture/" class="md-nav__link"> + <a href="ecolyo/project_architecture/architecture/" title="Architecture" class="md-nav__link"> Architecture </a> </li> @@ -402,9 +782,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/project_architecture/cozy/" class="md-nav__link"> + <a href="ecolyo/project_architecture/cozy/" title="Cozy" class="md-nav__link"> Cozy </a> </li> @@ -415,9 +794,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/project_architecture/environments/" class="md-nav__link"> + <a href="ecolyo/project_architecture/environments/" title="Environments" class="md-nav__link"> Environments </a> </li> @@ -428,9 +806,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/project_architecture/doctypes/" class="md-nav__link"> + <a href="ecolyo/project_architecture/doctypes/" title="DocTypes" class="md-nav__link"> DocTypes </a> </li> @@ -446,20 +823,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3-4" type="checkbox" id="nav-3-4" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-4" type="checkbox" id="nav-3-4"> <label class="md-nav__link" for="nav-3-4"> Application - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Application" data-md-level="2"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> <label class="md-nav__title" for="nav-3-4"> - <span class="md-nav__icon md-icon"></span> Application </label> <ul class="md-nav__list" data-md-scrollfix> @@ -470,9 +842,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/application/description/" class="md-nav__link"> + <a href="ecolyo/application/description/" title="Description" class="md-nav__link"> Description </a> </li> @@ -483,9 +854,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/application/scaffolding/" class="md-nav__link"> + <a href="ecolyo/application/scaffolding/" title="Scaffolding" class="md-nav__link"> Scaffolding </a> </li> @@ -496,9 +866,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/application/services/" class="md-nav__link"> + <a href="ecolyo/application/services/" title="Services" class="md-nav__link"> Services </a> </li> @@ -509,9 +878,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/application/gitflow/" class="md-nav__link"> + <a href="ecolyo/application/gitflow/" title="Gitflow" class="md-nav__link"> Gitflow </a> </li> @@ -522,9 +890,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/application/deploy/" class="md-nav__link"> + <a href="ecolyo/application/deploy/" title="Deploy" class="md-nav__link"> Deploy </a> </li> @@ -540,20 +907,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3-5" type="checkbox" id="nav-3-5" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-5" type="checkbox" id="nav-3-5"> <label class="md-nav__link" for="nav-3-5"> Konnectors - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Konnectors" data-md-level="2"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> <label class="md-nav__title" for="nav-3-5"> - <span class="md-nav__icon md-icon"></span> Konnectors </label> <ul class="md-nav__list" data-md-scrollfix> @@ -564,9 +926,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/konnectors/enedis/" class="md-nav__link"> + <a href="ecolyo/konnectors/enedis/" title="Enedis" class="md-nav__link"> Enedis </a> </li> @@ -577,9 +938,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/konnectors/grdf/" class="md-nav__link"> + <a href="ecolyo/konnectors/grdf/" title="GRDF" class="md-nav__link"> GRDF </a> </li> @@ -590,9 +950,8 @@ - <li class="md-nav__item"> - <a href="ecolyo/konnectors/egl/" class="md-nav__link"> + <a href="ecolyo/konnectors/egl/" title="Eau du Grand Lyon" class="md-nav__link"> Eau du Grand Lyon </a> </li> @@ -603,6 +962,90 @@ </li> + + + + + + <li class="md-nav__item md-nav__item--nested"> + + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3-6" type="checkbox" id="nav-3-6"> + + <label class="md-nav__link" for="nav-3-6"> + Functionalities + </label> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-3-6"> + Functionalities + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + <li class="md-nav__item"> + <a href="ecolyo/functionalities/initialization/" title="Initialization" class="md-nav__link"> + Initialization + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="ecolyo/functionalities/consumption/" title="Consumption" class="md-nav__link"> + Consumption + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="ecolyo/functionalities/ecogesture/" title="Ecogesture" class="md-nav__link"> + Ecogesture + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="ecolyo/functionalities/challenge/" title="Challenge" class="md-nav__link"> + Challenge + </a> + </li> + + + + + + + + <li class="md-nav__item"> + <a href="ecolyo/functionalities/profile_type/" title="Profile Type" class="md-nav__link"> + Profile Type + </a> + </li> + + + </ul> + </nav> + </li> + + </ul> </nav> </li> @@ -613,20 +1056,15 @@ - - <li class="md-nav__item md-nav__item--nested"> - - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4" > + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4"> <label class="md-nav__link" for="nav-4"> Proxy - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Proxy" data-md-level="1"> + <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> <label class="md-nav__title" for="nav-4"> - <span class="md-nav__icon md-icon"></span> Proxy </label> <ul class="md-nav__list" data-md-scrollfix> @@ -637,9 +1075,8 @@ - <li class="md-nav__item"> - <a href="proxy/description/" class="md-nav__link"> + <a href="proxy/description/" title="Description" class="md-nav__link"> Description </a> </li> @@ -650,20 +1087,27 @@ + <li class="md-nav__item"> + <a href="proxy/monitoring/" title="Monitoring" class="md-nav__link"> + Monitoring + </a> + </li> + + + + + + - <li class="md-nav__item md-nav__item--nested"> + <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4-3" type="checkbox" id="nav-4-3"> - <input class="md-nav__toggle md-toggle" data-md-toggle="nav-4-2" type="checkbox" id="nav-4-2" > - - <label class="md-nav__link" for="nav-4-2"> + <label class="md-nav__link" for="nav-4-3"> Use cases - <span class="md-nav__icon md-icon"></span> </label> - <nav class="md-nav" aria-label="Use cases" data-md-level="2"> - <label class="md-nav__title" for="nav-4-2"> - <span class="md-nav__icon md-icon"></span> + <nav class="md-nav" data-md-component="collapsible" data-md-level="2"> + <label class="md-nav__title" for="nav-4-3"> Use cases </label> <ul class="md-nav__list" data-md-scrollfix> @@ -674,9 +1118,8 @@ - <li class="md-nav__item"> - <a href="proxy/use_cases/enedis/" class="md-nav__link"> + <a href="proxy/use_cases/enedis/" title="Enedis" class="md-nav__link"> Enedis </a> </li> @@ -687,9 +1130,8 @@ - <li class="md-nav__item"> - <a href="proxy/use_cases/grdfadict/" class="md-nav__link"> + <a href="proxy/use_cases/grdfadict/" title="Grdf Adict" class="md-nav__link"> Grdf Adict </a> </li> @@ -725,6 +1167,9 @@ <p><img alt="europe" class="inline-center-left" src="/img/partners/europe.png" /> <img alt="auvergne" src="/img/partners/auvergne.png" /></p> + + + @@ -740,20 +1185,20 @@ <footer class="md-footer"> <div class="md-footer-nav"> - <nav class="md-footer-nav__inner md-grid" aria-label="Footer"> + <nav class="md-footer-nav__inner md-grid"> - <a href="ecolyo/" class="md-footer-nav__link md-footer-nav__link--next" rel="next"> - <div class="md-footer-nav__title"> - <div class="md-ellipsis"> + <a href="pilote/Pilote%20-%20TS%20-%20Back/" title="Index" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next"> + <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"> + <span class="md-flex__ellipsis"> <span class="md-footer-nav__direction"> Next </span> - Introduction - </div> + Index + </span> </div> - <div class="md-footer-nav__button md-icon"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> + <div class="md-flex__cell md-flex__cell--shrink"> + <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i> </div> </a> @@ -764,10 +1209,11 @@ <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> - Made with + powered by + <a href="https://www.mkdocs.org" target="_blank" rel="noopener">MkDocs</a> + and <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> - Material for MkDocs - </a> + Material for MkDocs</a> </div> </div> @@ -776,18 +1222,9 @@ </div> - <script src="assets/javascripts/vendor.08c56446.min.js"></script> - <script src="assets/javascripts/bundle.6ced434e.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script> - - <script> - app = initialize({ - base: ".", - features: [], - search: Object.assign({ - worker: "assets/javascripts/worker/search.8c7e0a7e.min.js" - }, typeof search !== "undefined" && search) - }) - </script> + <script src="assets/javascripts/application.c33a9706.js"></script> + + <script>app.initialize({version:"1.1",url:{base:"."}})</script> </body> diff --git a/site/search/search_index.json b/site/search/search_index.json index 44a97fd46b161ecbdee15aa072176705bfcf427c..d59638b14882fa9e1ed49579e1120469605ebfd0 100644 --- a/site/search/search_index.json +++ b/site/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"The Self-Data Grand Lyon technical doc covers projects developped by the Grandlyon Metropolis in cooperation with Cozy Cloud .","title":"Home"},{"location":"ecolyo/","text":"LLLE - Ecolyo is a multi-fluid application solution towards users of the grand lyon metropolis to monitor and optimize their energy consumption. If you are a new developper tasked to work on this project, check the setup your environment and launch the application on local to start the application. Repository Ecolyo gitlab repository","title":"Introduction"},{"location":"ecolyo/#repository","text":"Ecolyo gitlab repository","title":"Repository"},{"location":"ecolyo/application/deploy/","text":"Section under Construction This section will show you how to deploy your project on different environments. Setup First of all you'll need to install MobaXterm in order to connect to the server. Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands. Install WSL First open Powershell as administrator and launch the following command : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart This command will install WSL on your computer. After this, you'll need to reboot . Install your Linux distribution After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : wsl.exe --list --running Now you should see the name of your distribution in the list. Setup your distribution Start Up Updating the packages list by typing : sudo apt update Install the nodejs using the apt package manager sudo apt install To verify the Installation execute the following command : nodejs --version To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : sudo apt install npm To verify the npm Install check using the command : npm --version To Downlaod and Setup Yarn sudo apt install yarn To check the Installed version of Yarn : yarn --version Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands : sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc Now you should be at least in version ^1.22 and ready to go on. Configuration of MobaXterm First open a new session and connect to the distant host 192.168.62.31 . Don't forget to add the path to the private key in the advanced SSH settings. Deploy Ecolyo Deploy on Alpha Windows First open your Ubuntu terminal, and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : yarn build After this, you can launch the deployment. In order to deploy on ecolyo-dev-build (development environment) use the command : yarn deploy-dev If you want to deploy on the ecolyo-build environment, use : yarn deploy To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm. Linux From your current branch, run yarn build then sudo yarn deploy_dev to instantly deploy your working branch on the latest tagged Ecolyo container registry.","title":"Deploy"},{"location":"ecolyo/application/deploy/#setup","text":"First of all you'll need to install MobaXterm in order to connect to the server. Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands.","title":"Setup"},{"location":"ecolyo/application/deploy/#install-wsl","text":"First open Powershell as administrator and launch the following command : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart This command will install WSL on your computer. After this, you'll need to reboot .","title":"Install WSL"},{"location":"ecolyo/application/deploy/#install-your-linux-distribution","text":"After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : wsl.exe --list --running Now you should see the name of your distribution in the list.","title":"Install your Linux distribution"},{"location":"ecolyo/application/deploy/#setup-your-distribution","text":"Start Up Updating the packages list by typing : sudo apt update Install the nodejs using the apt package manager sudo apt install To verify the Installation execute the following command : nodejs --version To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : sudo apt install npm To verify the npm Install check using the command : npm --version To Downlaod and Setup Yarn sudo apt install yarn To check the Installed version of Yarn : yarn --version Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands : sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc Now you should be at least in version ^1.22 and ready to go on.","title":"Setup your distribution"},{"location":"ecolyo/application/deploy/#configuration-of-mobaxterm","text":"First open a new session and connect to the distant host 192.168.62.31 . Don't forget to add the path to the private key in the advanced SSH settings.","title":"Configuration of MobaXterm"},{"location":"ecolyo/application/deploy/#deploy-ecolyo","text":"","title":"Deploy Ecolyo"},{"location":"ecolyo/application/deploy/#deploy-on-alpha","text":"","title":"Deploy on Alpha"},{"location":"ecolyo/application/deploy/#windows","text":"First open your Ubuntu terminal, and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : yarn build After this, you can launch the deployment. In order to deploy on ecolyo-dev-build (development environment) use the command : yarn deploy-dev If you want to deploy on the ecolyo-build environment, use : yarn deploy To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm.","title":"Windows"},{"location":"ecolyo/application/deploy/#linux","text":"From your current branch, run yarn build then sudo yarn deploy_dev to instantly deploy your working branch on the latest tagged Ecolyo container registry.","title":"Linux"},{"location":"ecolyo/application/description/","text":"Section under Construction Ecolyo is a Cozy application that allows users to connect their energy accounts such as EGL , ENEDIS and GRDF , using cozy konnectors","title":"Description"},{"location":"ecolyo/application/gitflow/","text":"Section under Construction Initialize Create a new projet in gitlab and take note of its url Protecting Master Branch On the gitlab page of your project go to Settings/Repository in the Protected Branches section. Select the Master branch and set allow to merge to Master and allow to push to No one This will prevent anyone to push on the master branch, the only way to add code to the branch will be using merge requests. Setting Development Branch Retrieve the project on your computer, open a command line and execute. git clone https://forge.grandlyon.com/web-et-numerique/llle.git Create the development branch git checkout -b dev Init your project and then type any time you want to commit changes: git add . git commit -m \"Commit changes\" git push origin dev Start Developing For any other development you should create a branch from the development branch. First make sure to be on the dev branch, type: git branch to see your current branch Conventional Commits The commit contains the following structural types : - fix - feature In our team organisation we are using IceScrum to keep track of our User Stories (US). Each US is identified by a number. In order to easily identify the commit that refers to the US, a feature branch name should follow this structure: features/<number of the User Story>-<title_of_the_user_story> You can create the branch by typing: git checkout -b features/<number of the User Story>-<title_of_the_user_story> Note that the feature type is the only one with a dedicated folder (features/-US). Each fix branch should be named as the following fix-\\<title_of_the_fix> . You can create the branch by typing: git checkout -b fix-<title_of_the_fix> Breaking Change Appends a ! before the title of the commit to notify that a breaking change has happened. Give a solid description of the changes as well. Types other than fix and feature are allowed, for example build , chore , ci , docs , style , refactor , perf , test and others. add tag git tag -a 1.0.0 -m \"complementary message\" Gitflow Scheme","title":"Gitflow"},{"location":"ecolyo/application/gitflow/#initialize","text":"Create a new projet in gitlab and take note of its url","title":"Initialize"},{"location":"ecolyo/application/gitflow/#protecting-master-branch","text":"On the gitlab page of your project go to Settings/Repository in the Protected Branches section. Select the Master branch and set allow to merge to Master and allow to push to No one This will prevent anyone to push on the master branch, the only way to add code to the branch will be using merge requests.","title":"Protecting Master Branch"},{"location":"ecolyo/application/gitflow/#setting-development-branch","text":"Retrieve the project on your computer, open a command line and execute. git clone https://forge.grandlyon.com/web-et-numerique/llle.git Create the development branch git checkout -b dev Init your project and then type any time you want to commit changes: git add . git commit -m \"Commit changes\" git push origin dev","title":"Setting Development Branch"},{"location":"ecolyo/application/gitflow/#start-developing","text":"For any other development you should create a branch from the development branch. First make sure to be on the dev branch, type: git branch to see your current branch","title":"Start Developing"},{"location":"ecolyo/application/gitflow/#conventional-commits","text":"The commit contains the following structural types : - fix - feature In our team organisation we are using IceScrum to keep track of our User Stories (US). Each US is identified by a number. In order to easily identify the commit that refers to the US, a feature branch name should follow this structure: features/<number of the User Story>-<title_of_the_user_story> You can create the branch by typing: git checkout -b features/<number of the User Story>-<title_of_the_user_story> Note that the feature type is the only one with a dedicated folder (features/-US). Each fix branch should be named as the following fix-\\<title_of_the_fix> . You can create the branch by typing: git checkout -b fix-<title_of_the_fix> Breaking Change Appends a ! before the title of the commit to notify that a breaking change has happened. Give a solid description of the changes as well. Types other than fix and feature are allowed, for example build , chore , ci , docs , style , refactor , perf , test and others. add tag git tag -a 1.0.0 -m \"complementary message\"","title":"Conventional Commits"},{"location":"ecolyo/application/gitflow/#gitflow-scheme","text":"","title":"Gitflow Scheme"},{"location":"ecolyo/application/scaffolding/","text":"In this section, you will find information about the project file structure and the purpose of the main folders. Source Files Folder/File Purpose assets The application's assets, contains fonts, svg and png files components/CommonKit In this folder you'll find global components such as Buttons, Cards, Icons, etc... Many of these components are overrided material-ui components components/ContainerComponents In this folder you'll find parent components which calls chlidren Content Components components/ContentComponents In this folder you'll find every content component that are called by Container Components components/Contexts This folder contains the component used to set the context of the application components/Hooks This folder contains the hooks of the application App.jsx The root component, it calls the Container component ' ViewContainer ' which is our main component db In this folder, you'll find JSON data used for challenges, ecogestures, and the FAQ. doctypes This folder contains the cozy doctypes, you can see more on Cozy Documentation enum This folder contains enums for Fluid types, Screen types, and Timesteps. locales This folder contains JSON data used by the translation system i18n provided by Cozy-ui services Here you'll find all the services styles The styles folder you'll find a base folder that contains our variables and a components folder that contains components styles targets utils In this folder you'll find utilitaries methods Configuration Files Folder/File Purpose .eslintrc.js Config file for ESLint gitlab-ci.yml Config file used for Gitlab continuous integration .prettierrc Config file for Prettier extension config.json Config file for fluid types jest.config.js Config file used by Jest for testing the application manifest.webapp Manifest of the application, used by cozy for the managment of permissions, you can add permissions for doctypes there tsconfig.json Config file for TypeScript","title":"Scaffolding"},{"location":"ecolyo/application/scaffolding/#source-files","text":"Folder/File Purpose assets The application's assets, contains fonts, svg and png files components/CommonKit In this folder you'll find global components such as Buttons, Cards, Icons, etc... Many of these components are overrided material-ui components components/ContainerComponents In this folder you'll find parent components which calls chlidren Content Components components/ContentComponents In this folder you'll find every content component that are called by Container Components components/Contexts This folder contains the component used to set the context of the application components/Hooks This folder contains the hooks of the application App.jsx The root component, it calls the Container component ' ViewContainer ' which is our main component db In this folder, you'll find JSON data used for challenges, ecogestures, and the FAQ. doctypes This folder contains the cozy doctypes, you can see more on Cozy Documentation enum This folder contains enums for Fluid types, Screen types, and Timesteps. locales This folder contains JSON data used by the translation system i18n provided by Cozy-ui services Here you'll find all the services styles The styles folder you'll find a base folder that contains our variables and a components folder that contains components styles targets utils In this folder you'll find utilitaries methods","title":"Source Files"},{"location":"ecolyo/application/scaffolding/#configuration-files","text":"Folder/File Purpose .eslintrc.js Config file for ESLint gitlab-ci.yml Config file used for Gitlab continuous integration .prettierrc Config file for Prettier extension config.json Config file for fluid types jest.config.js Config file used by Jest for testing the application manifest.webapp Manifest of the application, used by cozy for the managment of permissions, you can add permissions for doctypes there tsconfig.json Config file for TypeScript","title":"Configuration Files"},{"location":"ecolyo/application/services/","text":"Section under Construction Cron Services - Monthly Report In order to build an automated task within our cozy-stack, we can create services which are javascript files called from a trigger job. On Ecolyo, we add a trigger that is launched every month with a cron attribute. On that trigger we link a .js script then we instanciate this script with cozy-client. Service.js Manifest Config Cron Definition cozy-stack Testing","title":"Services"},{"location":"ecolyo/application/services/#cron-services-monthly-report","text":"In order to build an automated task within our cozy-stack, we can create services which are javascript files called from a trigger job. On Ecolyo, we add a trigger that is launched every month with a cron attribute. On that trigger we link a .js script then we instanciate this script with cozy-client.","title":"Cron Services - Monthly Report"},{"location":"ecolyo/application/services/#servicejs","text":"","title":"Service.js"},{"location":"ecolyo/application/services/#manifest-config","text":"Cron Definition cozy-stack","title":"Manifest Config"},{"location":"ecolyo/application/services/#testing","text":"","title":"Testing"},{"location":"ecolyo/functionalities/challenge/","text":"Section under Construction","title":"Challenge"},{"location":"ecolyo/getting_started/launch_local_application/","text":"Section under Construction This section will allow you to launch a proper local environment of the Ecolyo application Initialisation of the project Clone the project repository Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git User settings Open the project with VSCode and add the following code into .vscode/settings.json: { \"workbench.colorCustomizations\": { /* Put anything you like here */ }, \"editor.snippetSuggestions\": \"top\", \"editor.tabSize\": 2, \"editor.formatOnSave\": true, \"diffEditor.ignoreTrimWhitespace\": false, \"window.zoomLevel\": 0, \"gitlens.advanced.messages\": { \"suppressShowKeyBindingsNotice\": true }, \"breadcrumbs.enabled\": true, \"workbench.settings.editor\": \"json\", \"editor.tabSize\": 2, \"editor.formatOnSave\": true, \"editor.formatOnPaste\": true } If this file is not empty, you can simply add the follwing lines to it: \"gitlens.advanced.messages\": { \"suppressShowKeyBindingsNotice\": true }, \"breadcrumbs.enabled\": true, \"workbench.settings.editor\": \"json\", \"editor.formatOnSave\": true, \"diffEditor.ignoreTrimWhitespace\": false, \"window.zoomLevel\": 0, Installation of the projet Installation of node modules To install required node module, open a terminal on the root folder of the projet and type the following command: yarn install Start Ecolyo application To start ecolyo application just launch the command: yarn start If the application starts successfully you should obtain the following message: App successfully compiled! Dev assets:http://localhost:8888 Once the application is started, run the easy-cozy stack with docker. Fix webpack error on cozy script Deprecated Updated cozy-script lib To fix it launch the following command in node_modules/cozy-script folder: yarn add webpack Run easy-cozy dev stack The dev stack will contain the cozy-stack with some default applications and konnectors and allow you to run this stack locally. First login to the forge registry: docker login registry.forge.grandlyon.com You will need to enter for credentials. Next pull the last image of the dev stack: docker pull registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/cozy-env:latest On windows Launch the stack will following command: yarn winstack A Powershell window will open. Wait until the success message: TO BE COMPLETED Once successfull you can launch your local cozy with following url: Cozy local url Local database can also be consulted at the following url: Cozy local DB On Linux From the project folder, launch following command: yarn linuxstack Wait until the success message: TO BE COMPLETED Once successfull you can launch your local cozy with following url Cozy local url and connect with the password ' cozy '. Local database can also be consulted at the following url: Cozy local DB Import moke data Requirement Your dev stack should be running to import the moke data First install ACH using yarn : yarn global add cozy-ach Next launch the script createDayDataFiles.js available into test folder cd test node createDayDataFiles.js You can change the period of data generated by changing the following lines: ``` const startingdate = DateTime.local() .plus({ days: -120 }) .startOf('day') const endingDate = DateTime.local() .plus({ days: -1 }) .startOf('day') ``` Just replace -120 by the value needed Json files with data will be created into test/data folder. ACH script \"importData.bat\" will load the content of the file into your couchDB (database of your dev stack). Launch it using following commands: cd test ./importData.bat You'll be prompted for a cozysessid, you can get it in the web console ; in the 'application' tab, look for the cookies and just copy the cozysessid value. A new browser windows will open and asking you approval to import data. Just click on Approve Finally your data is loaded and ready to be displayed in the Ecolyo Application !","title":"Launch the application on local"},{"location":"ecolyo/getting_started/launch_local_application/#initialisation-of-the-project","text":"","title":"Initialisation of the project"},{"location":"ecolyo/getting_started/launch_local_application/#clone-the-project-repository","text":"Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git","title":"Clone the project repository"},{"location":"ecolyo/getting_started/launch_local_application/#user-settings","text":"Open the project with VSCode and add the following code into .vscode/settings.json: { \"workbench.colorCustomizations\": { /* Put anything you like here */ }, \"editor.snippetSuggestions\": \"top\", \"editor.tabSize\": 2, \"editor.formatOnSave\": true, \"diffEditor.ignoreTrimWhitespace\": false, \"window.zoomLevel\": 0, \"gitlens.advanced.messages\": { \"suppressShowKeyBindingsNotice\": true }, \"breadcrumbs.enabled\": true, \"workbench.settings.editor\": \"json\", \"editor.tabSize\": 2, \"editor.formatOnSave\": true, \"editor.formatOnPaste\": true } If this file is not empty, you can simply add the follwing lines to it: \"gitlens.advanced.messages\": { \"suppressShowKeyBindingsNotice\": true }, \"breadcrumbs.enabled\": true, \"workbench.settings.editor\": \"json\", \"editor.formatOnSave\": true, \"diffEditor.ignoreTrimWhitespace\": false, \"window.zoomLevel\": 0,","title":"User settings"},{"location":"ecolyo/getting_started/launch_local_application/#installation-of-the-projet","text":"","title":"Installation of the projet"},{"location":"ecolyo/getting_started/launch_local_application/#installation-of-node-modules","text":"To install required node module, open a terminal on the root folder of the projet and type the following command: yarn install","title":"Installation of node modules"},{"location":"ecolyo/getting_started/launch_local_application/#start-ecolyo-application","text":"To start ecolyo application just launch the command: yarn start If the application starts successfully you should obtain the following message: App successfully compiled! Dev assets:http://localhost:8888 Once the application is started, run the easy-cozy stack with docker. Fix webpack error on cozy script Deprecated Updated cozy-script lib To fix it launch the following command in node_modules/cozy-script folder: yarn add webpack","title":"Start Ecolyo application"},{"location":"ecolyo/getting_started/launch_local_application/#run-easy-cozy-dev-stack","text":"The dev stack will contain the cozy-stack with some default applications and konnectors and allow you to run this stack locally. First login to the forge registry: docker login registry.forge.grandlyon.com You will need to enter for credentials. Next pull the last image of the dev stack: docker pull registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/cozy-env:latest","title":"Run easy-cozy dev stack"},{"location":"ecolyo/getting_started/launch_local_application/#on-windows","text":"Launch the stack will following command: yarn winstack A Powershell window will open. Wait until the success message: TO BE COMPLETED Once successfull you can launch your local cozy with following url: Cozy local url Local database can also be consulted at the following url: Cozy local DB","title":"On windows"},{"location":"ecolyo/getting_started/launch_local_application/#on-linux","text":"From the project folder, launch following command: yarn linuxstack Wait until the success message: TO BE COMPLETED Once successfull you can launch your local cozy with following url Cozy local url and connect with the password ' cozy '. Local database can also be consulted at the following url: Cozy local DB","title":"On Linux"},{"location":"ecolyo/getting_started/launch_local_application/#import-moke-data","text":"Requirement Your dev stack should be running to import the moke data First install ACH using yarn : yarn global add cozy-ach Next launch the script createDayDataFiles.js available into test folder cd test node createDayDataFiles.js You can change the period of data generated by changing the following lines: ``` const startingdate = DateTime.local() .plus({ days: -120 }) .startOf('day') const endingDate = DateTime.local() .plus({ days: -1 }) .startOf('day') ``` Just replace -120 by the value needed Json files with data will be created into test/data folder. ACH script \"importData.bat\" will load the content of the file into your couchDB (database of your dev stack). Launch it using following commands: cd test ./importData.bat You'll be prompted for a cozysessid, you can get it in the web console ; in the 'application' tab, look for the cookies and just copy the cozysessid value. A new browser windows will open and asking you approval to import data. Just click on Approve Finally your data is loaded and ready to be displayed in the Ecolyo Application !","title":"Import moke data"},{"location":"ecolyo/getting_started/launch_local_konnector/","text":"Section under Construction","title":"Launch a konnector on local"},{"location":"ecolyo/getting_started/setup_your_environment/","text":"This section will allow you to install a proper local environment step by step for Ecolyo application using VSCode IDE. VSCode Install VSCode Installation for VSCode can be found here: Installation of VSCode . Extensions Installation of Extention is explained here: Installation of Extensions . Here are the list of important extensions to install: Prettier - Code formatter ES7 React/Redux/GraphQL/React-Native snippets GitLens - Git supercharged Markdown Preview Optional extensions: Bracket Pair Colorizer 2 CSS Peek Auto Rename Tag indent-rainbow TabOut Liveshare (pair programming extension) User settings User settings for Ecolyo are described in this section: LINK TO SECTION TO ADD Git The project is using GitLab, you will need to install Git to checkout the projet. Installation for Git can be found here: Installation of Git . Node Version 12 For now please install node v12, any later version will cause side effects on sass modules! Download node-v12 Node.js\u00ae is a JavaScript runtime built on Chrome's V8 JavaScript engine. Yarn Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is described with this package manager. Installation for yarn can be found here: Installation of Yarn . Docker Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code. Install Docker Installation of Docker can be found here: Installation of Docker . Install Docker-Compose Installation of Docker-Compose (according to your OS) is explained here: Installation of Docker-Compose .","title":"Setup your environment"},{"location":"ecolyo/getting_started/setup_your_environment/#vscode","text":"","title":"VSCode"},{"location":"ecolyo/getting_started/setup_your_environment/#install-vscode","text":"Installation for VSCode can be found here: Installation of VSCode .","title":"Install VSCode"},{"location":"ecolyo/getting_started/setup_your_environment/#extensions","text":"Installation of Extention is explained here: Installation of Extensions . Here are the list of important extensions to install: Prettier - Code formatter ES7 React/Redux/GraphQL/React-Native snippets GitLens - Git supercharged Markdown Preview Optional extensions: Bracket Pair Colorizer 2 CSS Peek Auto Rename Tag indent-rainbow TabOut Liveshare (pair programming extension)","title":"Extensions"},{"location":"ecolyo/getting_started/setup_your_environment/#user-settings","text":"User settings for Ecolyo are described in this section: LINK TO SECTION TO ADD","title":"User settings"},{"location":"ecolyo/getting_started/setup_your_environment/#git","text":"The project is using GitLab, you will need to install Git to checkout the projet. Installation for Git can be found here: Installation of Git .","title":"Git"},{"location":"ecolyo/getting_started/setup_your_environment/#node","text":"Version 12 For now please install node v12, any later version will cause side effects on sass modules! Download node-v12 Node.js\u00ae is a JavaScript runtime built on Chrome's V8 JavaScript engine.","title":"Node"},{"location":"ecolyo/getting_started/setup_your_environment/#yarn","text":"Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is described with this package manager. Installation for yarn can be found here: Installation of Yarn .","title":"Yarn"},{"location":"ecolyo/getting_started/setup_your_environment/#docker","text":"Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.","title":"Docker"},{"location":"ecolyo/getting_started/setup_your_environment/#install-docker","text":"Installation of Docker can be found here: Installation of Docker .","title":"Install Docker"},{"location":"ecolyo/getting_started/setup_your_environment/#install-docker-compose","text":"Installation of Docker-Compose (according to your OS) is explained here: Installation of Docker-Compose .","title":"Install Docker-Compose"},{"location":"ecolyo/konnectors/egl/","text":"Section under Construction","title":"Eau du Grand Lyon"},{"location":"ecolyo/konnectors/enedis/","text":"Section under Construction","title":"Enedis"},{"location":"ecolyo/konnectors/grdf/","text":"Section under Construction This konnector fetches consumptions measures from Grdf Adict API. This is an Oauth Konnector, meaning the authentification performed to access all data is made following an Oauth2 protocol. You can clone the project here . You should also check Cozy's official documentations for konnectors : https://docs.cozy.io/en/tutorials/konnector/getting-started/ https://docs.cozy.io/en/tutorials/konnector/oauth/ Grdf Adict Konnector The Oauth protocol does not take place in the konnector code, therefore it is also important to take a look at the proxy to fully understand all the interactions that will be told below. All the actions performed by the stack are targetted from pre-registered paramaters, here is the list of all parameters needed by the stack to perform the Oauth protocol and allow the konnector to fetch data. On its first launch, following the Oauth Client Connect authentification. The cozy stack calls the authentification_endpoint and start the oauth protocol, see proxy doc . The account has now an access_token and an id_token from the oauth call id_token is only given when requesting the token endpoint in authorization_code grant_type. This token holds several meta datas, including the pce_id (id of user's meter) that will be needed further to fetch user's datas. Konnector starts, fails to find a pce_id in database on first launch therefore decodes the id_token to store the pce_id in db (see addData ). Konnector restarts, this time knowing a pce_id, it fails to fetch datas because the access_token from oauth call has a reduced scope (only scoping for meta data requests). Konnector launches a refresh call, the proxy knows to answer it with a client_credentials grant_type call to grdf /access_token. Konnector restarts with everyting needed in database to fetch datas and store them in couchdb. Further jobs will not need to change scope again and will only ask for refresh tokens. Flow summarized to do Request PCE's frequency Grdf owns different type of meters, some are read twice a year (every six months therefore called 6M), others are 1M or 1D Launch on standalone In the project repository type yarn standalone to launch the konnector without a cozy stack running. Installation Build the konnector with yarn build . Install on easy-cozy (development purposes) sudo docker cp /home/easy-cozy/fun/grdf-konnector/build/ $container_id:/tmp/grdf-oauth sudo docker-compose exec cozy ./cozy konnectors install grdf-oauth --domain \"$alphaDomain\" file:///tmp/grdf-oauth $container_id Install on production Type yarn deploy to build on a dedicated branch. Build branch is stored as a docker image in a registry : Container Registry .","title":"GRDF"},{"location":"ecolyo/konnectors/grdf/#grdf-adict-konnector","text":"The Oauth protocol does not take place in the konnector code, therefore it is also important to take a look at the proxy to fully understand all the interactions that will be told below. All the actions performed by the stack are targetted from pre-registered paramaters, here is the list of all parameters needed by the stack to perform the Oauth protocol and allow the konnector to fetch data. On its first launch, following the Oauth Client Connect authentification. The cozy stack calls the authentification_endpoint and start the oauth protocol, see proxy doc . The account has now an access_token and an id_token from the oauth call id_token is only given when requesting the token endpoint in authorization_code grant_type. This token holds several meta datas, including the pce_id (id of user's meter) that will be needed further to fetch user's datas. Konnector starts, fails to find a pce_id in database on first launch therefore decodes the id_token to store the pce_id in db (see addData ). Konnector restarts, this time knowing a pce_id, it fails to fetch datas because the access_token from oauth call has a reduced scope (only scoping for meta data requests). Konnector launches a refresh call, the proxy knows to answer it with a client_credentials grant_type call to grdf /access_token. Konnector restarts with everyting needed in database to fetch datas and store them in couchdb. Further jobs will not need to change scope again and will only ask for refresh tokens.","title":"Grdf Adict Konnector"},{"location":"ecolyo/konnectors/grdf/#flow-summarized","text":"to do Request PCE's frequency Grdf owns different type of meters, some are read twice a year (every six months therefore called 6M), others are 1M or 1D","title":"Flow summarized"},{"location":"ecolyo/konnectors/grdf/#launch-on-standalone","text":"In the project repository type yarn standalone to launch the konnector without a cozy stack running.","title":"Launch on standalone"},{"location":"ecolyo/konnectors/grdf/#installation","text":"Build the konnector with yarn build .","title":"Installation"},{"location":"ecolyo/konnectors/grdf/#install-on-easy-cozy-development-purposes","text":"sudo docker cp /home/easy-cozy/fun/grdf-konnector/build/ $container_id:/tmp/grdf-oauth sudo docker-compose exec cozy ./cozy konnectors install grdf-oauth --domain \"$alphaDomain\" file:///tmp/grdf-oauth $container_id","title":"Install on easy-cozy (development purposes)"},{"location":"ecolyo/konnectors/grdf/#install-on-production","text":"Type yarn deploy to build on a dedicated branch. Build branch is stored as a docker image in a registry : Container Registry .","title":"Install on production"},{"location":"ecolyo/project_architecture/architecture/","text":"Section under Construction","title":"Architecture"},{"location":"ecolyo/project_architecture/cozy/","text":"Section under Construction","title":"Cozy"},{"location":"ecolyo/project_architecture/doctypes/","text":"Timeseries doctypes Description Each fluid has its own doctype wildcard and one doctype per time step. Each available time step for a fluid depends of the available data from the energy provider. Here are the different time step: * minute * hour * day * month * year Doctype Here are the available doctypes: Fluid type Doctype wildcard Doctypes electricity fluid / enedis com.grandlyon.enedis.* com.grandlyon.enedis.minute com.grandlyon.enedis.hour com.grandlyon.enedis.day com.grandlyon.enedis.month com.grandlyon.enedis.year gaz fluid / grdf com.grandlyon.grdf.* com.grandlyon.grdf.hour com.grandlyon.grdf.day com.grandlyon.grdf.month com.grandlyon.grdf.year water fluid / eau du grand lyon com.grandlyon.egl.* com.grandlyon.egl.day com.grandlyon.egl.month com.grandlyon.egl.year Structure Field Type Description load number load (in kWh or L) minute number minute of the date set to 0 except for minute serie hour number hour of the date set to 0 except for minute and hour series day number day of the date set to 1 for month and year series month number month of the date set to 1 for year series year number year of the date Example { \"load\": 770.18, \"minute\": 0, \"hour\": 0, \"day\": 1, \"month\": 1, \"year\": 2020 } User profile Description This doctype is used to store all information about the user. Doctype com.grandlyon.ecolyo.userprofile Structure Field Type Description level number challenge level of the user challengeTypeHash string Hash used to verify the content of challenge type ecogestureHash string Hash used to verify the content of ecogesture haveSeenWelcomeModal boolean flag to inform is the user have seen the welcome modal Example { \"challengeTypeHash\": \"c10bbfec554e735d58a5d7009c9964e4a6bc4c65\", \"ecogestureHash\": \"71d475cead14a465d697de596ad21e9aebf3def2\", \"haveSeenWelcomeModal\": true, \"level\": 2 } Ecogesture Description This doctype is used to store ecogestures. Doctype com.grandlyon.ecolyo.ecogesture Structure Field Type Description shortName string short name of the ecogesture longName string long name of the ecogesture shortDescription string short description of the ecogesture longDescription string long description of the ecogesture usage string usage of the ecogesture fluidTypes FluidType[] Array of fluid type on which ecogesture can have an impact FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 nwh number negawattheure - impact of the ecogesture from 0 to 10 pack number pack number of the ecogesture (1 pack contain 2 ecogestures) iconName string icon name for ecogesture unlocked boolean (Optional) state for unlocked ecogesture Example { \"shortName\": \"Contr\u00f4le du nuage\", \"longName\": \"Je r\u00e8gle la temp\u00e9rature de mon eau chaude entre 55 et 60 \u00b0C.\", \"shortDescription\": \"\", \"longDescription\": \"Bien souvent les chauffe-eau sont r\u00e9gl\u00e9s pour une temp\u00e9rature de 70 \u00b0C dans le ballon, ce qui n\u2019est pas \u00e9conomique et peut m\u00eame \u00eatre dangereux !\", \"usage\": \"Eau chaude sanitaire\", \"fluidTypes\": [ 0 ], \"nwh\": 6, \"pack\": 8 } Challenge type Description This doctype is used to store all available challenges. Doctype com.grandlyon.ecolyo.challengetype Structure Field Type Description type TypeChallenge type of challenge TypeChallenge enum: - CHALLENGE = 0 - ACHIEVEMENT = 1 title string title of the challenge description string description of the challenge level number level needed to unlock the challenge duration Duration duration. (Duration from luxon) fluidTypes FluidType[] Array of fluid type associated to the challenge FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 relationships any relation to available ecogestures for the challenge \"availableEcogestures\": { \"data\": Ecogesture[] } Example { \"type\": 1, \"title\": \"Ecolyo Royal\", \"description\": \"Connecter l'application Ecolyo \u00e0 votre distributeur d'\u00e9nergie\", \"level\": 1, \"duration\": { \"days\": 0 }, \"fluidTypes\": [ 0, 1, 2 ], \"relationships\": { \"availableEcogestures\": { \"data\": [ { \"_id\": \"0085\", \"_type\": \"com.grandlyon.ecolyo.ecogesture\" }, { \"_id\": \"0092\", \"_type\": \"com.grandlyon.ecolyo.ecogesture\" } ] } } } User challenge Description This doctype is used to store all additionnal information about a challenge started or ended by the user. Doctype com.grandlyon.ecolyo.userchallenge Structure Field Type Description startingDate string starting date of the the challenge endingDate string ending date of the challenge state ChallengeState state of the challenge maxEnergy number currentEnergy number badge BadgeState state of the badge BadgeState enum - FAILED = 0 - SUCCESS = 1 fluidTypes FluidType[] fluid types set when user launch the challenge FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 relationships any relation to the challenge type and selected ecogestures for the challenge \"challengeType\": { \"data\": ChallengeType[] } \"selectedEcogestures\": { \"data\": Ecogesture[] } Example { \"state\": 1 \"badge\": 1, \"currentEnergy\": -1, \"startingDate\": \"0001-01-01T00:00:00.000Z\", \"endingDate\": \"2020-06-16T00:00:00.000+02:00\", \"maxEnergy\": -1, \"relationships\": { \"challengeType\": { \"data\": { \"_id\": \"CHA00000001\", \"_type\": \"com.grandlyon.ecolyo.challengetype\" } }, \"selectedEcogestures\": { \"data\": [ { \"_id\": \"0085\", \"_type\": \"com.grandlyon.ecolyo.ecogesture\" }, { \"_id\": \"0092\", \"_type\": \"com.grandlyon.ecolyo.ecogesture\" } ] } }, }","title":"DocTypes"},{"location":"ecolyo/project_architecture/doctypes/#timeseries-doctypes","text":"","title":"Timeseries doctypes"},{"location":"ecolyo/project_architecture/doctypes/#description","text":"Each fluid has its own doctype wildcard and one doctype per time step. Each available time step for a fluid depends of the available data from the energy provider. Here are the different time step: * minute * hour * day * month * year","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype","text":"Here are the available doctypes: Fluid type Doctype wildcard Doctypes electricity fluid / enedis com.grandlyon.enedis.* com.grandlyon.enedis.minute com.grandlyon.enedis.hour com.grandlyon.enedis.day com.grandlyon.enedis.month com.grandlyon.enedis.year gaz fluid / grdf com.grandlyon.grdf.* com.grandlyon.grdf.hour com.grandlyon.grdf.day com.grandlyon.grdf.month com.grandlyon.grdf.year water fluid / eau du grand lyon com.grandlyon.egl.* com.grandlyon.egl.day com.grandlyon.egl.month com.grandlyon.egl.year","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure","text":"Field Type Description load number load (in kWh or L) minute number minute of the date set to 0 except for minute serie hour number hour of the date set to 0 except for minute and hour series day number day of the date set to 1 for month and year series month number month of the date set to 1 for year series year number year of the date","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example","text":"{ \"load\": 770.18, \"minute\": 0, \"hour\": 0, \"day\": 1, \"month\": 1, \"year\": 2020 }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#user-profile","text":"","title":"User profile"},{"location":"ecolyo/project_architecture/doctypes/#description_1","text":"This doctype is used to store all information about the user.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_1","text":"com.grandlyon.ecolyo.userprofile","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_1","text":"Field Type Description level number challenge level of the user challengeTypeHash string Hash used to verify the content of challenge type ecogestureHash string Hash used to verify the content of ecogesture haveSeenWelcomeModal boolean flag to inform is the user have seen the welcome modal","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_1","text":"{ \"challengeTypeHash\": \"c10bbfec554e735d58a5d7009c9964e4a6bc4c65\", \"ecogestureHash\": \"71d475cead14a465d697de596ad21e9aebf3def2\", \"haveSeenWelcomeModal\": true, \"level\": 2 }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#ecogesture","text":"","title":"Ecogesture"},{"location":"ecolyo/project_architecture/doctypes/#description_2","text":"This doctype is used to store ecogestures.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_2","text":"com.grandlyon.ecolyo.ecogesture","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_2","text":"Field Type Description shortName string short name of the ecogesture longName string long name of the ecogesture shortDescription string short description of the ecogesture longDescription string long description of the ecogesture usage string usage of the ecogesture fluidTypes FluidType[] Array of fluid type on which ecogesture can have an impact FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 nwh number negawattheure - impact of the ecogesture from 0 to 10 pack number pack number of the ecogesture (1 pack contain 2 ecogestures) iconName string icon name for ecogesture unlocked boolean (Optional) state for unlocked ecogesture","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_2","text":"{ \"shortName\": \"Contr\u00f4le du nuage\", \"longName\": \"Je r\u00e8gle la temp\u00e9rature de mon eau chaude entre 55 et 60 \u00b0C.\", \"shortDescription\": \"\", \"longDescription\": \"Bien souvent les chauffe-eau sont r\u00e9gl\u00e9s pour une temp\u00e9rature de 70 \u00b0C dans le ballon, ce qui n\u2019est pas \u00e9conomique et peut m\u00eame \u00eatre dangereux !\", \"usage\": \"Eau chaude sanitaire\", \"fluidTypes\": [ 0 ], \"nwh\": 6, \"pack\": 8 }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#challenge-type","text":"","title":"Challenge type"},{"location":"ecolyo/project_architecture/doctypes/#description_3","text":"This doctype is used to store all available challenges.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_3","text":"com.grandlyon.ecolyo.challengetype","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_3","text":"Field Type Description type TypeChallenge type of challenge TypeChallenge enum: - CHALLENGE = 0 - ACHIEVEMENT = 1 title string title of the challenge description string description of the challenge level number level needed to unlock the challenge duration Duration duration. (Duration from luxon) fluidTypes FluidType[] Array of fluid type associated to the challenge FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 relationships any relation to available ecogestures for the challenge \"availableEcogestures\": { \"data\": Ecogesture[] }","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_3","text":"{ \"type\": 1, \"title\": \"Ecolyo Royal\", \"description\": \"Connecter l'application Ecolyo \u00e0 votre distributeur d'\u00e9nergie\", \"level\": 1, \"duration\": { \"days\": 0 }, \"fluidTypes\": [ 0, 1, 2 ], \"relationships\": { \"availableEcogestures\": { \"data\": [ { \"_id\": \"0085\", \"_type\": \"com.grandlyon.ecolyo.ecogesture\" }, { \"_id\": \"0092\", \"_type\": \"com.grandlyon.ecolyo.ecogesture\" } ] } } }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#user-challenge","text":"","title":"User challenge"},{"location":"ecolyo/project_architecture/doctypes/#description_4","text":"This doctype is used to store all additionnal information about a challenge started or ended by the user.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_4","text":"com.grandlyon.ecolyo.userchallenge","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_4","text":"Field Type Description startingDate string starting date of the the challenge endingDate string ending date of the challenge state ChallengeState state of the challenge maxEnergy number currentEnergy number badge BadgeState state of the badge BadgeState enum - FAILED = 0 - SUCCESS = 1 fluidTypes FluidType[] fluid types set when user launch the challenge FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 relationships any relation to the challenge type and selected ecogestures for the challenge \"challengeType\": { \"data\": ChallengeType[] } \"selectedEcogestures\": { \"data\": Ecogesture[] }","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_4","text":"{ \"state\": 1 \"badge\": 1, \"currentEnergy\": -1, \"startingDate\": \"0001-01-01T00:00:00.000Z\", \"endingDate\": \"2020-06-16T00:00:00.000+02:00\", \"maxEnergy\": -1, \"relationships\": { \"challengeType\": { \"data\": { \"_id\": \"CHA00000001\", \"_type\": \"com.grandlyon.ecolyo.challengetype\" } }, \"selectedEcogestures\": { \"data\": [ { \"_id\": \"0085\", \"_type\": \"com.grandlyon.ecolyo.ecogesture\" }, { \"_id\": \"0092\", \"_type\": \"com.grandlyon.ecolyo.ecogesture\" } ] } }, }","title":"Example"},{"location":"ecolyo/project_architecture/environments/","text":"Section under Construction","title":"Environments"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/","text":"Pilote is a social application. Section under Construction Repository Global Pilote gitlab repository Repository dedicated project Pilote TS backend - gitlab repository Acces to the application deployed DEV : https://pilote-agent-dev.grandlyon.com/ REC : https://pilote-agent-rec.grandlyon.com/","title":"Index"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/#repository-global","text":"Pilote gitlab repository","title":"Repository Global"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/#repository-dedicated-project","text":"Pilote TS backend - gitlab repository","title":"Repository dedicated project"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/#acces-to-the-application-deployed","text":"DEV : https://pilote-agent-dev.grandlyon.com/ REC : https://pilote-agent-rec.grandlyon.com/","title":"Acces to the application deployed"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/application/deploy/","text":"Section under Construction This section will show you how to deploy your project on different environments. Deployment For each environment, the CI-CD is implemented. Once, you commit on 'dev' branch or 'rec' branch, the pipeline linked is running.","title":"Deploy"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/application/deploy/#deployment","text":"For each environment, the CI-CD is implemented. Once, you commit on 'dev' branch or 'rec' branch, the pipeline linked is running.","title":"Deployment"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/","text":"Section under Construction This section will allow you to launch a proper local environment of the Pilote TS back application Initialisation of the project Clone the project repository Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial-back.git Installation of the projet Start Pilote application To start Pilote application just launch the command in a PowerShell or Windows Powershell tool: yarn docker:dev If the application starts successfully you should obtain two containers running: mps-travailleursocial-back_mps_1 mps-travailleursocial-back_postgres_1 You can access by: http://localhost:3020/api It will be redirect to the Swagger UI. It allow to test the different API defined. Run Jest test To start test defined just run the command in a PowerShell or Windows Powershell tool: yarn test:watch","title":"Launch local application"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#initialisation-of-the-project","text":"","title":"Initialisation of the project"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#clone-the-project-repository","text":"Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial-back.git","title":"Clone the project repository"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#installation-of-the-projet","text":"","title":"Installation of the projet"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#start-pilote-application","text":"To start Pilote application just launch the command in a PowerShell or Windows Powershell tool: yarn docker:dev If the application starts successfully you should obtain two containers running: mps-travailleursocial-back_mps_1 mps-travailleursocial-back_postgres_1 You can access by: http://localhost:3020/api It will be redirect to the Swagger UI. It allow to test the different API defined.","title":"Start Pilote application"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#run-jest-test","text":"To start test defined just run the command in a PowerShell or Windows Powershell tool: yarn test:watch","title":"Run Jest test"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/","text":"This section will allow you to install a proper local environment step by step for Pilote application using VSCode IDE. VSCode Install VSCode Installation for VSCode can be found here: Installation of VSCode . Extensions Installation of Extention is explained here: Installation of Extensions . Here are the list of important extensions to install: Prettier - Code formatter ES7 React/Redux/GraphQL/React-Native snippets GitLens - Git supercharged Markdown Preview Optional extensions: Bracket Pair Colorizer 2 CSS Peek Auto Rename Tag indent-rainbow TabOut Liveshare (pair programming extension) User settings User settings for Ecolyo are described in this section: LINK TO SECTION TO ADD Git The project is using GitLab, you will need to install Git to checkout the projet. Installation for Git can be found here: Installation of Git . Node Version 12 For now please install node v12, any later version will cause side effects on sass modules! Download node-v12 Node.js\u00ae is a JavaScript runtime built on Chrome's V8 JavaScript engine. Yarn Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is described with this package manager. Installation for yarn can be found here: Installation of Yarn . Docker Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code. Install Docker Installation of Docker can be found here: Installation of Docker . Install Docker-Compose Installation of Docker-Compose (according to your OS) is explained here: Installation of Docker-Compose .","title":"Setup your environment"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#vscode","text":"","title":"VSCode"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#install-vscode","text":"Installation for VSCode can be found here: Installation of VSCode .","title":"Install VSCode"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#extensions","text":"Installation of Extention is explained here: Installation of Extensions . Here are the list of important extensions to install: Prettier - Code formatter ES7 React/Redux/GraphQL/React-Native snippets GitLens - Git supercharged Markdown Preview Optional extensions: Bracket Pair Colorizer 2 CSS Peek Auto Rename Tag indent-rainbow TabOut Liveshare (pair programming extension)","title":"Extensions"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#user-settings","text":"User settings for Ecolyo are described in this section: LINK TO SECTION TO ADD","title":"User settings"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#git","text":"The project is using GitLab, you will need to install Git to checkout the projet. Installation for Git can be found here: Installation of Git .","title":"Git"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#node","text":"Version 12 For now please install node v12, any later version will cause side effects on sass modules! Download node-v12 Node.js\u00ae is a JavaScript runtime built on Chrome's V8 JavaScript engine.","title":"Node"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#yarn","text":"Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is described with this package manager. Installation for yarn can be found here: Installation of Yarn .","title":"Yarn"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#docker","text":"Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.","title":"Docker"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#install-docker","text":"Installation of Docker can be found here: Installation of Docker .","title":"Install Docker"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#install-docker-compose","text":"Installation of Docker-Compose (according to your OS) is explained here: Installation of Docker-Compose .","title":"Install Docker-Compose"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/project_architecture/architecture/","text":"Section under Construction Techno used NestJS Jest for th tests Docker PostgreSQL","title":"Architecture"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/project_architecture/architecture/#techno-used","text":"NestJS Jest for th tests Docker PostgreSQL","title":"Techno used"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/","text":"Pilote is a social application. Repository Pilote gitlab repository Pilote TS front - gitlab repository","title":"Index"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/#repository","text":"Pilote gitlab repository Pilote TS front - gitlab repository","title":"Repository"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/application/deploy/","text":"Section under Construction This section will show you how to deploy your project on different environments. Deployment For each environment, the CI-CD is implemented. Once, you commit on 'dev' branch or 'rec' branch, the pipeline liked is running.","title":"Deploy"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/application/deploy/#deployment","text":"For each environment, the CI-CD is implemented. Once, you commit on 'dev' branch or 'rec' branch, the pipeline liked is running.","title":"Deployment"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/","text":"Section under Construction This section will allow you to launch a proper local environment of the Pilote TS front application Initialisation of the project Clone the project repository Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial.git Installation of the projet Start Pilote application Before to start Pilote application, you need to run this command in order to install dependencies: yarn install To start Pilote application just launch the command in a PowerShell or Windows Powershell tool: yarn start If the application starts successfully you should access to: http://localhost:3001/","title":"Launch local application"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/#initialisation-of-the-project","text":"","title":"Initialisation of the project"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/#clone-the-project-repository","text":"Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial.git","title":"Clone the project repository"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/#installation-of-the-projet","text":"","title":"Installation of the projet"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/#start-pilote-application","text":"Before to start Pilote application, you need to run this command in order to install dependencies: yarn install To start Pilote application just launch the command in a PowerShell or Windows Powershell tool: yarn start If the application starts successfully you should access to: http://localhost:3001/","title":"Start Pilote application"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/","text":"Section under Construction This section will show you how to deploy your project on different environments. Setup First of all you'll need to install MobaXterm in order to connect to the server. Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands. Install WSL First open Powershell as administrator and launch the following command : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart This command will install WSL on your computer. After this, you'll need to reboot . Install your Linux distribution After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : wsl.exe --list --running Now you should see the name of your distribution in the list. Setup your distribution Start Up Updating the packages list by typing : sudo apt update Install the nodejs using the apt package manager sudo apt install To verify the Installation execute the following command : nodejs --version To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : sudo apt install npm To verify the npm Install check using the command : npm --version To Downlaod and Setup Yarn sudo apt install yarn To check the Installed version of Yarn : yarn --version Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands : sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc Now you should be at least in version ^1.22 and ready to go on. Configuration of MobaXterm First open a new session and connect to the distant host 192.168.62.31 . Don't forget to add the path to the private key in the advanced SSH settings. Deploy Pilote Deploy on Alpha Windows First open your Ubuntu terminal, and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : yarn build After this, you can launch the deployment. In order to deploy on pilote-dev-build (development environment) use the command : yarn deploy-dev If you want to deploy on the pilote-build environment, use : yarn deploy To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm. Linux From your current branch, run yarn build then sudo yarn deploy_dev to instantly deploy your working branch on the latest tagged Pilote container registry.","title":"Deploy"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#setup","text":"First of all you'll need to install MobaXterm in order to connect to the server. Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands.","title":"Setup"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#install-wsl","text":"First open Powershell as administrator and launch the following command : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart This command will install WSL on your computer. After this, you'll need to reboot .","title":"Install WSL"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#install-your-linux-distribution","text":"After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : wsl.exe --list --running Now you should see the name of your distribution in the list.","title":"Install your Linux distribution"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#setup-your-distribution","text":"Start Up Updating the packages list by typing : sudo apt update Install the nodejs using the apt package manager sudo apt install To verify the Installation execute the following command : nodejs --version To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : sudo apt install npm To verify the npm Install check using the command : npm --version To Downlaod and Setup Yarn sudo apt install yarn To check the Installed version of Yarn : yarn --version Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands : sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc Now you should be at least in version ^1.22 and ready to go on.","title":"Setup your distribution"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#configuration-of-mobaxterm","text":"First open a new session and connect to the distant host 192.168.62.31 . Don't forget to add the path to the private key in the advanced SSH settings.","title":"Configuration of MobaXterm"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#deploy-pilote","text":"","title":"Deploy Pilote"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#deploy-on-alpha","text":"","title":"Deploy on Alpha"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#windows","text":"First open your Ubuntu terminal, and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : yarn build After this, you can launch the deployment. In order to deploy on pilote-dev-build (development environment) use the command : yarn deploy-dev If you want to deploy on the pilote-build environment, use : yarn deploy To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm.","title":"Windows"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#linux","text":"From your current branch, run yarn build then sudo yarn deploy_dev to instantly deploy your working branch on the latest tagged Pilote container registry.","title":"Linux"},{"location":"pilote/Pilote%20-%20Usager/application/doctypes/","text":"Section under Construction Doctypes Doctypes represent different types of data. Their primary use is for permissions: an app or konnector will request permissions for one or several doctypes and will not be able to access other doctypes. See Doctypes documentation for more information. The following is a full description of the doctypes we use and their fields. Cozy doctypes won't be fully described. Instead, for every used one, we'll include a link to its official documentation. Used Cozy doctypes io.cozy.accounts : Konnector accounts io.cozy.contacts : Contacts io.cozy.contacts.groups : Contacts groups io.cozy.files : Files io.cozy.konnectors : Connectors installed in the cozy io.cozy.permissions : Permissions of the instance io.cozy.todos.item : Todos item io.cozy.todos.list : Todos list io.cozy.triggers : Job triggers Custom doctypes com.grandlyon.mps.notes Represents ... com.grandlyon.mps.notes attributes are: title : {string} The title of the note. content : {string} The content of the note. #### Example json { title: '...', content: '...', } com.grandlyon.mps.profile Represents the tutorial and notifications state. com.grandlyon.mps.profile attributes are: tutorial : {object} contains home , contacts , documents , actions , and notes which are all of type boolean . Each one represents the state of its tutorial. For example, home: true means the home tutorial hasn't been seen yet and will be visible to the user the next time he visits the Home component. notification : {} ... #### Example json { tutorial: { home: true, contacts: false, documents: true, actions: false, notes: true }, notification: ... } } com.grandlyon.mps.appointments ... com.grandlyon.mps.docrules Represents ... com.grandlyon.mps.docrules attributes are: description : {string} Description of the docrule. doctype : {string} ... rule : {object} Contains limit of type number and selector which is an object with the following attributes: 'cozyMetadata.classification' : {string} Classification ... 'cozyMetadata.createdAt' : {object} Creation date. #### Example json { description: '...', doctype: 'io.cozy.files', rule: { limit: 10, selector: { 'cozyMetadata.classification': '...', 'cozyMetadata.createdAt': 'December 23, 2020 03:24:00', } } }","title":"Doctypes"},{"location":"pilote/Pilote%20-%20Usager/application/doctypes/#doctypes","text":"Doctypes represent different types of data. Their primary use is for permissions: an app or konnector will request permissions for one or several doctypes and will not be able to access other doctypes. See Doctypes documentation for more information. The following is a full description of the doctypes we use and their fields. Cozy doctypes won't be fully described. Instead, for every used one, we'll include a link to its official documentation.","title":"Doctypes"},{"location":"pilote/Pilote%20-%20Usager/application/doctypes/#used-cozy-doctypes","text":"io.cozy.accounts : Konnector accounts io.cozy.contacts : Contacts io.cozy.contacts.groups : Contacts groups io.cozy.files : Files io.cozy.konnectors : Connectors installed in the cozy io.cozy.permissions : Permissions of the instance io.cozy.todos.item : Todos item io.cozy.todos.list : Todos list io.cozy.triggers : Job triggers","title":"Used Cozy doctypes"},{"location":"pilote/Pilote%20-%20Usager/application/doctypes/#custom-doctypes","text":"com.grandlyon.mps.notes Represents ... com.grandlyon.mps.notes attributes are: title : {string} The title of the note. content : {string} The content of the note. #### Example json { title: '...', content: '...', } com.grandlyon.mps.profile Represents the tutorial and notifications state. com.grandlyon.mps.profile attributes are: tutorial : {object} contains home , contacts , documents , actions , and notes which are all of type boolean . Each one represents the state of its tutorial. For example, home: true means the home tutorial hasn't been seen yet and will be visible to the user the next time he visits the Home component. notification : {} ... #### Example json { tutorial: { home: true, contacts: false, documents: true, actions: false, notes: true }, notification: ... } } com.grandlyon.mps.appointments ... com.grandlyon.mps.docrules Represents ... com.grandlyon.mps.docrules attributes are: description : {string} Description of the docrule. doctype : {string} ... rule : {object} Contains limit of type number and selector which is an object with the following attributes: 'cozyMetadata.classification' : {string} Classification ... 'cozyMetadata.createdAt' : {object} Creation date. #### Example json { description: '...', doctype: 'io.cozy.files', rule: { limit: 10, selector: { 'cozyMetadata.classification': '...', 'cozyMetadata.createdAt': 'December 23, 2020 03:24:00', } } }","title":"Custom doctypes"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/","text":"Section under Construction Initialize Create a new project in GitLab and take note of its URL Protecting Master Branch On the GitLab page of your project go to Settings/Repository in the Protected Branches section. Select the Master branch and set allow to merge to Master and allow to push to No one This will prevent anyone to push on the master branch, the only way to add code to the branch will be merge requests. Setting Development Branch Retrieve the project on your computer, open a command line and execute. git clone https://forge.grandlyon.com/web-et-numerique/llle.git git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-usager.git Create the development branch git checkout -b dev Init your project and then type any time you want to commit changes: git add . git commit -m \"Commit changes\" git push origin dev Start Developing For any other development you should create a branch from the development branch. First make sure to be on the dev branch, type: git branch to see your current branch Conventional Commits A feature branch name should follow this structure: feat/<title_of_the_user_story> You can create the branch by typing: git checkout -b feat/<title_of_the_user_story> Each fix branch should be named as the following fix-\\<title_of_the_fix> . Breaking Change Appends a ! before the title of the commit to notify that a breaking change has happened. Give a solid description of the changes as well. add tag git tag -a 1.0.0 -m \"complementary message\" Gitflow Scheme","title":"Gitflow"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#initialize","text":"Create a new project in GitLab and take note of its URL","title":"Initialize"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#protecting-master-branch","text":"On the GitLab page of your project go to Settings/Repository in the Protected Branches section. Select the Master branch and set allow to merge to Master and allow to push to No one This will prevent anyone to push on the master branch, the only way to add code to the branch will be merge requests.","title":"Protecting Master Branch"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#setting-development-branch","text":"Retrieve the project on your computer, open a command line and execute. git clone https://forge.grandlyon.com/web-et-numerique/llle.git git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-usager.git Create the development branch git checkout -b dev Init your project and then type any time you want to commit changes: git add . git commit -m \"Commit changes\" git push origin dev","title":"Setting Development Branch"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#start-developing","text":"For any other development you should create a branch from the development branch. First make sure to be on the dev branch, type: git branch to see your current branch","title":"Start Developing"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#conventional-commits","text":"A feature branch name should follow this structure: feat/<title_of_the_user_story> You can create the branch by typing: git checkout -b feat/<title_of_the_user_story> Each fix branch should be named as the following fix-\\<title_of_the_fix> . Breaking Change Appends a ! before the title of the commit to notify that a breaking change has happened. Give a solid description of the changes as well. add tag git tag -a 1.0.0 -m \"complementary message\"","title":"Conventional Commits"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#gitflow-scheme","text":"","title":"Gitflow Scheme"},{"location":"pilote/Pilote%20-%20Usager/application/scaffolding/","text":"Section under Construction In this section, you will find information about the project file structure and the purpose of the main folders. Source Files Folder/File Purpose assets The application's assets, contains fonts, svg and png files. docrules doctypes Contains the cozy doctypes, you can see more on Cozy Documentation . helpers Contains helper functions that are used by services. It contains also a test file for each helper file. locales Contains JSON data used by the translation system i18n provided by Cozy-ui . models Contains all our models' Interfaces services Here you'll find all the services. It contains also a test file for each service file. store Redux store. Contains actions, reducers, and store types. styles Styles folder. The base folder under it contains our variables, fonts, breakpoints, animations, and mixins. Whenever you add a style file elsewhere, don't forget to import it in index.scss . targets Contains mobile and browser targets. It also contains a Public target for social workers . types utils In this folder you'll find utilities methods. tests components/App.tsx The root component. Configuration Files Folder/File Purpose .eslintrc.js Config file for ESLint. gitlab-ci.yml Config file used for Gitlab continuous integration. .prettierrc Config file for Prettier extension. jest.config.js Config file used by Jest for testing the application. manifest.webapp Manifest of the application, used by cozy for permissions' management, you can add permissions for doctypes here. tsconfig.json Config file for TypeScript. ...","title":"Scaffolding"},{"location":"pilote/Pilote%20-%20Usager/application/scaffolding/#source-files","text":"Folder/File Purpose assets The application's assets, contains fonts, svg and png files. docrules doctypes Contains the cozy doctypes, you can see more on Cozy Documentation . helpers Contains helper functions that are used by services. It contains also a test file for each helper file. locales Contains JSON data used by the translation system i18n provided by Cozy-ui . models Contains all our models' Interfaces services Here you'll find all the services. It contains also a test file for each service file. store Redux store. Contains actions, reducers, and store types. styles Styles folder. The base folder under it contains our variables, fonts, breakpoints, animations, and mixins. Whenever you add a style file elsewhere, don't forget to import it in index.scss . targets Contains mobile and browser targets. It also contains a Public target for social workers . types utils In this folder you'll find utilities methods. tests components/App.tsx The root component.","title":"Source Files"},{"location":"pilote/Pilote%20-%20Usager/application/scaffolding/#configuration-files","text":"Folder/File Purpose .eslintrc.js Config file for ESLint. gitlab-ci.yml Config file used for Gitlab continuous integration. .prettierrc Config file for Prettier extension. jest.config.js Config file used by Jest for testing the application. manifest.webapp Manifest of the application, used by cozy for permissions' management, you can add permissions for doctypes here. tsconfig.json Config file for TypeScript. ...","title":"Configuration Files"},{"location":"pilote/Pilote%20-%20Usager/application/services/","text":"Section under Construction Profile Service Functions getProfile : Tries fetching the profile if it exists. If not, it creates a new one and returns it. updateProfile : Updates the profile. Note Service Functions findNoteCurrentAppointement : Returns a note from an appointment id. findNoteById : Returns a note by its id. getAllNotes : Returns all notes. findLastNote : Returns the last note by date. createNote : Creates a new note and returns it. updateNote : Updates a note. deleteNoteById : Deletes a note by its id. DocRule Service Functions createDocRule : Creates a new docRule. getDocRuleById : Returns a docRule by its id. getDocRulesByIds : Returns a list of docRules by their ids. getAllDocRules : Returns all docRules. createAllDocRules : Fetches all docRules and creates the missing ones. Document Service Functions getAllDocuments : Returns the list of all documents. getDocumentsByQualification : Returns a document by the 'metadata.qualification.label' . getDocumentsByQualifications : Uses getDocumentsByQualification to return a list of documents by the 'metadata.qualification.label' . getDocumentByID : Returns a document by its id. saveDocument : Creates a new file. editDocumentName : Edits a document's name by its id. deleteDocumentById : Deletes the document by its id. downloadDocument : Downloads a file from its id. viewDocument : Takes a document's id, opens its download link and returns it. Contact Service Functions getCurrentUser : Returns the contact with an existing me field, which represents the current user. getAllContacts : Returns a list of all contacts. findContactById : Returns a contact by its id. createContact : Creates a new contact. updateContact : Updates an existing contact. deleteContactById : Deletes a contact by its id. Group Service Function createMetroGroup : Creates a new group and returns it. getMetroGroup : Returns the group if it exists or creates it if it doesn't. ...","title":"Services"},{"location":"pilote/Pilote%20-%20Usager/application/services/#profile-service","text":"","title":"Profile Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions","text":"getProfile : Tries fetching the profile if it exists. If not, it creates a new one and returns it. updateProfile : Updates the profile.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#note-service","text":"","title":"Note Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions_1","text":"findNoteCurrentAppointement : Returns a note from an appointment id. findNoteById : Returns a note by its id. getAllNotes : Returns all notes. findLastNote : Returns the last note by date. createNote : Creates a new note and returns it. updateNote : Updates a note. deleteNoteById : Deletes a note by its id.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#docrule-service","text":"","title":"DocRule Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions_2","text":"createDocRule : Creates a new docRule. getDocRuleById : Returns a docRule by its id. getDocRulesByIds : Returns a list of docRules by their ids. getAllDocRules : Returns all docRules. createAllDocRules : Fetches all docRules and creates the missing ones.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#document-service","text":"","title":"Document Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions_3","text":"getAllDocuments : Returns the list of all documents. getDocumentsByQualification : Returns a document by the 'metadata.qualification.label' . getDocumentsByQualifications : Uses getDocumentsByQualification to return a list of documents by the 'metadata.qualification.label' . getDocumentByID : Returns a document by its id. saveDocument : Creates a new file. editDocumentName : Edits a document's name by its id. deleteDocumentById : Deletes the document by its id. downloadDocument : Downloads a file from its id. viewDocument : Takes a document's id, opens its download link and returns it.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#contact-service","text":"","title":"Contact Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions_4","text":"getCurrentUser : Returns the contact with an existing me field, which represents the current user. getAllContacts : Returns a list of all contacts. findContactById : Returns a contact by its id. createContact : Creates a new contact. updateContact : Updates an existing contact. deleteContactById : Deletes a contact by its id.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#group-service","text":"","title":"Group Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#function","text":"createMetroGroup : Creates a new group and returns it. getMetroGroup : Returns the group if it exists or creates it if it doesn't.","title":"Function"},{"location":"pilote/Pilote%20-%20Usager/application/services/#_1","text":"","title":"..."},{"location":"pilote/Pilote%20-%20Usager/application/store/","text":"Redux We are using Redux for our application state management. it maintains the state of the entire application in a single immutable state tree (object), which can't be changed directly. When something changes, a new object is created (using actions and reducers). For more information about Redux, visit The [official documentation][https://redux.js.org/]. Store The following are the existing store entities used by our application: Global : Preserves the global state, which includes isPublic and screenType (Mobile/Tablet/Desktop). UploadDocument : Manages the state of uploaded documents. Profile : Preserves the state of tutorials and notifications. For each reducer file, a test file is associated testing the reducer. All the actions are tested in a separate file with the same actions file name. Used packages react-redux : Official React bindings for Redux . redux-devtools-extension : For debugging application's state changes. @types/react-redux : This package contains type definitions for react-redux.","title":"Redux"},{"location":"pilote/Pilote%20-%20Usager/application/store/#redux","text":"We are using Redux for our application state management. it maintains the state of the entire application in a single immutable state tree (object), which can't be changed directly. When something changes, a new object is created (using actions and reducers). For more information about Redux, visit The [official documentation][https://redux.js.org/].","title":"Redux"},{"location":"pilote/Pilote%20-%20Usager/application/store/#store","text":"The following are the existing store entities used by our application: Global : Preserves the global state, which includes isPublic and screenType (Mobile/Tablet/Desktop). UploadDocument : Manages the state of uploaded documents. Profile : Preserves the state of tutorials and notifications. For each reducer file, a test file is associated testing the reducer. All the actions are tested in a separate file with the same actions file name.","title":"Store"},{"location":"pilote/Pilote%20-%20Usager/application/store/#used-packages","text":"react-redux : Official React bindings for Redux . redux-devtools-extension : For debugging application's state changes. @types/react-redux : This package contains type definitions for react-redux.","title":"Used packages"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/","text":"Section under Construction Use cozy-doctype in local In order to be able to use our own cozy-doctype, especialy remote doctype here, we need to use them in local. 1/ clone cozy-doctype repository into your system. Then, push it into your root project. 2/ After that, add your own remote doctype into cozy-doctype folder: - create a new folder ex: org.mps.share - push into this folder request file: request You must declare this doctype into your manifest.webapp file like that : \"share\": { \"description\": \"Required for searching on back-endTS\", \"type\": \"org.mps.share\", \"verbs\": [\"GET\", \"POST\"] }, 3/ In cozy-app-dev-with-app.sh, you need to add another option when you serve the cozy-stack: - cozy-stack serve --allow-root (...) --doctypes /path/to/the/doctype => in this project : - cozy-stack serve (...) --doctypes /data/cozy-doctypes !! Warning !! : You need to build and push the newlest image on the forge registry when the step 3 is done !! Warning !! : You must have all files, into your docker folder, in LF mode of \"End of Line Sequence\" ! For this project: - cd docker - docker build . - docker tag registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes - docker push registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes:latest 4/ The path \"/data/cozy-doctypes\" is link to the volume of the cozy-app-dev image. - in order to mount this volume, you need to add it when you run the 'docker run' command : -v $PWD/cozy-doctypes:/data/cozy-doctypes => for this project : docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/mps -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml -v $PWD/cozy-doctypes:/data/cozy-doctypes registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes How to test your remote doctype ? GET 1/ In the request file created. Specify the methode and the route to your target URL : GET https://pilote-agent-dev.grandlyon.com/api/cozy or with value in query : GET https://pilote-agent-dev.grandlyon.com/api/auth/token/check?token={{token}} 2/ Then, you can test it by : - await client.getStackClient().fetchJSON('GET','/remote/org.mps.share') or with value in query : await client.getStackClient().fetchJSON('GET','/remote/org.mps.share?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNvenlBcGlDaGVjayIsInVzZXJJZCI6IjEiLCJpYXQiOjE2MDU2OTI0NjYsImV4cCI6MTYwNTY5MjUyNn0.HbQh5H-TcVIASUpbjZAD0MY9slRAJOVw-VMKSBu_sQ0' ) POST 1/ In the request file created. Specify the methode and the route to your target URL : POST https://pilote-agent-dev.grandlyon.com/api/auth/token/check Content-Type: application/json {{data}} 2/ Then, you can test it by : const parameters = { data: JSON.stringify({ token: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNvenlBcGlDaGVjayIsInVzZXJJZCI6IjEiLCJpYXQiOjE2MDU2MjYxNzAsImV4cCI6MTYwNTYyNjIzMH0.8m-rEAZkuqb4upAPKY7j8DhvFi8mVbmiCFDitgNYt6Y\" } ) } console.log('call remote ==> ', await client.getStackClient().fetchJSON('POST','/remote/org.mps.share', parameters ))","title":"Launch local doctypes"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/#use-cozy-doctype-in-local","text":"In order to be able to use our own cozy-doctype, especialy remote doctype here, we need to use them in local. 1/ clone cozy-doctype repository into your system. Then, push it into your root project. 2/ After that, add your own remote doctype into cozy-doctype folder: - create a new folder ex: org.mps.share - push into this folder request file: request You must declare this doctype into your manifest.webapp file like that : \"share\": { \"description\": \"Required for searching on back-endTS\", \"type\": \"org.mps.share\", \"verbs\": [\"GET\", \"POST\"] }, 3/ In cozy-app-dev-with-app.sh, you need to add another option when you serve the cozy-stack: - cozy-stack serve --allow-root (...) --doctypes /path/to/the/doctype => in this project : - cozy-stack serve (...) --doctypes /data/cozy-doctypes !! Warning !! : You need to build and push the newlest image on the forge registry when the step 3 is done !! Warning !! : You must have all files, into your docker folder, in LF mode of \"End of Line Sequence\" ! For this project: - cd docker - docker build . - docker tag registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes - docker push registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes:latest 4/ The path \"/data/cozy-doctypes\" is link to the volume of the cozy-app-dev image. - in order to mount this volume, you need to add it when you run the 'docker run' command : -v $PWD/cozy-doctypes:/data/cozy-doctypes => for this project : docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/mps -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml -v $PWD/cozy-doctypes:/data/cozy-doctypes registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes","title":"Use cozy-doctype in local"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/#how-to-test-your-remote-doctype","text":"","title":"How to test your remote doctype ?"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/#get","text":"1/ In the request file created. Specify the methode and the route to your target URL : GET https://pilote-agent-dev.grandlyon.com/api/cozy or with value in query : GET https://pilote-agent-dev.grandlyon.com/api/auth/token/check?token={{token}} 2/ Then, you can test it by : - await client.getStackClient().fetchJSON('GET','/remote/org.mps.share') or with value in query : await client.getStackClient().fetchJSON('GET','/remote/org.mps.share?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNvenlBcGlDaGVjayIsInVzZXJJZCI6IjEiLCJpYXQiOjE2MDU2OTI0NjYsImV4cCI6MTYwNTY5MjUyNn0.HbQh5H-TcVIASUpbjZAD0MY9slRAJOVw-VMKSBu_sQ0' )","title":"GET"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/#post","text":"1/ In the request file created. Specify the methode and the route to your target URL : POST https://pilote-agent-dev.grandlyon.com/api/auth/token/check Content-Type: application/json {{data}} 2/ Then, you can test it by : const parameters = { data: JSON.stringify({ token: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNvenlBcGlDaGVjayIsInVzZXJJZCI6IjEiLCJpYXQiOjE2MDU2MjYxNzAsImV4cCI6MTYwNTYyNjIzMH0.8m-rEAZkuqb4upAPKY7j8DhvFi8mVbmiCFDitgNYt6Y\" } ) } console.log('call remote ==> ', await client.getStackClient().fetchJSON('POST','/remote/org.mps.share', parameters ))","title":"POST"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_services/","text":"Section under Construction Use services in local Configure the cozy-stack on local In order to be able to use your sercice, follow these steps: 1/ clone cozy-doctype repository into your system. Then, push it into your root project. 2/ After that, add your own remote doctype into cozy-doctype folder: - create a new folder ex: org.mps.share - push into this folder request file: request You must declare this doctype into your manifest.webapp file like that : \"share\": { \"description\": \"Required for searching on back-endTS\", \"type\": \"org.mps.share\", \"verbs\": [\"GET\", \"POST\"] }, 3/ In cozy-app-dev-with-app.sh, you need to add another option when you serve the cozy-stack: - cozy-stack serve --allow-root (...) --doctypes /path/to/the/doctype => in this project : - cozy-stack serve (...) --doctypes /data/cozy-doctypes 4/ You need to add another option when you install apps in the cozy-stack (go to: docker\\cozy-app-dev-with-app.sh) In do_install_app(): #add symbolic link to mps for sms service ln -s /data/cozy-app/mps /data/cozy-storage/cozy.tools\\:8080/.cozy_apps/mps if [ -d \"data/cozy-app/mps/0.1.1\" ]; then echo \"data/cozy-app/mps/0.1.1 already here!\"; else mkdir /data/cozy-app/mps/0.1.1 cp -a /data/cozy-app/mps/services/ /data/cozy-app/mps/0.1.1/ echo \"data/cozy-app/mps/0.1.1 just create!\"; fi # mkdir /data/cozy-app/mps/0.1.1 # cp -a /data/cozy-app/mps/services/ /data/cozy-app/mps/0.1.1/ echo \"service added\" 5/ Then, add konnector-node-run.sh in docker folder. This file is a script to store the service logs. It should contain: #!/bin/bash rundir=\"${1}\" cd $rundir node index.js | tee /data/cozy-app/mps/services.log Then, add this following row into the Dockerfile: COPY konnector-node-run.sh /etc/cozy/konnector-node-run.sh 6/ Into the disableCSP.yml, you need to add one more configuration: konnectors: cmd: /etc/cozy/konnector-node-run.sh # run connectors with node !! Warning !! : You need to build and push the newlest image on the forge registry when the step 6 is done !! Warning !! : You must have all files, into your docker folder, in LF mode of \"End of Line Sequence\" ! Finaly, you should rebuild the docker image of the cozy-stack: - cd docker - docker build . - docker tag registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes - docker push registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes:latest 7/ The path \"/data/cozy-doctypes\" is link to the volume of the cozy-app-dev image. - in order to mount this volume, you need to add it when you run the 'docker run' command : -v $PWD/cozy-doctypes:/data/cozy-doctypes => for this project : docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/mps -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml -v $PWD/cozy-doctypes:/data/cozy-doctypes registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes How to test your service ? In the manifest.webapp, you need to declare the service: \"services\": { \"smsProcess\": { \"type\": \"node\", \"file\": \"services/smsProcess/pilote.js\" } }, Then, in src\\targets\\services, you can add your service. For this project, we have created a button in Home.component.tsx in order to generate trigger url to run the service: const getTrigger = async () => { const attrs = { type: '@webhook', worker: 'service', message: { name: 'smsProcess', slug: 'pilotedemo', }, } const trigger = await client.getStackClient() .collection('io.cozy.triggers') .create(attrs) console.log('trigger', trigger) } It generate an trigger URL that we can call with our backend application : URL_COZY/job/webhook/{{trigger_id}} URL_COZY represent the cozy-stack url of your environment and not your application URL.","title":"Launch local services"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_services/#use-services-in-local","text":"","title":"Use services in local"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_services/#configure-the-cozy-stack-on-local","text":"In order to be able to use your sercice, follow these steps: 1/ clone cozy-doctype repository into your system. Then, push it into your root project. 2/ After that, add your own remote doctype into cozy-doctype folder: - create a new folder ex: org.mps.share - push into this folder request file: request You must declare this doctype into your manifest.webapp file like that : \"share\": { \"description\": \"Required for searching on back-endTS\", \"type\": \"org.mps.share\", \"verbs\": [\"GET\", \"POST\"] }, 3/ In cozy-app-dev-with-app.sh, you need to add another option when you serve the cozy-stack: - cozy-stack serve --allow-root (...) --doctypes /path/to/the/doctype => in this project : - cozy-stack serve (...) --doctypes /data/cozy-doctypes 4/ You need to add another option when you install apps in the cozy-stack (go to: docker\\cozy-app-dev-with-app.sh) In do_install_app(): #add symbolic link to mps for sms service ln -s /data/cozy-app/mps /data/cozy-storage/cozy.tools\\:8080/.cozy_apps/mps if [ -d \"data/cozy-app/mps/0.1.1\" ]; then echo \"data/cozy-app/mps/0.1.1 already here!\"; else mkdir /data/cozy-app/mps/0.1.1 cp -a /data/cozy-app/mps/services/ /data/cozy-app/mps/0.1.1/ echo \"data/cozy-app/mps/0.1.1 just create!\"; fi # mkdir /data/cozy-app/mps/0.1.1 # cp -a /data/cozy-app/mps/services/ /data/cozy-app/mps/0.1.1/ echo \"service added\" 5/ Then, add konnector-node-run.sh in docker folder. This file is a script to store the service logs. It should contain: #!/bin/bash rundir=\"${1}\" cd $rundir node index.js | tee /data/cozy-app/mps/services.log Then, add this following row into the Dockerfile: COPY konnector-node-run.sh /etc/cozy/konnector-node-run.sh 6/ Into the disableCSP.yml, you need to add one more configuration: konnectors: cmd: /etc/cozy/konnector-node-run.sh # run connectors with node !! Warning !! : You need to build and push the newlest image on the forge registry when the step 6 is done !! Warning !! : You must have all files, into your docker folder, in LF mode of \"End of Line Sequence\" ! Finaly, you should rebuild the docker image of the cozy-stack: - cd docker - docker build . - docker tag registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes - docker push registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes:latest 7/ The path \"/data/cozy-doctypes\" is link to the volume of the cozy-app-dev image. - in order to mount this volume, you need to add it when you run the 'docker run' command : -v $PWD/cozy-doctypes:/data/cozy-doctypes => for this project : docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/mps -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml -v $PWD/cozy-doctypes:/data/cozy-doctypes registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes","title":"Configure the cozy-stack on local"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_services/#how-to-test-your-service","text":"In the manifest.webapp, you need to declare the service: \"services\": { \"smsProcess\": { \"type\": \"node\", \"file\": \"services/smsProcess/pilote.js\" } }, Then, in src\\targets\\services, you can add your service. For this project, we have created a button in Home.component.tsx in order to generate trigger url to run the service: const getTrigger = async () => { const attrs = { type: '@webhook', worker: 'service', message: { name: 'smsProcess', slug: 'pilotedemo', }, } const trigger = await client.getStackClient() .collection('io.cozy.triggers') .create(attrs) console.log('trigger', trigger) } It generate an trigger URL that we can call with our backend application : URL_COZY/job/webhook/{{trigger_id}} URL_COZY represent the cozy-stack url of your environment and not your application URL.","title":"How to test your service ?"},{"location":"proxy/description/","text":"Section under Construction This section of documentation refers to the Oauth protocols working hand in hand with our custom proxy and the cozy-stack. To fully understand its whereabouts, you should also look at the enedis konnector and grdf konnector documentation. proxy code source Feel free to check the proxy code at all time when reading this documentation. Oauth Dance To access customer data, one must first obtain customer authorization. This authorization is materialized by an access token and it must be obtained by the APIs exposed by each energy providers. These APIs implement Oauth 2.0 protocol, it requires authentication from the customer along with its given consent. Enedis Data Connect enedis documentation Create an account on https://datahub-enedis.fr/ to explore all the services exposed by Enedis. Authorize API swagger Regarding Enedis, two endpoints are exposed: /dataconnect/v1/oauth2/authorize Paramater Description client_id Unique identifier of the Application response_type Authorization scenario requested. It will always be \"code\" as Enedis implemented a code grant authorization state Security parameter allowing to maintain the state between the request and the redirection. ** Maximum length of 100 characters ! ** duration Duration of the consent requested by the application, ISO 8601 format. It cannot exceed 3 years Important The response targets the redirect-uri registered with Enedis (the redirect-uri is our proxy and the response will be explained in details further below when explaining the proxy endpoints mechanics). /v1/oauth2/token Paramater Description redirect_uri URI defined when the application was created. Must be secured in https content-type application/json grant_type Authorization type to get an access token. This must be set to \u201cauthorization_code\u201d when using an authorization code, and to \u201crefresh_token\u201d when using a refresh token client_id Unique identifier of the Application client_secret Secret of the client application, associated with its client_id refresh_token Refresh token returned to the previous POST request to the /token endpoint code Authorization code returned to the GET request of /authorize endpoint On success, response will contain access_token or refresh_token , usage_point_id among other things. All informations will be stored by the cozy-stack in a cozy-accounts database. Grdf Adict grdf documentation Visit https://site.grdf.fr/web/grdf-adict/technique to explore all the services exposed by Grdf. Prod endpoints are: https://sofit-sso-oidc.grdf.fr/openam/ Regarding Grdf Adict Oauth connexion, two endpoints are exposed: Oauth connexion still in Beta Grdf Adict Oauth service is called Client Connect and is still in early beta. It is currently lacking a state parameter in the Oauth dance. /oauth2/realms/externeGrdf/authorize /oauth2/realms/externeGrdf/access_token The /access_token endpoint can be called with two different grant_type parameter. authorization_code gives an access token and will also retrieve the consents list given by the user in session. client_credentials gives only the access token allowing us to request the data service. The grdf Konnector would only need to call the client_credentials to get a refresh token. Optional: Revoke Consent It is possible to cancel a consent that was given from the user to our service (for test or development purpose for instance). api.grdf.fr/adict/v1/droit_acces/{id_accreditation} Cozy Oauth Protocol cozy oauth flow documentation https://docs.cozy.io/en/cozy-stack/konnectors-workflow/#reminder-oauth-flow Couchdb The couchdb database must hold all informations needed for the konnector authentication to work properly. Auth informations are stored in the secrets/io-cozy-account_types database. You can create manually the document by entering these parameters for each konnector: Name Description _id Name of your konnector, for instance: enedisgrandlyon grant_mode authorization_code client_id Application id given by the API provider client_secret Secret also given by the API provider auth_endpoint Authorize endpoint to request when starting the oauth protocol token_endpoint Token endpoint to request, will be called when the auth endpoint response reaches the stack token_mode get Once the document is created, when launching the konnector from the cozy-home or inside the running application. The oauth flow will start. The cozy-stack will request the authorize endpoint, then call the token endpoint with the code received from the auth step. If the token request is a success. An account/service-name database will be added in couchdb containing all informations needed for authentication and the konnector will be free to work on all endpoints within its scope. Why we Need a Proxy The Oauth dance could be easily wrapped up with the two requests seen above. But since all cozy applications are hosted on different personnal clouds, following this guideline would mean that we need a client_id and a client_secret for each one of all the applications running. To answer this issue, two solutions are possible depending on what the energy supplier is willing to do. Providers could allow wildcard subdomains when registering the callback URI, it would parse the subdomain and adapt its redirection when answering /auth call. Exemple: https//*.cozygrandlyon.cloud/account/redirect -> parse subdomain before .cozy xyz.cozygrandlyon.cloud/account/redirect -> redirect to xyz toto.cozygrandlyon.cloud/account/redirect -> redirect to toto If the provider (Enedis for instance) is not accepting wildcards, then we put a proxy as a middleware to provide a generic endpoint to cater for all Oauth2 redirections. Result With that in mind, the proxy is now the one calling the auth and token provider endpoints. The instance name will be contained in redirect_uri, the stack will insert this parameters by itself in the /auth call. 3 endpoints are created in the proxy for each energy supplier : One for the auth One for the token One for the redirect uri Proxy flow stack -> proxy/auth -> provider/auth -> proxy/redirect -> stack -> proxy/token -> provider/token Proxy Code Explained reminder Feel free to check the proxy code at all time when reading this documentation. The proxy is coded in golang. It is composed of six endpoints as seen above. The first endpoint to be called is /auth . auth Originally called from a cozy-stack trying to setup its konnector. The proxy gets these informations from the query: client_id duration redirect_uri (auto inserted by the cozy-stack, except if you specify skip_redirect_uri:true in the couchdb) response_type state (as it was conceived by the cozy-stack) The state will be merged with the instance name, then decomposed again when reaching /redirect. This way the proxy is able to keep track of the cozy instance originally calling. With all these informations, the proxy can contact the provider /auth endpoint to start the oauth dance. Enedis note See that a new composed state is sent to enedis, it is made of the former state conceived by the cozy-stack + the cozyOrigin instance name. This will be usefull when enedis is leading the oauth dance to the next step and we will need the name of the cozy to answer. Once the call is sent, enedis will point to the /redirect endpoint. Grdf To be redacted redirect Retrieve the code , usage_point_id , and state answered by Enedis. Split the customed state that was modified in the /auth process. From this split it creates two variables : state host Finally redirect all these parameters in a query to the cozy-stack (the cozy-stack which is still waiting for an answer from its /auth call). state / instance The state must be recovered without the instance name, otherwise the cozy-stack won't recognized it and the handshake will fail. token Gathering from query or parameters all params. Sends a post request to the provider /token endpoint. The stack will store the response params in a accounts couchdb database. What Happens Next","title":"Description"},{"location":"proxy/description/#oauth-dance","text":"To access customer data, one must first obtain customer authorization. This authorization is materialized by an access token and it must be obtained by the APIs exposed by each energy providers. These APIs implement Oauth 2.0 protocol, it requires authentication from the customer along with its given consent.","title":"Oauth Dance"},{"location":"proxy/description/#enedis-data-connect","text":"enedis documentation Create an account on https://datahub-enedis.fr/ to explore all the services exposed by Enedis. Authorize API swagger Regarding Enedis, two endpoints are exposed:","title":"Enedis Data Connect"},{"location":"proxy/description/#dataconnectv1oauth2authorize","text":"Paramater Description client_id Unique identifier of the Application response_type Authorization scenario requested. It will always be \"code\" as Enedis implemented a code grant authorization state Security parameter allowing to maintain the state between the request and the redirection. ** Maximum length of 100 characters ! ** duration Duration of the consent requested by the application, ISO 8601 format. It cannot exceed 3 years Important The response targets the redirect-uri registered with Enedis (the redirect-uri is our proxy and the response will be explained in details further below when explaining the proxy endpoints mechanics).","title":"/dataconnect/v1/oauth2/authorize"},{"location":"proxy/description/#v1oauth2token","text":"Paramater Description redirect_uri URI defined when the application was created. Must be secured in https content-type application/json grant_type Authorization type to get an access token. This must be set to \u201cauthorization_code\u201d when using an authorization code, and to \u201crefresh_token\u201d when using a refresh token client_id Unique identifier of the Application client_secret Secret of the client application, associated with its client_id refresh_token Refresh token returned to the previous POST request to the /token endpoint code Authorization code returned to the GET request of /authorize endpoint On success, response will contain access_token or refresh_token , usage_point_id among other things. All informations will be stored by the cozy-stack in a cozy-accounts database.","title":"/v1/oauth2/token"},{"location":"proxy/description/#grdf-adict","text":"grdf documentation Visit https://site.grdf.fr/web/grdf-adict/technique to explore all the services exposed by Grdf. Prod endpoints are: https://sofit-sso-oidc.grdf.fr/openam/ Regarding Grdf Adict Oauth connexion, two endpoints are exposed: Oauth connexion still in Beta Grdf Adict Oauth service is called Client Connect and is still in early beta. It is currently lacking a state parameter in the Oauth dance.","title":"Grdf Adict"},{"location":"proxy/description/#oauth2realmsexternegrdfauthorize","text":"","title":"/oauth2/realms/externeGrdf/authorize"},{"location":"proxy/description/#oauth2realmsexternegrdfaccess_token","text":"The /access_token endpoint can be called with two different grant_type parameter. authorization_code gives an access token and will also retrieve the consents list given by the user in session. client_credentials gives only the access token allowing us to request the data service. The grdf Konnector would only need to call the client_credentials to get a refresh token.","title":"/oauth2/realms/externeGrdf/access_token"},{"location":"proxy/description/#optional-revoke-consent","text":"It is possible to cancel a consent that was given from the user to our service (for test or development purpose for instance). api.grdf.fr/adict/v1/droit_acces/{id_accreditation}","title":"Optional: Revoke Consent"},{"location":"proxy/description/#cozy-oauth-protocol","text":"cozy oauth flow documentation https://docs.cozy.io/en/cozy-stack/konnectors-workflow/#reminder-oauth-flow","title":"Cozy Oauth Protocol"},{"location":"proxy/description/#couchdb","text":"The couchdb database must hold all informations needed for the konnector authentication to work properly. Auth informations are stored in the secrets/io-cozy-account_types database. You can create manually the document by entering these parameters for each konnector: Name Description _id Name of your konnector, for instance: enedisgrandlyon grant_mode authorization_code client_id Application id given by the API provider client_secret Secret also given by the API provider auth_endpoint Authorize endpoint to request when starting the oauth protocol token_endpoint Token endpoint to request, will be called when the auth endpoint response reaches the stack token_mode get Once the document is created, when launching the konnector from the cozy-home or inside the running application. The oauth flow will start. The cozy-stack will request the authorize endpoint, then call the token endpoint with the code received from the auth step. If the token request is a success. An account/service-name database will be added in couchdb containing all informations needed for authentication and the konnector will be free to work on all endpoints within its scope.","title":"Couchdb"},{"location":"proxy/description/#why-we-need-a-proxy","text":"The Oauth dance could be easily wrapped up with the two requests seen above. But since all cozy applications are hosted on different personnal clouds, following this guideline would mean that we need a client_id and a client_secret for each one of all the applications running. To answer this issue, two solutions are possible depending on what the energy supplier is willing to do. Providers could allow wildcard subdomains when registering the callback URI, it would parse the subdomain and adapt its redirection when answering /auth call. Exemple: https//*.cozygrandlyon.cloud/account/redirect -> parse subdomain before .cozy xyz.cozygrandlyon.cloud/account/redirect -> redirect to xyz toto.cozygrandlyon.cloud/account/redirect -> redirect to toto If the provider (Enedis for instance) is not accepting wildcards, then we put a proxy as a middleware to provide a generic endpoint to cater for all Oauth2 redirections.","title":"Why we Need a Proxy"},{"location":"proxy/description/#result","text":"With that in mind, the proxy is now the one calling the auth and token provider endpoints. The instance name will be contained in redirect_uri, the stack will insert this parameters by itself in the /auth call. 3 endpoints are created in the proxy for each energy supplier : One for the auth One for the token One for the redirect uri","title":"Result"},{"location":"proxy/description/#proxy-flow","text":"stack -> proxy/auth -> provider/auth -> proxy/redirect -> stack -> proxy/token -> provider/token","title":"Proxy flow"},{"location":"proxy/description/#proxy-code-explained","text":"reminder Feel free to check the proxy code at all time when reading this documentation. The proxy is coded in golang. It is composed of six endpoints as seen above. The first endpoint to be called is /auth .","title":"Proxy Code Explained"},{"location":"proxy/description/#auth","text":"Originally called from a cozy-stack trying to setup its konnector. The proxy gets these informations from the query: client_id duration redirect_uri (auto inserted by the cozy-stack, except if you specify skip_redirect_uri:true in the couchdb) response_type state (as it was conceived by the cozy-stack) The state will be merged with the instance name, then decomposed again when reaching /redirect. This way the proxy is able to keep track of the cozy instance originally calling. With all these informations, the proxy can contact the provider /auth endpoint to start the oauth dance.","title":"auth"},{"location":"proxy/description/#enedis","text":"note See that a new composed state is sent to enedis, it is made of the former state conceived by the cozy-stack + the cozyOrigin instance name. This will be usefull when enedis is leading the oauth dance to the next step and we will need the name of the cozy to answer. Once the call is sent, enedis will point to the /redirect endpoint.","title":"Enedis"},{"location":"proxy/description/#grdf","text":"To be redacted","title":"Grdf"},{"location":"proxy/description/#redirect","text":"Retrieve the code , usage_point_id , and state answered by Enedis. Split the customed state that was modified in the /auth process. From this split it creates two variables : state host Finally redirect all these parameters in a query to the cozy-stack (the cozy-stack which is still waiting for an answer from its /auth call). state / instance The state must be recovered without the instance name, otherwise the cozy-stack won't recognized it and the handshake will fail.","title":"redirect"},{"location":"proxy/description/#token","text":"Gathering from query or parameters all params. Sends a post request to the provider /token endpoint. The stack will store the response params in a accounts couchdb database.","title":"token"},{"location":"proxy/description/#what-happens-next","text":"","title":"What Happens Next"},{"location":"proxy/use_cases/enedis/","text":"","title":"Enedis"},{"location":"proxy/use_cases/grdfadict/","text":"","title":"Grdf Adict"}]} \ No newline at end of file +{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"The Self-Data Grand Lyon technical doc covers projects developped by the Grandlyon Metropolis in cooperation with Cozy Cloud .","title":"Home"},{"location":"ecolyo/","text":"Ecolyo is a multi-fluid application solution towards users of the grand lyon metropolis to monitor and optimize their energy consumption. If you are a new developper tasked to work on this project, check the setup your environment and launch the application on local to start the application. Repository Ecolyo gitlab repository","title":"Introduction"},{"location":"ecolyo/#repository","text":"Ecolyo gitlab repository","title":"Repository"},{"location":"ecolyo/application/deploy/","text":"Section under Construction This section will show you how to deploy your project on different environments. Setup First of all you'll need to install MobaXterm in order to connect to the server. Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands. Install WSL First open Powershell as administrator and launch the following command : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart This command will install WSL on your computer. After this, you'll need to reboot . Install your Linux distribution After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : wsl.exe --list --running Now you should see the name of your distribution in the list. Setup your distribution Start updating the packages list by typing : sudo apt update Install nodejs using the apt package manager sudo apt install To verify the Installation execute the following command : nodejs --version To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : sudo apt install npm To verify the npm Install check using the command : npm --version To Downlaod and Setup Yarn sudo apt install yarn To check the Installed version of Yarn : yarn --version Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands : sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc Now you should be at least in version ^1.22 and ready to go on. Configuration of MobaXterm First open a new session and connect to the distant host 192.168.62.31 . Don't forget to add the path to the private key in the advanced SSH settings. Deploy Ecolyo Deploy on Alpha - Scaleway Windows First open your Ubuntu terminal, and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : yarn build After this, you can launch the deployment. In order to deploy on ecolyo-dev-build (development environment) use the command : yarn deploy-dev If you want to deploy on the ecolyo-build environment, use : yarn deploy To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm. Linux From your current branch, run yarn build then sudo yarn deploy_dev to instantly deploy your working branch on the latest tagged Ecolyo-dev container registry.","title":"Deploy"},{"location":"ecolyo/application/deploy/#setup","text":"First of all you'll need to install MobaXterm in order to connect to the server. Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands.","title":"Setup"},{"location":"ecolyo/application/deploy/#install-wsl","text":"First open Powershell as administrator and launch the following command : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart This command will install WSL on your computer. After this, you'll need to reboot .","title":"Install WSL"},{"location":"ecolyo/application/deploy/#install-your-linux-distribution","text":"After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : wsl.exe --list --running Now you should see the name of your distribution in the list.","title":"Install your Linux distribution"},{"location":"ecolyo/application/deploy/#setup-your-distribution","text":"Start updating the packages list by typing : sudo apt update Install nodejs using the apt package manager sudo apt install To verify the Installation execute the following command : nodejs --version To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : sudo apt install npm To verify the npm Install check using the command : npm --version To Downlaod and Setup Yarn sudo apt install yarn To check the Installed version of Yarn : yarn --version Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands : sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc Now you should be at least in version ^1.22 and ready to go on.","title":"Setup your distribution"},{"location":"ecolyo/application/deploy/#configuration-of-mobaxterm","text":"First open a new session and connect to the distant host 192.168.62.31 . Don't forget to add the path to the private key in the advanced SSH settings.","title":"Configuration of MobaXterm"},{"location":"ecolyo/application/deploy/#deploy-ecolyo","text":"","title":"Deploy Ecolyo"},{"location":"ecolyo/application/deploy/#deploy-on-alpha-scaleway","text":"","title":"Deploy on Alpha - Scaleway"},{"location":"ecolyo/application/deploy/#windows","text":"First open your Ubuntu terminal, and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : yarn build After this, you can launch the deployment. In order to deploy on ecolyo-dev-build (development environment) use the command : yarn deploy-dev If you want to deploy on the ecolyo-build environment, use : yarn deploy To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm.","title":"Windows"},{"location":"ecolyo/application/deploy/#linux","text":"From your current branch, run yarn build then sudo yarn deploy_dev to instantly deploy your working branch on the latest tagged Ecolyo-dev container registry.","title":"Linux"},{"location":"ecolyo/application/description/","text":"Ecolyo is a Cozy application that allows users to connect their energy accounts such as EGL , ENEDIS and GRDF , using cozy konnectors","title":"Description"},{"location":"ecolyo/application/gitflow/","text":"Initialize Create a new projet in gitlab and take note of its url Protecting Master Branch On the gitlab page of your project go to Settings/Repository in the Protected Branches section. Select the Master branch and set allow to merge to Master and allow to push to No one This will prevent anyone to push on the master branch, the only way to add code to the branch will be using merge requests. Setting Development Branch Retrieve the project on your computer, open a command line and execute. git clone https://forge.grandlyon.com/web-et-numerique/llle.git Create the development branch git checkout -b dev Init your project and then type any time you want to commit changes: git add . git commit -m \"Commit changes\" git push origin dev Start Developing For any other development you should create a branch from the development branch. First make sure to be on the dev branch, type: git branch to see your current branch Conventional Commits The commit contains the following structural types : fix feature In our team organisation we are using IceScrum to keep track of our User Stories (US). Each US is identified by a number. In order to easily identify the commit that refers to the US, a feature branch name should follow this structure: features/<number of the User Story>-<title_of_the_user_story> You can create the branch by typing: git checkout -b features/<number of the User Story>-<title_of_the_user_story> Note that the feature type is the only one with a dedicated folder (features/-US). Each fix branch should be named as the following fix-\\<title_of_the_fix> . You can create the branch by typing: git checkout -b fix-<title_of_the_fix> Breaking Change Appends a ! before the title of the commit to notify that a breaking change has happened. Give a solid description of the changes as well. Types other than fix and feature are allowed, for example build , chore , ci , docs , style , refactor , perf , test and others. add tag git tag -a 1.0.0 -m \"complementary message\" Gitflow Scheme","title":"Gitflow"},{"location":"ecolyo/application/gitflow/#initialize","text":"Create a new projet in gitlab and take note of its url","title":"Initialize"},{"location":"ecolyo/application/gitflow/#protecting-master-branch","text":"On the gitlab page of your project go to Settings/Repository in the Protected Branches section. Select the Master branch and set allow to merge to Master and allow to push to No one This will prevent anyone to push on the master branch, the only way to add code to the branch will be using merge requests.","title":"Protecting Master Branch"},{"location":"ecolyo/application/gitflow/#setting-development-branch","text":"Retrieve the project on your computer, open a command line and execute. git clone https://forge.grandlyon.com/web-et-numerique/llle.git Create the development branch git checkout -b dev Init your project and then type any time you want to commit changes: git add . git commit -m \"Commit changes\" git push origin dev","title":"Setting Development Branch"},{"location":"ecolyo/application/gitflow/#start-developing","text":"For any other development you should create a branch from the development branch. First make sure to be on the dev branch, type: git branch to see your current branch","title":"Start Developing"},{"location":"ecolyo/application/gitflow/#conventional-commits","text":"The commit contains the following structural types : fix feature In our team organisation we are using IceScrum to keep track of our User Stories (US). Each US is identified by a number. In order to easily identify the commit that refers to the US, a feature branch name should follow this structure: features/<number of the User Story>-<title_of_the_user_story> You can create the branch by typing: git checkout -b features/<number of the User Story>-<title_of_the_user_story> Note that the feature type is the only one with a dedicated folder (features/-US). Each fix branch should be named as the following fix-\\<title_of_the_fix> . You can create the branch by typing: git checkout -b fix-<title_of_the_fix> Breaking Change Appends a ! before the title of the commit to notify that a breaking change has happened. Give a solid description of the changes as well. Types other than fix and feature are allowed, for example build , chore , ci , docs , style , refactor , perf , test and others. add tag git tag -a 1.0.0 -m \"complementary message\"","title":"Conventional Commits"},{"location":"ecolyo/application/gitflow/#gitflow-scheme","text":"","title":"Gitflow Scheme"},{"location":"ecolyo/application/scaffolding/","text":"In this section, you will find information about the project file structure and the purpose of the main folders. Source Files Folder/File Purpose assets The application's assets, contains fonts, svg and png files components The application's components. components/CommonKit In this folder you'll find global components such as Buttons, Cards, Icons, etc... Many of these components are overrided material-ui components components/Hooks This folder contains the hooks of the application components/App.tsx The root component, it calls the Routes component constants This folder contains constants files such as config.json for the konnectors fluid config, connexionWaitingText.json for the sentences displayed while fetching fluid data, and a folder consumptionConstants that contains json files with constants for consumption calculation and comparison db In this folder, you'll find JSON data used for challenges, ecogestures, and the FAQ. doctypes This folder contains the cozy doctypes, you can see more on Cozy Documentation enum This folder contains all enums like Fluid types, Screen types, and Timesteps. locales This folder contains JSON data used by the translation system i18n provided by Cozy-ui models This folder contains all models services This folder contains all the services store This folder contains all actions and reducers classified by component styles The styles folder you'll find a base folder that contains our variables and a components folder that contains components styles targets utils In this folder you'll find utilitaries methods Configuration Files Folder/File Purpose .eslintrc.js Config file for ESLint gitlab-ci.yml Config file used for Gitlab continuous integration .prettierrc Config file for Prettier extension jest.config.js Config file used by Jest for testing the application manifest.webapp Manifest of the application, used by cozy for the managment of permissions, you can add permissions for doctypes there tsconfig.json Config file for TypeScript","title":"Scaffolding"},{"location":"ecolyo/application/scaffolding/#source-files","text":"Folder/File Purpose assets The application's assets, contains fonts, svg and png files components The application's components. components/CommonKit In this folder you'll find global components such as Buttons, Cards, Icons, etc... Many of these components are overrided material-ui components components/Hooks This folder contains the hooks of the application components/App.tsx The root component, it calls the Routes component constants This folder contains constants files such as config.json for the konnectors fluid config, connexionWaitingText.json for the sentences displayed while fetching fluid data, and a folder consumptionConstants that contains json files with constants for consumption calculation and comparison db In this folder, you'll find JSON data used for challenges, ecogestures, and the FAQ. doctypes This folder contains the cozy doctypes, you can see more on Cozy Documentation enum This folder contains all enums like Fluid types, Screen types, and Timesteps. locales This folder contains JSON data used by the translation system i18n provided by Cozy-ui models This folder contains all models services This folder contains all the services store This folder contains all actions and reducers classified by component styles The styles folder you'll find a base folder that contains our variables and a components folder that contains components styles targets utils In this folder you'll find utilitaries methods","title":"Source Files"},{"location":"ecolyo/application/scaffolding/#configuration-files","text":"Folder/File Purpose .eslintrc.js Config file for ESLint gitlab-ci.yml Config file used for Gitlab continuous integration .prettierrc Config file for Prettier extension jest.config.js Config file used by Jest for testing the application manifest.webapp Manifest of the application, used by cozy for the managment of permissions, you can add permissions for doctypes there tsconfig.json Config file for TypeScript","title":"Configuration Files"},{"location":"ecolyo/application/services/","text":"Cron Services In order to build an automated task within our cozy-stack, we can create services which are javascript files called from a trigger job. For instance on Ecolyo, to schedule a mail that alert the user a new monthly report is available in the application, we add a trigger that is launched every month with a cron attribute. On that trigger we link a .js script then we instanciate this script with cozy-client. Manifest config example File location is determined after the build, see here . Cron See the cron definition at cozy-stack . Ecolyo services Located under src\\targets\\services Monthly report notification Definition of the service The service will run the 3rd of each month at 10.00 am, as defined in the manifest: \"monthlyReportNotification\": { \"type\": \"node\", \"file\": \"services/monthlyReportNotification/ecolyo.js\", \"trigger\": \"@cron 0 0 10 3 * *\" } Main responsabilities of the service The service is reponsible of sending a mail to user to warn him about the availability of a new information in the Analyse. Main steps are the following: - Check the \"sendReportNotification\" attribute in the com.grandlyon.ecolyo.profile doctype. If true, service will continue, else it will stop. - Fetches metadata to customize the mail (Public name, instance url). - Build the mail. - Send the mail. Sending mail Doc of cozy for sendmail worker: https://docs.cozy.io/en/cozy-stack/workers/#sendmail-worker Send In local you can use the mail hog tools to see the mail sent by the stack using http://cozy.tools:8025/","title":"Services"},{"location":"ecolyo/application/services/#cron-services","text":"In order to build an automated task within our cozy-stack, we can create services which are javascript files called from a trigger job. For instance on Ecolyo, to schedule a mail that alert the user a new monthly report is available in the application, we add a trigger that is launched every month with a cron attribute. On that trigger we link a .js script then we instanciate this script with cozy-client.","title":"Cron Services"},{"location":"ecolyo/application/services/#manifest-config-example","text":"File location is determined after the build, see here . Cron See the cron definition at cozy-stack .","title":"Manifest config example"},{"location":"ecolyo/application/services/#ecolyo-services","text":"Located under src\\targets\\services","title":"Ecolyo services"},{"location":"ecolyo/application/services/#monthly-report-notification","text":"","title":"Monthly report notification"},{"location":"ecolyo/application/services/#definition-of-the-service","text":"The service will run the 3rd of each month at 10.00 am, as defined in the manifest: \"monthlyReportNotification\": { \"type\": \"node\", \"file\": \"services/monthlyReportNotification/ecolyo.js\", \"trigger\": \"@cron 0 0 10 3 * *\" }","title":"Definition of the service"},{"location":"ecolyo/application/services/#main-responsabilities-of-the-service","text":"The service is reponsible of sending a mail to user to warn him about the availability of a new information in the Analyse. Main steps are the following: - Check the \"sendReportNotification\" attribute in the com.grandlyon.ecolyo.profile doctype. If true, service will continue, else it will stop. - Fetches metadata to customize the mail (Public name, instance url). - Build the mail. - Send the mail.","title":"Main responsabilities of the service"},{"location":"ecolyo/application/services/#sending-mail","text":"Doc of cozy for sendmail worker: https://docs.cozy.io/en/cozy-stack/workers/#sendmail-worker Send In local you can use the mail hog tools to see the mail sent by the stack using http://cozy.tools:8025/","title":"Sending mail"},{"location":"ecolyo/functionalities/challenge/","text":"This section explain all the functionnalities in the challenge part Quiz A quiz includes 4 basic questions and one custom question. Basic Question All basics Questions are created in the quizEntity.json. We have to add : questionLabel => Label of the question Answers => An array of three answers (answerLabel, isTrue) description => Explain the question source => Source of the explanation This questions and answers are in random order. In the question page the user have to select an answer and click validate. Then, he sees the right answer and a modal with the explanation and the source. After this modal, he goes to the next question. Depends on the answer, the question result state is set either correct or incorrect. If it is a right answer, the quiz result is incremented by one. Custom Question At the end of every quiz, we're creating a custom question. Here are the fields used to create a custom question Field Type Description type CustomQuestionType Type of custom qusetion: DATA or CALCULATION. timeStep TimeStep Time step of the result value (DAY / WEEK / MONTH / YEAR). For CALCULATION type it's represent daily / weekly / monthly / yearly average. interval TimeStep Interval in which the data will be searched (DAY / WEEK / MONTH / YEAR) period CustomPeriod Use to define a specific period for the interval result UserQuizState Indicate the state of the custom question (UNLOCKED, CORRECT, UNCORRECT) Calculation of custom question is done by conbinaison of all parameters: Type DATA If period is empty. Retrieve the max load of day/month/year (define by timeStep ) from the last week, month, year (define by interval ). => example: What day did I consumme the most on the last week ? type = CustomQuestionType.DATA timeStep = TimeStep.DAY interval = TimeStep.WEEK period = {} If period is not empty Retrieve the max load of day/month/year (define by timeStep ) from week, month, year (define by interval ) of period => example: What month did I consumme the most on year 2020 ? type = CustomQuestionType.DATA timeStep = TimeStep.MONTH interval = TimeStep.YEAR period = {year: 2020} Type CALCULATION If period is empty Retrieve the average of day/month/year (define by timeStep ) from the last week, month, year (define by interval ). => example: Which is your daily average consumption on last week ? type = CustomQuestionType.CALCULATION timeStep = TimeStep.DAY interval = TimeStep.WEEK period = {} If period is not empty Retrieve the average of day/month/year (define by timeStep ) from week, month, year (define by interval ) of period => example: Which is your daily average consumption on january ? type = CustomQuestionType.DATA timeStep = TimeStep.DAY interval = TimeStep.MONTH period = {month: 1} Then, two randoms answers are generated after defining the right answer. A user can stop during a quiz and picks up where he left off. To define where the user left off, we have to check if at least one of the question result status is unlocked. Once the custom question is answered, the quiz state is set to done. Then, the user sees his result and his earned stars. He can also retry or go back to the challenge page. Exploration Exploration is a feature where the user has to do an action in order to help him discover all features from ecolyo. They are 4 types of actions: DECLARATIVE : The user has to do something outside of the app => No way for the app to know if the user did it so we trust him. ACTION : Action whitin the app. When the user finishes he gets a notification. CONSUMPTION : He has to do something in his consumption view. ECOGESTURE : He needs to look at a specific Ecogesture. In order to check if an exploration (which is not declarative) is done, a hook called useExploration is used.It is called on component that has to check if an exploration is done. This hook called exploration service to check exploration by passing two parameters (the current challenge and the user exploration id associated with the exploration id of the current challenge). This check is done only if: There is a current challenge exploration.id of the current challenge is equal to the user exploration id exploration.state is ONGOING Depends on the type of an exploration, either the exploration remains in progress until it is fully done or it ends. When the user finish the exploration, he gets a success message and five more stars are added to his challenge progression. Duel On launch In order to find a valid reference period we search for a period which is defined by the duel duration. We check the most recent period first if it's complete and then we go farther and farther in time if the ones before got missing values. We also define a threshold for a maximum old period 6 months for the moment - hardcoded. If the thresold is reached and no valid period was found, we alert the user that he can't launch the duel and have to wait before he can retry this process. On going Every time the user goes into the duel mode, we are checking if the duel is finished. if we have retrieved all data to calculate the user consumption on the duel duration, the duel is done. In order to not block the user if a value is mising, we are also setting the duel as done when we reach the startDate + delay in day to retrieve the data (based on the fluid) + 1 day. In this case the user consumption is done on known values. On finish Once the state of the duel is set to DONE, we save the user result and determine if he wins (userComsumption < threshold of the reference period) or if he loses. Then the user sees his earned badge. Challenges We can find the file challengeEntity.json in the /db folder. This file contains an array of challenges, and each of them includes relationships to duels, quiz, missions and actions. UserData creation Once a user launch a challenge in the Ecolyo app, we create a userChallenge and store it in the couchDB under the doctype ' com.grandlyon.ecolyo.userchallenge'. During this process, the objects related to the challenge (quiz, duel, mission, action) will be be converted to an user version which contains informations about the user progress, the fluids connected and so on. So we have now a userChallenge that contains a userQuiz, a userDuel, etc. instead of relations. To illustrate this, let's show the conversion of quizEntity to userQuiz : DuelEntity { id: string title: string description: string duration: Duration } Becomes : UserQuiz { id: string title: string description: string duration: Duration threshold: number state: UserDuelState startDate: string | null fluidTypes: FluidType[] userConsumption: number } Data managment schema","title":"Challenge"},{"location":"ecolyo/functionalities/challenge/#quiz","text":"A quiz includes 4 basic questions and one custom question.","title":"Quiz"},{"location":"ecolyo/functionalities/challenge/#basic-question","text":"All basics Questions are created in the quizEntity.json. We have to add : questionLabel => Label of the question Answers => An array of three answers (answerLabel, isTrue) description => Explain the question source => Source of the explanation This questions and answers are in random order. In the question page the user have to select an answer and click validate. Then, he sees the right answer and a modal with the explanation and the source. After this modal, he goes to the next question. Depends on the answer, the question result state is set either correct or incorrect. If it is a right answer, the quiz result is incremented by one.","title":"Basic Question"},{"location":"ecolyo/functionalities/challenge/#custom-question","text":"At the end of every quiz, we're creating a custom question. Here are the fields used to create a custom question Field Type Description type CustomQuestionType Type of custom qusetion: DATA or CALCULATION. timeStep TimeStep Time step of the result value (DAY / WEEK / MONTH / YEAR). For CALCULATION type it's represent daily / weekly / monthly / yearly average. interval TimeStep Interval in which the data will be searched (DAY / WEEK / MONTH / YEAR) period CustomPeriod Use to define a specific period for the interval result UserQuizState Indicate the state of the custom question (UNLOCKED, CORRECT, UNCORRECT) Calculation of custom question is done by conbinaison of all parameters:","title":"Custom Question"},{"location":"ecolyo/functionalities/challenge/#type-data","text":"If period is empty. Retrieve the max load of day/month/year (define by timeStep ) from the last week, month, year (define by interval ). => example: What day did I consumme the most on the last week ? type = CustomQuestionType.DATA timeStep = TimeStep.DAY interval = TimeStep.WEEK period = {} If period is not empty Retrieve the max load of day/month/year (define by timeStep ) from week, month, year (define by interval ) of period => example: What month did I consumme the most on year 2020 ? type = CustomQuestionType.DATA timeStep = TimeStep.MONTH interval = TimeStep.YEAR period = {year: 2020}","title":"Type DATA"},{"location":"ecolyo/functionalities/challenge/#type-calculation","text":"If period is empty Retrieve the average of day/month/year (define by timeStep ) from the last week, month, year (define by interval ). => example: Which is your daily average consumption on last week ? type = CustomQuestionType.CALCULATION timeStep = TimeStep.DAY interval = TimeStep.WEEK period = {} If period is not empty Retrieve the average of day/month/year (define by timeStep ) from week, month, year (define by interval ) of period => example: Which is your daily average consumption on january ? type = CustomQuestionType.DATA timeStep = TimeStep.DAY interval = TimeStep.MONTH period = {month: 1} Then, two randoms answers are generated after defining the right answer. A user can stop during a quiz and picks up where he left off. To define where the user left off, we have to check if at least one of the question result status is unlocked. Once the custom question is answered, the quiz state is set to done. Then, the user sees his result and his earned stars. He can also retry or go back to the challenge page.","title":"Type CALCULATION"},{"location":"ecolyo/functionalities/challenge/#exploration","text":"Exploration is a feature where the user has to do an action in order to help him discover all features from ecolyo. They are 4 types of actions: DECLARATIVE : The user has to do something outside of the app => No way for the app to know if the user did it so we trust him. ACTION : Action whitin the app. When the user finishes he gets a notification. CONSUMPTION : He has to do something in his consumption view. ECOGESTURE : He needs to look at a specific Ecogesture. In order to check if an exploration (which is not declarative) is done, a hook called useExploration is used.It is called on component that has to check if an exploration is done. This hook called exploration service to check exploration by passing two parameters (the current challenge and the user exploration id associated with the exploration id of the current challenge). This check is done only if: There is a current challenge exploration.id of the current challenge is equal to the user exploration id exploration.state is ONGOING Depends on the type of an exploration, either the exploration remains in progress until it is fully done or it ends. When the user finish the exploration, he gets a success message and five more stars are added to his challenge progression.","title":"Exploration"},{"location":"ecolyo/functionalities/challenge/#duel","text":"","title":"Duel"},{"location":"ecolyo/functionalities/challenge/#on-launch","text":"In order to find a valid reference period we search for a period which is defined by the duel duration. We check the most recent period first if it's complete and then we go farther and farther in time if the ones before got missing values. We also define a threshold for a maximum old period 6 months for the moment - hardcoded. If the thresold is reached and no valid period was found, we alert the user that he can't launch the duel and have to wait before he can retry this process.","title":"On launch"},{"location":"ecolyo/functionalities/challenge/#on-going","text":"Every time the user goes into the duel mode, we are checking if the duel is finished. if we have retrieved all data to calculate the user consumption on the duel duration, the duel is done. In order to not block the user if a value is mising, we are also setting the duel as done when we reach the startDate + delay in day to retrieve the data (based on the fluid) + 1 day. In this case the user consumption is done on known values.","title":"On going"},{"location":"ecolyo/functionalities/challenge/#on-finish","text":"Once the state of the duel is set to DONE, we save the user result and determine if he wins (userComsumption < threshold of the reference period) or if he loses. Then the user sees his earned badge.","title":"On finish"},{"location":"ecolyo/functionalities/challenge/#challenges","text":"We can find the file challengeEntity.json in the /db folder. This file contains an array of challenges, and each of them includes relationships to duels, quiz, missions and actions.","title":"Challenges"},{"location":"ecolyo/functionalities/challenge/#userdata-creation","text":"Once a user launch a challenge in the Ecolyo app, we create a userChallenge and store it in the couchDB under the doctype ' com.grandlyon.ecolyo.userchallenge'. During this process, the objects related to the challenge (quiz, duel, mission, action) will be be converted to an user version which contains informations about the user progress, the fluids connected and so on. So we have now a userChallenge that contains a userQuiz, a userDuel, etc. instead of relations. To illustrate this, let's show the conversion of quizEntity to userQuiz : DuelEntity { id: string title: string description: string duration: Duration } Becomes : UserQuiz { id: string title: string description: string duration: Duration threshold: number state: UserDuelState startDate: string | null fluidTypes: FluidType[] userConsumption: number }","title":"UserData creation"},{"location":"ecolyo/functionalities/challenge/#data-managment-schema","text":"","title":"Data managment schema"},{"location":"ecolyo/functionalities/consumption/","text":"Description Ecolyo allow user to see its consumption in two way: - with an aggregated view aka HomeView - with a specific view for a fluid aka SingleFluidView Modal old fluid data In order to warn a user that its data is too old regarding a fluid, a modal is displayed when the last date of a fluid is greater than 5 days. Depending of the konnector status the user will receive 2 differents messages: if the konnector is in error, the user will be invited to check the konnector if the konnector has run successfully but hasn't retrieved data from the last 5 days, the user will be invited to contact the supplier Comparison The user can compare its data with a previous period using a switch which will display the previous period on the same chart. This feature is only available on single fluid charts and is not available at the year time step Time step Different time steps can be selected by the user which will display different period on the graph according to the time step. Day: display data at half-an-hour step on a period of one day Week: display data at daily step on a period of a week Month: display data at daily step on a period of a month Year: display data at monthly step on a period of a year 5 years: display data at yearly step on a period of 5 years (5 last years)","title":"Consumption"},{"location":"ecolyo/functionalities/consumption/#description","text":"Ecolyo allow user to see its consumption in two way: - with an aggregated view aka HomeView - with a specific view for a fluid aka SingleFluidView","title":"Description"},{"location":"ecolyo/functionalities/consumption/#modal-old-fluid-data","text":"In order to warn a user that its data is too old regarding a fluid, a modal is displayed when the last date of a fluid is greater than 5 days. Depending of the konnector status the user will receive 2 differents messages: if the konnector is in error, the user will be invited to check the konnector if the konnector has run successfully but hasn't retrieved data from the last 5 days, the user will be invited to contact the supplier","title":"Modal old fluid data"},{"location":"ecolyo/functionalities/consumption/#comparison","text":"The user can compare its data with a previous period using a switch which will display the previous period on the same chart. This feature is only available on single fluid charts and is not available at the year time step","title":"Comparison"},{"location":"ecolyo/functionalities/consumption/#time-step","text":"Different time steps can be selected by the user which will display different period on the graph according to the time step. Day: display data at half-an-hour step on a period of one day Week: display data at daily step on a period of a week Month: display data at daily step on a period of a month Year: display data at monthly step on a period of a year 5 years: display data at yearly step on a period of 5 years (5 last years)","title":"Time step"},{"location":"ecolyo/functionalities/ecogesture/","text":"Ecogesture All ecogestures screen This screen display the full list of ecogestures. User can filter ecogesture by usage. Ecogestures filtered by profile This screen display is based on a filtered ecogesture list that fit to the user profile type. The user can also filter ecogesture by usage. Following rules are used to filter the ecogesture: Case ecogesture usage is heating We will display the ecogesture if: the ecogesture has electricity fluid and profile type has an individual heating which use electricity fluid. OR the ecogesture has gas fluid and profile type has an individual heating which use gas fluid. Case ecogesture usage is ECS ECS = Eau chaude sanitaire We will display the ecogesture if: - the ecogesture has electricity fluid and profile type has an individual hot water which use electricity fluid. OR - the ecogesture has gas fluid and profile type has an individual hot water which use gas fluid. Case ecogesture usage is ECS We will display the ecogesture if: the ecogesture has electricity fluid and profile type has an electricity fluid for cooking. OR the ecogesture has gas fluid and profile type has an gas fluid for cooking. Case ecogesture usage is cold water We will display the ecogesture if the profile type has individual cold water. Case ecogesture usage is specific electricity We will display the ecogesture. Case ecogesture usage is air conditioning We will NOT display the ecogesture.","title":"Ecogesture"},{"location":"ecolyo/functionalities/ecogesture/#ecogesture","text":"","title":"Ecogesture"},{"location":"ecolyo/functionalities/ecogesture/#all-ecogestures-screen","text":"This screen display the full list of ecogestures. User can filter ecogesture by usage.","title":"All ecogestures screen"},{"location":"ecolyo/functionalities/ecogesture/#ecogestures-filtered-by-profile","text":"This screen display is based on a filtered ecogesture list that fit to the user profile type. The user can also filter ecogesture by usage. Following rules are used to filter the ecogesture:","title":"Ecogestures filtered by profile"},{"location":"ecolyo/functionalities/ecogesture/#case-ecogesture-usage-is-heating","text":"We will display the ecogesture if: the ecogesture has electricity fluid and profile type has an individual heating which use electricity fluid. OR the ecogesture has gas fluid and profile type has an individual heating which use gas fluid.","title":"Case ecogesture usage is heating"},{"location":"ecolyo/functionalities/ecogesture/#case-ecogesture-usage-is-ecs","text":"ECS = Eau chaude sanitaire We will display the ecogesture if: - the ecogesture has electricity fluid and profile type has an individual hot water which use electricity fluid. OR - the ecogesture has gas fluid and profile type has an individual hot water which use gas fluid.","title":"Case ecogesture usage is ECS"},{"location":"ecolyo/functionalities/ecogesture/#case-ecogesture-usage-is-ecs_1","text":"We will display the ecogesture if: the ecogesture has electricity fluid and profile type has an electricity fluid for cooking. OR the ecogesture has gas fluid and profile type has an gas fluid for cooking.","title":"Case ecogesture usage is ECS"},{"location":"ecolyo/functionalities/ecogesture/#case-ecogesture-usage-is-cold-water","text":"We will display the ecogesture if the profile type has individual cold water.","title":"Case ecogesture usage is cold water"},{"location":"ecolyo/functionalities/ecogesture/#case-ecogesture-usage-is-specific-electricity","text":"We will display the ecogesture.","title":"Case ecogesture usage is specific electricity"},{"location":"ecolyo/functionalities/ecogesture/#case-ecogesture-usage-is-air-conditioning","text":"We will NOT display the ecogesture.","title":"Case ecogesture usage is air conditioning"},{"location":"ecolyo/functionalities/initialization/","text":"This section explains how to handle data storage. We handle data storage according to the following process : The folder /src/db contains all the JSON entities that are directly stored in the couchDB during the initialization process that is executed in the splash screen. They are stored under their related doctype. Initialization and Updating During the initialization process, we store a hash for each dataEntity that is likely to be changed or updated. The hash is stored in the userProfile. [ { \"ecogestureHash\": \"\", \"challengeHash\": \"\", \"duelHash\": \"\", \"isFirstConnection\": true, \"haveSeenFavoriteModal\": false, \"haveSeenOldFluidModal\": false, \"haveSeenLastReport\": true, \"sendReportNotification\": false, \"monthlyReportDate\": \"0000-01-01T00:00:00.000Z\" } ] This way, once the initialization is launched, we compare the hash we have in the current userProfile with the one generated from the entity located in /db folder, and if they are different we update the couchDB with the new data. dataEntity vs userData In the project, you'll see two versions for the same data. The dataEntity (quizEntity, challengeEntity, ...) is the data stored in the db folder and in the couchDB. These data are only edited in the couchDB when we update a challenge/quiz/duel or add a new one. The userData (userChallenge, userQuiz...) is created from the entity and extended with user's data, such as his progress, his consumption data, goals, fails etc. Using this 2 structures allows us to keep user's datas when we'll update the application, by editing just the entities. Relationships Relationships is a functionality made by cozy, they are built with the name of the relation, containing a \"data\" object, itself containing the id of the related item and its doctype \"_type\". Using this allows us to reduce the size of the stored items and increase readability. You can see more on cozy documentation . \"relationships\": { \"quiz\": { \"data\": { \"_id\": \"QUIZ001\", \"_type\": \"com.grandlyon.ecolyo.quiz\" } }, \"duel\": { \"data\": { \"_id\": \"DUEL001\", \"_type\": \"com.grandlyon.ecolyo.duel\" } } } UserData creation We create a userData and store it in the couchDB under the doctype userData name ' com.grandlyon.ecolyo.userDataName'. During this process, the objects related to the dataEntity will be be converted to an user version which contains informations about the user(example: user progress, the fluids connected and so on). To illustrate this, let's show an example of the conversion of quizEntity to userQuiz : DuelEntity { id: string title: string description: string duration: Duration } Becomes : UserQuiz { id: string title: string description: string duration: Duration threshold: number state: UserDuelState startDate: string | null fluidTypes: FluidType[] userConsumption: number }","title":"Initialization"},{"location":"ecolyo/functionalities/initialization/#initialization-and-updating","text":"During the initialization process, we store a hash for each dataEntity that is likely to be changed or updated. The hash is stored in the userProfile. [ { \"ecogestureHash\": \"\", \"challengeHash\": \"\", \"duelHash\": \"\", \"isFirstConnection\": true, \"haveSeenFavoriteModal\": false, \"haveSeenOldFluidModal\": false, \"haveSeenLastReport\": true, \"sendReportNotification\": false, \"monthlyReportDate\": \"0000-01-01T00:00:00.000Z\" } ] This way, once the initialization is launched, we compare the hash we have in the current userProfile with the one generated from the entity located in /db folder, and if they are different we update the couchDB with the new data.","title":"Initialization and Updating"},{"location":"ecolyo/functionalities/initialization/#dataentity-vs-userdata","text":"In the project, you'll see two versions for the same data. The dataEntity (quizEntity, challengeEntity, ...) is the data stored in the db folder and in the couchDB. These data are only edited in the couchDB when we update a challenge/quiz/duel or add a new one. The userData (userChallenge, userQuiz...) is created from the entity and extended with user's data, such as his progress, his consumption data, goals, fails etc. Using this 2 structures allows us to keep user's datas when we'll update the application, by editing just the entities.","title":"dataEntity vs userData"},{"location":"ecolyo/functionalities/initialization/#relationships","text":"Relationships is a functionality made by cozy, they are built with the name of the relation, containing a \"data\" object, itself containing the id of the related item and its doctype \"_type\". Using this allows us to reduce the size of the stored items and increase readability. You can see more on cozy documentation . \"relationships\": { \"quiz\": { \"data\": { \"_id\": \"QUIZ001\", \"_type\": \"com.grandlyon.ecolyo.quiz\" } }, \"duel\": { \"data\": { \"_id\": \"DUEL001\", \"_type\": \"com.grandlyon.ecolyo.duel\" } } }","title":"Relationships"},{"location":"ecolyo/functionalities/initialization/#userdata-creation","text":"We create a userData and store it in the couchDB under the doctype userData name ' com.grandlyon.ecolyo.userDataName'. During this process, the objects related to the dataEntity will be be converted to an user version which contains informations about the user(example: user progress, the fluids connected and so on). To illustrate this, let's show an example of the conversion of quizEntity to userQuiz : DuelEntity { id: string title: string description: string duration: Duration } Becomes : UserQuiz { id: string title: string description: string duration: Duration threshold: number state: UserDuelState startDate: string | null fluidTypes: FluidType[] userConsumption: number }","title":"UserData creation"},{"location":"ecolyo/functionalities/profile_type/","text":"This section explains the profileType creation process in order to make different comparisons between the actual user's consumtion and its profile type. Profile type data The profileType data are stored in the profile doctype and includes the following informations : { housingType: HousingType constructionYear: ConstructionYear area: number occupantsNumber: number outsideFacingWalls: OutsideFacingWalls floor: Floor heating: IndividualOrCollective hotWater: IndividualOrCollective coldWater: IndividualOrCollective individualInsulationWork: IndividualInsulationWork facilitiesInstallation: FacilitiesInstallation hotWaterEquipment: HotWaterEquipment[] warmingFluid: FluidType | null hotWaterFluid: FluidType | null cookingFluid: FluidType } Each profileType value is an enum that you can find in the application. The values are set by default to a default profileType and needs to be completed by the user in order to become accurate. Profile type form User should answer a form to be able to set its profile type. Here is the flow of questions: Profile type methods Here you can see the different methods provided by the profileType service. These methods allows to calculate the average consumption depending on the information gathered in user's profileType. Method Description getMonthlyForecast(month: number) : MonthlyForecast Used to get the monthly forecast for a given month getFluidForecast(fluidType: FluidType, month: number) : FluidForecast Used to get the monthly forecast for a given FluidType getDetailsMonthlyForecast(fluidType: FluidType, month: number): DetailsMonthlyForecast Used to get the details of a fluidForecast. For each fluid return the related consumptions. getMonthColdWaterConsumption(month: number): number Returns the cold water consumption in L for a given month getMonthElectricSpecificConsumption(month: number): number Returns the electric specific consumption in kWh for a given month getMonthCookingConsumption(month: number): number Returns the cooking consumption in kWh for a given month getMonthEcs(month: number) : number Returns the hot water consumption in kWh for a given month getMonthHeating(month: number): number Returns the heating consumption in kWh for a given month calculateTotalConsumption(spreadConsumption: number, profileType: ProfileType, month: number) : number Returns the total ECS consumption with applyied corrections to the spreadConsumption depending on users facilities. calculateSpreadNeeds(profileType: ProfileType, month: number): number Calculate the water spread consumption calculateMonthWaterRawNeeds(profileType: ProfileType, month: number) : number Returns the raw water needs of a home calculateWarmingEstimatedConsumption(): number Calculates the estimated consumption of a home calculateWarmingCorrectedConsumption(estimatedConsumption: number): number Apply the different corrections to the estimated heating consumption calculateWarmingMonthConsumption(correctedConsumption: number, month: number): number Apply dju ratio to the corrected heating consumption Here is an example of a MonthlyForecast, which is the only function directly called by the analyzis component : { fluidForecast: [ { detailsMonthlyForecast: { coldWaterConsumption: null, cookingConsumption: null, ecsConsumption: null, electricSpecificConsumption: 266, heatingConsumption: 4074, }, fluidType: 0, load: 4340, value: 670.96, }, { detailsMonthlyForecast: { coldWaterConsumption: 14911, cookingConsumption: null, ecsConsumption: null, electricSpecificConsumption: null, heatingConsumption: null, }, fluidType: 1, load: 14911, value: 46.224, }, { detailsMonthlyForecast: { coldWaterConsumption: null, cookingConsumption: 85, ecsConsumption: 290, electricSpecificConsumption: null, heatingConsumption: null, }, fluidType: 2, load: 375, value: 29.737, }, ], month: 1, totalValue: 746.921, } In these data, the load is in kWh for gaz and electricity (fluidtype 0 and 2) and in L for water. Value and totalValue are given in euros. The different consumption are distributed to their corresponding fluidType according to the variables warmingFluid, hotWaterFluid, cookingFluid . For example, if the cookingFluid is gaz, then its value will be stored in the fluidType 2 and nulled in the others. Also, we consider that if the heating or the hotwater are collective, we don't calcute it because the user can never access his personnal consumption, so it doesn't takes place in the calculation.","title":"Profile Type"},{"location":"ecolyo/functionalities/profile_type/#profile-type-data","text":"The profileType data are stored in the profile doctype and includes the following informations : { housingType: HousingType constructionYear: ConstructionYear area: number occupantsNumber: number outsideFacingWalls: OutsideFacingWalls floor: Floor heating: IndividualOrCollective hotWater: IndividualOrCollective coldWater: IndividualOrCollective individualInsulationWork: IndividualInsulationWork facilitiesInstallation: FacilitiesInstallation hotWaterEquipment: HotWaterEquipment[] warmingFluid: FluidType | null hotWaterFluid: FluidType | null cookingFluid: FluidType } Each profileType value is an enum that you can find in the application. The values are set by default to a default profileType and needs to be completed by the user in order to become accurate.","title":"Profile type data"},{"location":"ecolyo/functionalities/profile_type/#profile-type-form","text":"User should answer a form to be able to set its profile type. Here is the flow of questions:","title":"Profile type form"},{"location":"ecolyo/functionalities/profile_type/#profile-type-methods","text":"Here you can see the different methods provided by the profileType service. These methods allows to calculate the average consumption depending on the information gathered in user's profileType. Method Description getMonthlyForecast(month: number) : MonthlyForecast Used to get the monthly forecast for a given month getFluidForecast(fluidType: FluidType, month: number) : FluidForecast Used to get the monthly forecast for a given FluidType getDetailsMonthlyForecast(fluidType: FluidType, month: number): DetailsMonthlyForecast Used to get the details of a fluidForecast. For each fluid return the related consumptions. getMonthColdWaterConsumption(month: number): number Returns the cold water consumption in L for a given month getMonthElectricSpecificConsumption(month: number): number Returns the electric specific consumption in kWh for a given month getMonthCookingConsumption(month: number): number Returns the cooking consumption in kWh for a given month getMonthEcs(month: number) : number Returns the hot water consumption in kWh for a given month getMonthHeating(month: number): number Returns the heating consumption in kWh for a given month calculateTotalConsumption(spreadConsumption: number, profileType: ProfileType, month: number) : number Returns the total ECS consumption with applyied corrections to the spreadConsumption depending on users facilities. calculateSpreadNeeds(profileType: ProfileType, month: number): number Calculate the water spread consumption calculateMonthWaterRawNeeds(profileType: ProfileType, month: number) : number Returns the raw water needs of a home calculateWarmingEstimatedConsumption(): number Calculates the estimated consumption of a home calculateWarmingCorrectedConsumption(estimatedConsumption: number): number Apply the different corrections to the estimated heating consumption calculateWarmingMonthConsumption(correctedConsumption: number, month: number): number Apply dju ratio to the corrected heating consumption Here is an example of a MonthlyForecast, which is the only function directly called by the analyzis component : { fluidForecast: [ { detailsMonthlyForecast: { coldWaterConsumption: null, cookingConsumption: null, ecsConsumption: null, electricSpecificConsumption: 266, heatingConsumption: 4074, }, fluidType: 0, load: 4340, value: 670.96, }, { detailsMonthlyForecast: { coldWaterConsumption: 14911, cookingConsumption: null, ecsConsumption: null, electricSpecificConsumption: null, heatingConsumption: null, }, fluidType: 1, load: 14911, value: 46.224, }, { detailsMonthlyForecast: { coldWaterConsumption: null, cookingConsumption: 85, ecsConsumption: 290, electricSpecificConsumption: null, heatingConsumption: null, }, fluidType: 2, load: 375, value: 29.737, }, ], month: 1, totalValue: 746.921, } In these data, the load is in kWh for gaz and electricity (fluidtype 0 and 2) and in L for water. Value and totalValue are given in euros. The different consumption are distributed to their corresponding fluidType according to the variables warmingFluid, hotWaterFluid, cookingFluid . For example, if the cookingFluid is gaz, then its value will be stored in the fluidType 2 and nulled in the others. Also, we consider that if the heating or the hotwater are collective, we don't calcute it because the user can never access his personnal consumption, so it doesn't takes place in the calculation.","title":"Profile type methods"},{"location":"ecolyo/getting_started/launch_local_application/","text":"This section will allow you to launch a proper local environment of the Ecolyo application Initialisation of the project Clone the project repository Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git User settings Open the project with VSCode and add the following code into .vscode/settings.json: { \"workbench.colorCustomizations\": { /* Put anything you like here */ }, \"editor.snippetSuggestions\": \"top\", \"editor.tabSize\": 2, \"editor.formatOnSave\": true, \"diffEditor.ignoreTrimWhitespace\": false, \"window.zoomLevel\": 0, \"gitlens.advanced.messages\": { \"suppressShowKeyBindingsNotice\": true }, \"breadcrumbs.enabled\": true, \"workbench.settings.editor\": \"json\", \"editor.tabSize\": 2, \"editor.formatOnSave\": true, \"editor.formatOnPaste\": true } If this file is not empty, you can simply add the follwing lines to it: \"gitlens.advanced.messages\": { \"suppressShowKeyBindingsNotice\": true }, \"breadcrumbs.enabled\": true, \"workbench.settings.editor\": \"json\", \"editor.formatOnSave\": true, \"diffEditor.ignoreTrimWhitespace\": false, \"window.zoomLevel\": 0, Installation of the project Installation of node modules To install required node module, open a terminal on the root folder of the projet and type the following command: yarn install Start Ecolyo application To start ecolyo application just launch the command: yarn start If the application starts successfully you should obtain the following message: App successfully compiled! Dev assets:http://localhost:8888 Once the application is started, run the easy-cozy stack with docker. Run easy-cozy dev stack The dev stack will contain the cozy-stack with some default applications and konnectors and allow you to run this stack locally. First login to the forge registry: docker login registry.forge.grandlyon.com You will need to enter for credentials. Next pull the last image of the dev stack: docker pull registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/cozy-env:latest On windows Launch the stack with the following command: yarn winstack A Powershell window will open. Wait until the success message: Everything is setup. Go to http://ecolyo.cozy.tools:8080/ To exit, press ^C Once successfull you can launch your local cozy with following url: Cozy local url Local database can also be consulted at the following url: Cozy local DB On Linux From the project folder, launch following command: yarn linuxstack Wait until the success message: Everything is setup. Go to http://ecolyo.cozy.tools:8080/ To exit, press ^C Once successfull you can launch your local cozy with following url Cozy local url and connect with the password ' cozy '. Local database can also be consulted at the following url: Cozy local DB Import moke data Requirement Your dev stack should be running to import the moke data First install ACH using yarn : yarn global add cozy-ach Next create the \"config.js\" file base on the \"config.template.js\" You can change the period of data generated by changing the following lines: const startingdate = DateTime.local() .plus({ days: -120 }) .startOf('day') const endingDate = DateTime.local() .plus({ days: -1 }) .startOf('day') Just replace -120 by the value needed Next launch the script createDayDataFiles.js available into the scripts folder cd scripts node createDayDataFiles.js Json files with data will be created into scripts/data folder. ACH script \"importData.bat\" will load the content of the file into your couchDB (database of your dev stack). Launch it using following commands: cd scripts ./importData.bat You'll be prompted for a cozysessid, you can get it in the web console ; in the application tab, look for the cookies and just copy the cozysessid value. A new browser windows will open and asking you approval to import data. Just click on Approve Finally your data is loaded in the Ecolyo Application ! Simulate konnectors connection Requirement Your dev stack should be running to import data needed to simulate konnectors connection When using local environment, konnectors are not able to connect. To simulate the connection you can use the script createConnection.js available in scripts folder. First update the authorization and cookie information from the \"config.js\" file (if not created just create it from the \"config.template.js\" file): const authorization = 'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' const cookie = 'cozysessid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' To obtain your own Bearer and cozysessid you need to have the application launched and display the web console (F12) in your navigator and select the Network tab. Just select one request and retrieve information for Request Header: Next launch the script : cd scripts node createConnection.js Your data is now loaded and you can refresh the application to see your konnector connected.","title":"Launch the application on local"},{"location":"ecolyo/getting_started/launch_local_application/#initialisation-of-the-project","text":"","title":"Initialisation of the project"},{"location":"ecolyo/getting_started/launch_local_application/#clone-the-project-repository","text":"Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git","title":"Clone the project repository"},{"location":"ecolyo/getting_started/launch_local_application/#user-settings","text":"Open the project with VSCode and add the following code into .vscode/settings.json: { \"workbench.colorCustomizations\": { /* Put anything you like here */ }, \"editor.snippetSuggestions\": \"top\", \"editor.tabSize\": 2, \"editor.formatOnSave\": true, \"diffEditor.ignoreTrimWhitespace\": false, \"window.zoomLevel\": 0, \"gitlens.advanced.messages\": { \"suppressShowKeyBindingsNotice\": true }, \"breadcrumbs.enabled\": true, \"workbench.settings.editor\": \"json\", \"editor.tabSize\": 2, \"editor.formatOnSave\": true, \"editor.formatOnPaste\": true } If this file is not empty, you can simply add the follwing lines to it: \"gitlens.advanced.messages\": { \"suppressShowKeyBindingsNotice\": true }, \"breadcrumbs.enabled\": true, \"workbench.settings.editor\": \"json\", \"editor.formatOnSave\": true, \"diffEditor.ignoreTrimWhitespace\": false, \"window.zoomLevel\": 0,","title":"User settings"},{"location":"ecolyo/getting_started/launch_local_application/#installation-of-the-project","text":"","title":"Installation of the project"},{"location":"ecolyo/getting_started/launch_local_application/#installation-of-node-modules","text":"To install required node module, open a terminal on the root folder of the projet and type the following command: yarn install","title":"Installation of node modules"},{"location":"ecolyo/getting_started/launch_local_application/#start-ecolyo-application","text":"To start ecolyo application just launch the command: yarn start If the application starts successfully you should obtain the following message: App successfully compiled! Dev assets:http://localhost:8888 Once the application is started, run the easy-cozy stack with docker.","title":"Start Ecolyo application"},{"location":"ecolyo/getting_started/launch_local_application/#run-easy-cozy-dev-stack","text":"The dev stack will contain the cozy-stack with some default applications and konnectors and allow you to run this stack locally. First login to the forge registry: docker login registry.forge.grandlyon.com You will need to enter for credentials. Next pull the last image of the dev stack: docker pull registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/cozy-env:latest","title":"Run easy-cozy dev stack"},{"location":"ecolyo/getting_started/launch_local_application/#on-windows","text":"Launch the stack with the following command: yarn winstack A Powershell window will open. Wait until the success message: Everything is setup. Go to http://ecolyo.cozy.tools:8080/ To exit, press ^C Once successfull you can launch your local cozy with following url: Cozy local url Local database can also be consulted at the following url: Cozy local DB","title":"On windows"},{"location":"ecolyo/getting_started/launch_local_application/#on-linux","text":"From the project folder, launch following command: yarn linuxstack Wait until the success message: Everything is setup. Go to http://ecolyo.cozy.tools:8080/ To exit, press ^C Once successfull you can launch your local cozy with following url Cozy local url and connect with the password ' cozy '. Local database can also be consulted at the following url: Cozy local DB","title":"On Linux"},{"location":"ecolyo/getting_started/launch_local_application/#import-moke-data","text":"Requirement Your dev stack should be running to import the moke data First install ACH using yarn : yarn global add cozy-ach Next create the \"config.js\" file base on the \"config.template.js\" You can change the period of data generated by changing the following lines: const startingdate = DateTime.local() .plus({ days: -120 }) .startOf('day') const endingDate = DateTime.local() .plus({ days: -1 }) .startOf('day') Just replace -120 by the value needed Next launch the script createDayDataFiles.js available into the scripts folder cd scripts node createDayDataFiles.js Json files with data will be created into scripts/data folder. ACH script \"importData.bat\" will load the content of the file into your couchDB (database of your dev stack). Launch it using following commands: cd scripts ./importData.bat You'll be prompted for a cozysessid, you can get it in the web console ; in the application tab, look for the cookies and just copy the cozysessid value. A new browser windows will open and asking you approval to import data. Just click on Approve Finally your data is loaded in the Ecolyo Application !","title":"Import moke data"},{"location":"ecolyo/getting_started/launch_local_application/#simulate-konnectors-connection","text":"Requirement Your dev stack should be running to import data needed to simulate konnectors connection When using local environment, konnectors are not able to connect. To simulate the connection you can use the script createConnection.js available in scripts folder. First update the authorization and cookie information from the \"config.js\" file (if not created just create it from the \"config.template.js\" file): const authorization = 'Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' const cookie = 'cozysessid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' To obtain your own Bearer and cozysessid you need to have the application launched and display the web console (F12) in your navigator and select the Network tab. Just select one request and retrieve information for Request Header: Next launch the script : cd scripts node createConnection.js Your data is now loaded and you can refresh the application to see your konnector connected.","title":"Simulate konnectors connection"},{"location":"ecolyo/getting_started/launch_local_konnector/","text":"Section under Construction","title":"Launch a konnector on local"},{"location":"ecolyo/getting_started/setup_your_environment/","text":"This section will allow you to install a proper local environment step by step for Ecolyo application using VSCode IDE. VSCode Install VSCode Installation for VSCode can be found here: Installation of VSCode . Extensions Installation of Extention is explained here: Installation of Extensions . Here are the list of important extensions to install: Prettier - Code formatter ES7 React/Redux/GraphQL/React-Native snippets GitLens - Git supercharged Markdown Preview Optional extensions: Bracket Pair Colorizer 2 CSS Peek Auto Rename Tag indent-rainbow TabOut Liveshare (pair programming extension) User settings User settings for Ecolyo are described in this section: LINK TO SECTION TO ADD Git The project is using GitLab, you will need to install Git to checkout the projet. Installation for Git can be found here: Installation of Git . Node For this project, Node version 14 is required.Download node-v14 . Node.js\u00ae is a JavaScript runtime built on Chrome's V8 JavaScript engine. Yarn Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is described with this package manager. Installation for yarn can be found here: Installation of Yarn . Docker Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code. Install Docker Installation of Docker can be found here: Installation of Docker . Install Docker-Compose Installation of Docker-Compose (according to your OS) is explained here: Installation of Docker-Compose .","title":"Setup your environment"},{"location":"ecolyo/getting_started/setup_your_environment/#vscode","text":"","title":"VSCode"},{"location":"ecolyo/getting_started/setup_your_environment/#install-vscode","text":"Installation for VSCode can be found here: Installation of VSCode .","title":"Install VSCode"},{"location":"ecolyo/getting_started/setup_your_environment/#extensions","text":"Installation of Extention is explained here: Installation of Extensions . Here are the list of important extensions to install: Prettier - Code formatter ES7 React/Redux/GraphQL/React-Native snippets GitLens - Git supercharged Markdown Preview Optional extensions: Bracket Pair Colorizer 2 CSS Peek Auto Rename Tag indent-rainbow TabOut Liveshare (pair programming extension)","title":"Extensions"},{"location":"ecolyo/getting_started/setup_your_environment/#user-settings","text":"User settings for Ecolyo are described in this section: LINK TO SECTION TO ADD","title":"User settings"},{"location":"ecolyo/getting_started/setup_your_environment/#git","text":"The project is using GitLab, you will need to install Git to checkout the projet. Installation for Git can be found here: Installation of Git .","title":"Git"},{"location":"ecolyo/getting_started/setup_your_environment/#node","text":"For this project, Node version 14 is required.Download node-v14 . Node.js\u00ae is a JavaScript runtime built on Chrome's V8 JavaScript engine.","title":"Node"},{"location":"ecolyo/getting_started/setup_your_environment/#yarn","text":"Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is described with this package manager. Installation for yarn can be found here: Installation of Yarn .","title":"Yarn"},{"location":"ecolyo/getting_started/setup_your_environment/#docker","text":"Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.","title":"Docker"},{"location":"ecolyo/getting_started/setup_your_environment/#install-docker","text":"Installation of Docker can be found here: Installation of Docker .","title":"Install Docker"},{"location":"ecolyo/getting_started/setup_your_environment/#install-docker-compose","text":"Installation of Docker-Compose (according to your OS) is explained here: Installation of Docker-Compose .","title":"Install Docker-Compose"},{"location":"ecolyo/konnectors/egl/","text":"EGL Konnector This konnector fetches consumptions measures from EGL API. The EGL API allows us to get a user's consumption data gathered by it's connected water meter \"T\u00e9l\u00e9o\". You can clone the project here . You should also check Cozy's official documentations for konnectors : https://docs.cozy.io/en/tutorials/konnector/getting-started/ API Url for Development : https://agence-rec.eaudugrandlyon.com API Url for Production : https://agence.eaudugrandlyon.com/ws Authentication In order to authenticate to the EGL API we have to request the following route Method : POST Authentication Route : /connect.asp \"headers\": { { \"AuthKey\": <your-auth-key>, \"Content-Type\": \"application/x-www-form-urlencoded\" } } \"body\": { \"mode\": \"formdata\" { \"login\": <your-login>, \"pass\": <your-password> } } Once you've sent this request the API should answer with a code 100 if everything is ok and provides you a valid token and num_abt that you will use later in order to get data. { \"codeRetour\": 100, \"libelleRetour\": \"Connect\u00e9\", \"resultatRetour\": { \"num_abt\": 1895683, \"token\": \"897555754A703055397897456568776E32704C3953514F5R\" } } Fetch Data In order to get data from the EGL API we have to request the following route : Method : POST Authentication Route : /getAllAgregatsByAbonnement.aspx \"body\": { \"mode\": \"formdata\" { \"login\": <your-login>, \"pass\": <your-password> } } \"body\": { \"mode\": \"formdata\" { \"token\": \"897555754A703055397897456568776E32704C3953514F5R\", \"num_abt\": 1895683, \"date_debut\": MM/JJ/YYYY, \"date_fin\": MM/JJ/YYYY } } The dates must be valid dates otherwise you'll get an error There answer will provides you an array of data day by day with the value got by the water meter 'ValeurIndex' at this moment. { \"codeRetour\": 100, \"libelleRetour\": \"L'op\u00e9ration a r\u00e9ussi\", \"resultatRetour\": [ { \"DateReleve\": \"2020-07-01T00:00:00+02:00\", \"TypeAgregat\": \"R\", \"ValeurIndex\": 562362 }, { \"DateReleve\": \"2020-07-02T00:00:00+02:00\", \"TypeAgregat\": \"R\", \"ValeurIndex\": 562432 } ] } You'll have to subtract a day value with the previous's to get a consumption for a given day. TypeAgregats \"R\", means the real value \"A\", means an anomaly \"D\", means a water meter changing \"V\" \"X\" \"T\", means pending data If you're looking for more information about the API, checkout the complete API documentation Konnector Methods Method Description start Init Function getData Retrieve data from API processData Parse data. Remove existing data from DB using hydrateAndFilter, store filtered data and return the list of filtered data authenticate Authentication method. Requires login, password, baseUrl and ApiAuthKey. storeData Save data in the right doctype db and prevent duplicated keys format Format data for DB storage and remove bad data (former \"T\" typeagregats remain in response even if the data was added later, leading to duplicated data) resetInProgressAggregatedData Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.egl.year : { load: 76.712, year: 2020, ... } need to be replace by { load: 82.212, year: 2020, ... } after egl data reprocess","title":"Eau du Grand Lyon"},{"location":"ecolyo/konnectors/egl/#egl-konnector","text":"This konnector fetches consumptions measures from EGL API. The EGL API allows us to get a user's consumption data gathered by it's connected water meter \"T\u00e9l\u00e9o\". You can clone the project here . You should also check Cozy's official documentations for konnectors : https://docs.cozy.io/en/tutorials/konnector/getting-started/ API Url for Development : https://agence-rec.eaudugrandlyon.com API Url for Production : https://agence.eaudugrandlyon.com/ws","title":"EGL Konnector"},{"location":"ecolyo/konnectors/egl/#authentication","text":"In order to authenticate to the EGL API we have to request the following route Method : POST Authentication Route : /connect.asp \"headers\": { { \"AuthKey\": <your-auth-key>, \"Content-Type\": \"application/x-www-form-urlencoded\" } } \"body\": { \"mode\": \"formdata\" { \"login\": <your-login>, \"pass\": <your-password> } } Once you've sent this request the API should answer with a code 100 if everything is ok and provides you a valid token and num_abt that you will use later in order to get data. { \"codeRetour\": 100, \"libelleRetour\": \"Connect\u00e9\", \"resultatRetour\": { \"num_abt\": 1895683, \"token\": \"897555754A703055397897456568776E32704C3953514F5R\" } }","title":"Authentication"},{"location":"ecolyo/konnectors/egl/#fetch-data","text":"In order to get data from the EGL API we have to request the following route : Method : POST Authentication Route : /getAllAgregatsByAbonnement.aspx \"body\": { \"mode\": \"formdata\" { \"login\": <your-login>, \"pass\": <your-password> } } \"body\": { \"mode\": \"formdata\" { \"token\": \"897555754A703055397897456568776E32704C3953514F5R\", \"num_abt\": 1895683, \"date_debut\": MM/JJ/YYYY, \"date_fin\": MM/JJ/YYYY } } The dates must be valid dates otherwise you'll get an error There answer will provides you an array of data day by day with the value got by the water meter 'ValeurIndex' at this moment. { \"codeRetour\": 100, \"libelleRetour\": \"L'op\u00e9ration a r\u00e9ussi\", \"resultatRetour\": [ { \"DateReleve\": \"2020-07-01T00:00:00+02:00\", \"TypeAgregat\": \"R\", \"ValeurIndex\": 562362 }, { \"DateReleve\": \"2020-07-02T00:00:00+02:00\", \"TypeAgregat\": \"R\", \"ValeurIndex\": 562432 } ] } You'll have to subtract a day value with the previous's to get a consumption for a given day.","title":"Fetch Data"},{"location":"ecolyo/konnectors/egl/#typeagregats","text":"\"R\", means the real value \"A\", means an anomaly \"D\", means a water meter changing \"V\" \"X\" \"T\", means pending data If you're looking for more information about the API, checkout the complete API documentation","title":"TypeAgregats"},{"location":"ecolyo/konnectors/egl/#konnector-methods","text":"Method Description start Init Function getData Retrieve data from API processData Parse data. Remove existing data from DB using hydrateAndFilter, store filtered data and return the list of filtered data authenticate Authentication method. Requires login, password, baseUrl and ApiAuthKey. storeData Save data in the right doctype db and prevent duplicated keys format Format data for DB storage and remove bad data (former \"T\" typeagregats remain in response even if the data was added later, leading to duplicated data) resetInProgressAggregatedData Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.egl.year : { load: 76.712, year: 2020, ... } need to be replace by { load: 82.212, year: 2020, ... } after egl data reprocess","title":"Konnector Methods"},{"location":"ecolyo/konnectors/enedis/","text":"This konnector fetches consumptions measures from Enedis API. This is an Oauth Konnector, meaning the authentification performed to access all data is made following an Oauth2 protocol. You can clone the project here . You should also check Cozy's official documentations for konnectors : https://docs.cozy.io/en/tutorials/konnector/getting-started/ https://docs.cozy.io/en/tutorials/konnector/oauth/ Enedis Konnector The Oauth protocol does not take place in the konnector code, therefore it is also important to take a look at the proxy documentation to fully understand all the interactions that will be told below. All the actions performed by the stack are targetted from pre-registered paramaters, here is the list of all parameters needed by the stack to perform the Oauth protocol and allow the konnector to fetch data. On its first launch, following the Oauth Client Connect authentification. The cozy stack calls the authentification_endpoint and start the oauth protocol, see proxy doc . The account has now an access_token and an id_token from the oauth call id token is only given when requesting the token endpoint in _authorization_code grant_type. This token holds several meta datas, including the usage_point_id (id of user's meter) that will be needed further to fetch user's datas. Konnector starts, if no usage_point_id are found in database or fields then proceed as a first launch. Store the usage_point_id in oauth_callback_result in db (see addData ). Konnector finds usage_point_id when starting but token is expired. Proceed to refresh token and restart konnector with usage_point_id in fields params (see Troubleshooting when asking for refresh token section at the end of the page). Enedis API API Url for Production : https://gw.prd.api.enedis.fr API url for Development : https://gw.hml.api.enedis.fr Once you've finished the OAuth protocol and have a valid token, you can go fetch the data. Currently we use the two following endpoints in Ecolyo: Method : GET Route : /v4/metering_data/consumption_load_curve Method : GET Route : /v4/metering_data/daily_consumption \"params\": { \"usage_point_id\": <your-usage-point-id>, \"start\": \"YYYY-MM-DD\", \"end\": \"YYYY-MM-DD\", } \"headers\": { \"Accept\": \"application/json\", \"Authorization\": \"Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\" } For more information about Datahub-Enedis API, checkout the Datahub documentation . Konnector Methods Method Description start Init Function getDailyData Retrieve data from the API. Format: { value: \"Wh\", \"date\": \"YYYY-MM-DD\" } \" startLoadDataProcess Check if history is loaded. If not, call several time the api to retrieve 1 month of history for load data. If yes only call once the api launchLoadDataProcess Launch process to handle load data getLoadData Retrieve data from the API. Format: { value: \"W\", \"date\": \"YYYY-MM-DD hh:mm:ss\" } processData Parse data. Remove existing data from DB using hydrateAndFilter, store filtered data and return the list of filtered data agregateMonthAndYearData Agregate data from daily data to monthly and yearly data agregateHourlyData Agregate data from load data (every 30 min) to Hourly data storeData Save data in the right doctype db and prevent duplicated keys formateData Format data for DB storage and remove bad data buildAgregatedData Retrieve and remove old data for a specific doctype and return an array of agregated data buildDataFromKey Format an entry for DB storage using key and value. For year doctype: key = \"YYYY\". For month doctype: key = \"YYYY-MM\" isHistoryLoaded Function checking if the history is loaded resetInProgressAggregatedData Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.enedis.year : { load: 76.712, year: 2020, ... } need to be replace by { load: 82.212, year: 2020, ... } after enedis data reprocess Troubleshooting when asking for refresh token When a token expires, the konnector will encounter an error when fetching user data, leading to a refresh token request. Since refresh token requests restart the Konnector, it was decided to add the usage_point_id into the start fields when asking for a refresh token (see line 97). restart to refresh token Line 85: await cozyClient.fetchJSON( 'POST', `/accounts/enedisgrandlyon/${accountId}/refresh` ) Line 97: ```fields.usage_point_id = usage_point_id``` Line 98: ```return start(fields, cozyParameters, false)``` In fact the usage_point_id still remains in the account collection, but on restart, the konnector loses this._account context leading to an error when searching for usage_point_id in account.","title":"Enedis"},{"location":"ecolyo/konnectors/enedis/#enedis-konnector","text":"The Oauth protocol does not take place in the konnector code, therefore it is also important to take a look at the proxy documentation to fully understand all the interactions that will be told below. All the actions performed by the stack are targetted from pre-registered paramaters, here is the list of all parameters needed by the stack to perform the Oauth protocol and allow the konnector to fetch data. On its first launch, following the Oauth Client Connect authentification. The cozy stack calls the authentification_endpoint and start the oauth protocol, see proxy doc . The account has now an access_token and an id_token from the oauth call id token is only given when requesting the token endpoint in _authorization_code grant_type. This token holds several meta datas, including the usage_point_id (id of user's meter) that will be needed further to fetch user's datas. Konnector starts, if no usage_point_id are found in database or fields then proceed as a first launch. Store the usage_point_id in oauth_callback_result in db (see addData ). Konnector finds usage_point_id when starting but token is expired. Proceed to refresh token and restart konnector with usage_point_id in fields params (see Troubleshooting when asking for refresh token section at the end of the page).","title":"Enedis Konnector"},{"location":"ecolyo/konnectors/enedis/#enedis-api","text":"API Url for Production : https://gw.prd.api.enedis.fr API url for Development : https://gw.hml.api.enedis.fr Once you've finished the OAuth protocol and have a valid token, you can go fetch the data. Currently we use the two following endpoints in Ecolyo: Method : GET Route : /v4/metering_data/consumption_load_curve Method : GET Route : /v4/metering_data/daily_consumption \"params\": { \"usage_point_id\": <your-usage-point-id>, \"start\": \"YYYY-MM-DD\", \"end\": \"YYYY-MM-DD\", } \"headers\": { \"Accept\": \"application/json\", \"Authorization\": \"Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\" } For more information about Datahub-Enedis API, checkout the Datahub documentation .","title":"Enedis API"},{"location":"ecolyo/konnectors/enedis/#konnector-methods","text":"Method Description start Init Function getDailyData Retrieve data from the API. Format: { value: \"Wh\", \"date\": \"YYYY-MM-DD\" } \" startLoadDataProcess Check if history is loaded. If not, call several time the api to retrieve 1 month of history for load data. If yes only call once the api launchLoadDataProcess Launch process to handle load data getLoadData Retrieve data from the API. Format: { value: \"W\", \"date\": \"YYYY-MM-DD hh:mm:ss\" } processData Parse data. Remove existing data from DB using hydrateAndFilter, store filtered data and return the list of filtered data agregateMonthAndYearData Agregate data from daily data to monthly and yearly data agregateHourlyData Agregate data from load data (every 30 min) to Hourly data storeData Save data in the right doctype db and prevent duplicated keys formateData Format data for DB storage and remove bad data buildAgregatedData Retrieve and remove old data for a specific doctype and return an array of agregated data buildDataFromKey Format an entry for DB storage using key and value. For year doctype: key = \"YYYY\". For month doctype: key = \"YYYY-MM\" isHistoryLoaded Function checking if the history is loaded resetInProgressAggregatedData Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.enedis.year : { load: 76.712, year: 2020, ... } need to be replace by { load: 82.212, year: 2020, ... } after enedis data reprocess","title":"Konnector Methods"},{"location":"ecolyo/konnectors/enedis/#troubleshooting-when-asking-for-refresh-token","text":"When a token expires, the konnector will encounter an error when fetching user data, leading to a refresh token request. Since refresh token requests restart the Konnector, it was decided to add the usage_point_id into the start fields when asking for a refresh token (see line 97). restart to refresh token Line 85: await cozyClient.fetchJSON( 'POST', `/accounts/enedisgrandlyon/${accountId}/refresh` ) Line 97: ```fields.usage_point_id = usage_point_id``` Line 98: ```return start(fields, cozyParameters, false)``` In fact the usage_point_id still remains in the account collection, but on restart, the konnector loses this._account context leading to an error when searching for usage_point_id in account.","title":"Troubleshooting when asking for refresh token"},{"location":"ecolyo/konnectors/grdf/","text":"This konnector fetches consumptions measures from Grdf Adict API. This is an Oauth Konnector, meaning the authentification performed to access all data is made following an Oauth2 protocol. You can clone the project here . You should also check Cozy's official documentations for konnectors : https://docs.cozy.io/en/tutorials/konnector/getting-started/ https://docs.cozy.io/en/tutorials/konnector/oauth/ Grdf Adict Konnector The Oauth protocol does not take place in the konnector code, therefore it is also important to take a look at the proxy to fully understand all the interactions that will be told below. All the actions performed by the stack are targetted from pre-registered paramaters, here is the list of all parameters needed by the stack to perform the Oauth protocol and allow the konnector to fetch data. On its first launch, following the Oauth Client Connect authentification. The cozy stack calls the authentification_endpoint and start the oauth protocol, see proxy doc . The account has now an access_token and an id_token from the oauth call id token is only given when requesting the token endpoint in _authorization_code grant_type. This token holds several meta datas, including the pce_id (id of user's meter) that will be needed further to fetch user's datas. Konnector starts, fails to find a pce_id in database on first launch therefore decodes the id_token to store the pce_id in db (see addData ). Konnector restarts, this time knowing a pce_id, it fails to fetch datas because the access_token from oauth call has a reduced scope (only scoping for meta data requests). Konnector launches a refresh call, the proxy knows to answer it with a client_credentials grant_type call to grdf /access_token. Konnector restarts with everyting needed in database to fetch datas and store them in couchdb. Further jobs will not need to change scope again and will only ask for refresh tokens. Konnector Flow summarized to do Add request PCE's frequency Grdf owns different type of meters, some are read twice a year (every six months therefore called 6M), others are 1M or 1D. Ecolyo could warn the user if its meter is not suited for the application use. Launch on standalone In the project repository type yarn standalone to launch the konnector without a cozy stack running. Installation Build the konnector with yarn build . Install on easy-cozy (development purposes) sudo docker cp /home/easy-cozy/fun/grdf-konnector/build/ $container_id:/tmp/grdf-oauth sudo docker-compose exec cozy ./cozy konnectors install grdf-oauth --domain \"$alphaDomain\" file:///tmp/grdf-oauth $container_id Install on production Type yarn deploy to build on a dedicated branch. Build branch is stored as a docker image in a registry : Container Registry . Konnector Methods Method Description start Init Function getData Retrieve data from API processData Parse data. Remove existing data from DB using hydrateAndFilter, store filtered data and return the list of filtered data storeData Save data in the right doctype db and prevent duplicated keys formateData Format data for DB storage and remove bad data buildAgregatedData Retrieve and remove old data for a specific doctype and return an array of agregated data buildDataFromKey Format an entry for DB storage using key and value. For year doctype: key = \"YYYY\". For month doctype: key = \"YYYY-MM\" resetInProgressAggregatedData Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.grdf.year : { load: 76.712, year: 2020, ... } need to be replace by { load: 82.212, year: 2020, ... } after grdf data reprocess","title":"GRDF"},{"location":"ecolyo/konnectors/grdf/#grdf-adict-konnector","text":"The Oauth protocol does not take place in the konnector code, therefore it is also important to take a look at the proxy to fully understand all the interactions that will be told below. All the actions performed by the stack are targetted from pre-registered paramaters, here is the list of all parameters needed by the stack to perform the Oauth protocol and allow the konnector to fetch data. On its first launch, following the Oauth Client Connect authentification. The cozy stack calls the authentification_endpoint and start the oauth protocol, see proxy doc . The account has now an access_token and an id_token from the oauth call id token is only given when requesting the token endpoint in _authorization_code grant_type. This token holds several meta datas, including the pce_id (id of user's meter) that will be needed further to fetch user's datas. Konnector starts, fails to find a pce_id in database on first launch therefore decodes the id_token to store the pce_id in db (see addData ). Konnector restarts, this time knowing a pce_id, it fails to fetch datas because the access_token from oauth call has a reduced scope (only scoping for meta data requests). Konnector launches a refresh call, the proxy knows to answer it with a client_credentials grant_type call to grdf /access_token. Konnector restarts with everyting needed in database to fetch datas and store them in couchdb. Further jobs will not need to change scope again and will only ask for refresh tokens.","title":"Grdf Adict Konnector"},{"location":"ecolyo/konnectors/grdf/#konnector-flow-summarized","text":"to do Add request PCE's frequency Grdf owns different type of meters, some are read twice a year (every six months therefore called 6M), others are 1M or 1D. Ecolyo could warn the user if its meter is not suited for the application use.","title":"Konnector Flow summarized"},{"location":"ecolyo/konnectors/grdf/#launch-on-standalone","text":"In the project repository type yarn standalone to launch the konnector without a cozy stack running.","title":"Launch on standalone"},{"location":"ecolyo/konnectors/grdf/#installation","text":"Build the konnector with yarn build .","title":"Installation"},{"location":"ecolyo/konnectors/grdf/#install-on-easy-cozy-development-purposes","text":"sudo docker cp /home/easy-cozy/fun/grdf-konnector/build/ $container_id:/tmp/grdf-oauth sudo docker-compose exec cozy ./cozy konnectors install grdf-oauth --domain \"$alphaDomain\" file:///tmp/grdf-oauth $container_id","title":"Install on easy-cozy (development purposes)"},{"location":"ecolyo/konnectors/grdf/#install-on-production","text":"Type yarn deploy to build on a dedicated branch. Build branch is stored as a docker image in a registry : Container Registry .","title":"Install on production"},{"location":"ecolyo/konnectors/grdf/#konnector-methods","text":"Method Description start Init Function getData Retrieve data from API processData Parse data. Remove existing data from DB using hydrateAndFilter, store filtered data and return the list of filtered data storeData Save data in the right doctype db and prevent duplicated keys formateData Format data for DB storage and remove bad data buildAgregatedData Retrieve and remove old data for a specific doctype and return an array of agregated data buildDataFromKey Format an entry for DB storage using key and value. For year doctype: key = \"YYYY\". For month doctype: key = \"YYYY-MM\" resetInProgressAggregatedData Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.grdf.year : { load: 76.712, year: 2020, ... } need to be replace by { load: 82.212, year: 2020, ... } after grdf data reprocess","title":"Konnector Methods"},{"location":"ecolyo/project_architecture/architecture/","text":"Libraries For this project, we use the libraries below: React Library to create user interfaces. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM React Redux It is a predictable state container. It is implemented for a better management of the states because it allows to centralize all the states and the logic of the application. It lets a react component read data from a Redux store, and dispatch actions to the store to update data. Axios HTTP client library It allows to send HTTP request and manage the responses. Lodash javascript utility library Lodash'modular method are great for: Iterating arrays, objects, & strings Manipulating & testing values Creating composite functions Moment Date library to parse, validate, manipulate, and display dates and times in JavaScript. Luxon Wrapper for Javascript dates and times. Jest Testing library It allows to evaluate functionnalities of an app to ensure that the product is defect-free in order to produce the quality product. Enzyme Testing utility for React It makes it easier to test your React Components' output. You can also manipulate, traverse, and in some ways simulate runtime given the output. Sass CSS preprocessor It allows us to easily manage large CSS files and split across different files. It allows us to create variables, nested rules, mixins, functions, and do mathematical calculations. Material UI It allows to create react component that implements Google's material design D3 It allows to manipulate documents based on data. It combines visualization components and a data-driven approach to DOM manipulation. React-swipeable-views It is a React component to make swipeable views React-lottie Lottie Animation View for React. It allows app to use animations easily. Husky It is used to improve your commit.","title":"Architecture"},{"location":"ecolyo/project_architecture/architecture/#libraries","text":"For this project, we use the libraries below:","title":"Libraries"},{"location":"ecolyo/project_architecture/architecture/#react","text":"Library to create user interfaces. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM","title":"React"},{"location":"ecolyo/project_architecture/architecture/#react-redux","text":"It is a predictable state container. It is implemented for a better management of the states because it allows to centralize all the states and the logic of the application. It lets a react component read data from a Redux store, and dispatch actions to the store to update data.","title":"React Redux"},{"location":"ecolyo/project_architecture/architecture/#axios","text":"HTTP client library It allows to send HTTP request and manage the responses.","title":"Axios"},{"location":"ecolyo/project_architecture/architecture/#lodash","text":"javascript utility library Lodash'modular method are great for: Iterating arrays, objects, & strings Manipulating & testing values Creating composite functions","title":"Lodash"},{"location":"ecolyo/project_architecture/architecture/#moment","text":"Date library to parse, validate, manipulate, and display dates and times in JavaScript.","title":"Moment"},{"location":"ecolyo/project_architecture/architecture/#luxon","text":"Wrapper for Javascript dates and times.","title":"Luxon"},{"location":"ecolyo/project_architecture/architecture/#jest","text":"Testing library It allows to evaluate functionnalities of an app to ensure that the product is defect-free in order to produce the quality product.","title":"Jest"},{"location":"ecolyo/project_architecture/architecture/#enzyme","text":"Testing utility for React It makes it easier to test your React Components' output. You can also manipulate, traverse, and in some ways simulate runtime given the output.","title":"Enzyme"},{"location":"ecolyo/project_architecture/architecture/#sass","text":"CSS preprocessor It allows us to easily manage large CSS files and split across different files. It allows us to create variables, nested rules, mixins, functions, and do mathematical calculations.","title":"Sass"},{"location":"ecolyo/project_architecture/architecture/#material-ui","text":"It allows to create react component that implements Google's material design","title":"Material UI"},{"location":"ecolyo/project_architecture/architecture/#d3","text":"It allows to manipulate documents based on data. It combines visualization components and a data-driven approach to DOM manipulation.","title":"D3"},{"location":"ecolyo/project_architecture/architecture/#react-swipeable-views","text":"It is a React component to make swipeable views","title":"React-swipeable-views"},{"location":"ecolyo/project_architecture/architecture/#react-lottie","text":"Lottie Animation View for React. It allows app to use animations easily.","title":"React-lottie"},{"location":"ecolyo/project_architecture/architecture/#husky","text":"It is used to improve your commit.","title":"Husky"},{"location":"ecolyo/project_architecture/cozy/","text":"Section under Construction","title":"Cozy"},{"location":"ecolyo/project_architecture/doctypes/","text":"Timeseries doctypes Description Each fluid has its own doctype wildcard and one doctype per time step. Each available time step for a fluid depends of the available data from the energy provider. Here are the different time step: half an hour - use com.grandlyon.*.minute doctype week - use com.grandlyon.*.day doctype day - use com.grandlyon.*.day doctype month - use com.grandlyon.*.month doctype year - use com.grandlyon.*.year doctype Doctype Here are the available doctypes: Fluid type Doctype wildcard Doctypes electricity fluid / enedis com.grandlyon.enedis.* com.grandlyon.enedis.minute com.grandlyon.enedis.day com.grandlyon.enedis.month com.grandlyon.enedis.year gaz fluid / grdf com.grandlyon.grdf.* com.grandlyon.grdf.day com.grandlyon.grdf.month com.grandlyon.grdf.year water fluid / eau du grand lyon com.grandlyon.egl.* com.grandlyon.egl.day com.grandlyon.egl.month com.grandlyon.egl.year Structure Field Type Description load number load (in kWh or L) minute number minute of the date set to 0 except for minute serie hour number hour of the date set to 0 except for minute and hour series day number day of the date set to 1 for month and year series month number month of the date set to 1 for year series year number year of the date Example { \"load\": 770.18, \"minute\": 0, \"hour\": 0, \"day\": 1, \"month\": 1, \"year\": 2020 } User profile Description This doctype is used to store all information about the user. Doctype com.grandlyon.ecolyo.profile Structure Field Type Description id string Profile id ecogestureHash string Hash used to verify the content of ecogestures challengeHash string Hash used to verify the content of challenges duelHash string Hash used to verify the content of duels quizHash string Hash used to verify the content of quiz explorationHash string Hash used to verify the content of exploration isFirstConnection boolean Boolean used to inform if the user connects for the first time haveSeenFavoriteModal boolean Boolean used to inform if user has seen the favorite modal haveSeenLastReport boolean Boolean used to inform if user has seen the last report haveSeenOldFluidModal Datetime or boolean Used to inform if user has seen the modal display when his data are too old. Its value is false or a DateTime when he saw it sendReportNotification boolean Boolean used to inform if user has seen the report notification monthlyReportDate DateTime Date of the last monthly report Example { \"id\": \"0e016e853592e18155e87b85ce00a33a\", \"challengeHash\": \"4cbcafe514788757c377534f1a407e022c29e38c\", \"duelHash\": \"48371ffabb2853b0503b882f11e1fa8e730bac76\", \"ecogestureHash\": \"9798a0aaccb47cff906fc4931a2eff5f9371dd8b\", \"haveSeenFavoriteModal\": true, \"haveSeenLastReport\": true, \"haveSeenOldFluidModal\": false, \"isFirstConnection\": false, \"monthlyReportDate\": \"2021-01-03T00:00:00.000+01:00\", \"quizHash\": \"11372a56c03edef1d6656f8a76d5ec457174f2c1\", \"explorationHash\": \"cdbc7a84d041318253a10b3cc0c02f9020c78c0b\", \"sendReportNotification\": false } Ecogesture Description This doctype is used to store ecogestures. Doctype com.grandlyon.ecolyo.ecogesture Structure Field Type Description shortName string short name of the ecogesture longName string long name of the ecogesture shortDescription string short description of the ecogesture longDescription string long description of the ecogesture usage string usage of the ecogesture fluidTypes FluidType[] Array of fluid type on which ecogesture can have an impact FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 nwh number negawattheure - impact of the ecogesture from 0 to 10 pack number pack number of the ecogesture (1 pack contain 2 ecogestures) iconName string icon name for ecogesture unlocked boolean (Optional) state for unlocked ecogesture Example { \"shortName\": \"Contr\u00f4le du nuage\", \"longName\": \"Je r\u00e8gle la temp\u00e9rature de mon eau chaude entre 55 et 60 \u00b0C.\", \"shortDescription\": \"\", \"longDescription\": \"Bien souvent les chauffe-eau sont r\u00e9gl\u00e9s pour une temp\u00e9rature de 70 \u00b0C dans le ballon, ce qui n\u2019est pas \u00e9conomique et peut m\u00eame \u00eatre dangereux !\", \"usage\": \"Eau chaude sanitaire\", \"fluidTypes\": [ 0 ], \"nwh\": 6, \"pack\": 8 } Challenge Description This doctype is used to store all challenges. Doctype com.grandlyon.ecolyo.challenge Structure Field Type Description _id string challenge id - respect the format CHALLENGE000X title string title of the challenge description string description of the challenge target number The number of stars required to unlock the duel relationships any relation to quiz and duel Example { \"_id\": \"CHALLENGE0001\", \"title\": \"Nicolas Hublot\", \"description\": \"foobar\", \"target\": 15, \"relationships\": { \"quiz\": { \"data\": { \"_id\": \"QUIZ001\", \"_type\": \"com.grandlyon.ecolyo.quiz\" } }, \"exploration\": { \"data\": { \"_id\": \"EXPLORATION001\", \"_type\": \"com.grandlyon.ecolyo.exploration\" } }, \"duel\": { \"data\": { \"_id\": \"DUEL001\", \"_type\": \"com.grandlyon.ecolyo.duel\" } } } } User challenge Description This doctype is used to store all additionnal information about a challenge started or ended by the user. Doctype com.grandlyon.ecolyo.userchallenge Structure Field Type Description id string userChallenge id title string userChallenge title state UserChallengeState state of the challenge UserChallengeState enum - LOCKED = 0 - UNLOCKED = 1 - ONGOING = 2 - DUEL = 3 - DONE = 4 target number Number of stars required to unlock the duel progress ChallengeProgress Number of stars earned by the user for each challenge ChallengeProgress enum - quizzProgress: number - explorationProgress: number - actionProgress: number quiz UserQuiz Complete Quiz object with progress exploration UserExploration Complete Exploration object with progress duel UserDuelEntity Complete Duel object with progress included success UserChallengeSuccess Success state of the challenge UserChallengeSuccess enum - ONGOING = 0 - LOST = 1 - WIN = 2 startDate string null starting date of the the challenge endingDate string null ending date of the challenge Example { \"_id\": \"eae3a79a05d677a739bdd2b46b009936\", \"description\": \"foobar\", \"duel\": { \"description\": \"Je parie un ours polaire que vous ne pouvez pas consommer moins que #CONSUMPTION \u20ac en 1 semaine\", \"duration\": { \"days\": 7 }, \"fluidTypes\": [ 0, 1, 2 ], \"id\": \"DUEL001\", \"startDate\": null, \"state\": 4, \"threshold\": -1, \"title\": \"Nicolas Hublot\", \"userConsumption\": 0 }, \"endingDate\": null, \"id\": \"CHALLENGE0001\", \"progress\": { \"actionProgress\": 0, \"explorationProgress\": 0, \"quizProgress\": 0 }, \"quiz\": { \"customQuestion\": { \"interval\": 30, \"period\": {}, \"questionLabel\": \"Quel jour ai-je le plus consomm\u00e9 la semaine derni\u00e8re ?\", \"result\": 1, \"timeStep\": 20, \"type\": 0 }, \"id\": \"QUIZ001\", \"questions\": [ { \"answers\": [ { \"answerLabel\": \"Vapeur d'eau\", \"isTrue\": false }, { \"answerLabel\": \"Fum\u00e9e\", \"isTrue\": false }, { \"answerLabel\": \"Gouttelettes d'eau et cristaux de glace\", \"isTrue\": true } ], \"explanation\": \"Les nuages sont constitu\u00e9s de gouttelettes d'eau et parfois aussi de cristaux de glace\", \"questionLabel\": \"De quoi les nuages sont-ils constitu\u00e9s ?\", \"result\": 1, \"source\": \"string\" }, { \"answers\": [ { \"answerLabel\": \"86 km\", \"isTrue\": true }, { \"answerLabel\": \"78 km\", \"isTrue\": false }, { \"answerLabel\": \"56 km\", \"isTrue\": false } ], \"explanation\": \"L\u2019aqueduc du Gier est un des aqueducs antiques de Lyon desservant la ville antique de Lugdunum. Avec ses 86 km il est le plus long des quatre aqueducs ayant aliment\u00e9 la ville en eau, et celui dont les structures sont le mieux conserv\u00e9es. Il doit son nom au fait qu'il puise aux sources du Gier, affluent du Rh\u00f4ne\", \"questionLabel\": \"Quelle longueur faisait l\u2019aqueduc du Gier pour acheminer l\u2019eau sur Lyon \u00e0 l\u2019\u00e9poque romaine ?\", \"result\": 1, \"source\": \"string\" }, { \"answers\": [ { \"answerLabel\": \"Cr\u00e9mieux\", \"isTrue\": false }, { \"answerLabel\": \"Cr\u00e9pieux-Charmy\", \"isTrue\": true }, { \"answerLabel\": \"Charly\", \"isTrue\": false } ], \"explanation\": \"Cr\u00e9pieux-Charmy est le principal champ captant de la M\u00e9tropole de Lyon\", \"questionLabel\": \"Quelle est le nom du principal champ de captage d\u2019eau potable de la M\u00e9tropole ?\", \"result\": 1, \"source\": \"string\" }, { \"answers\": [ { \"answerLabel\": \"Pompe \u00e0 air\", \"isTrue\": false }, { \"answerLabel\": \"Pompe \u00e0 cordes\", \"isTrue\": true }, { \"answerLabel\": \"Pompe de Cornouailles\", \"isTrue\": false } ], \"explanation\": \"Mise en fonctionnement en 1856, 3 pompes \u00e0 vapeur dites de Cornouailles produisent quelque 20 000 m3 d'eau par jour. Ces pompes mesurent 20 m de haut et 13 m de large pour un poids de 200 tonnes. Leur balancier de 35 tonnes s'actionne toutes les 6 secondes, permettant ainsi l'envoi de 600 m3 d'eau par heure.\", \"questionLabel\": \"Quelle type de pompes \u00e9taient utilis\u00e9es \u00e0 l'usine des eaux de Caluire jusqu'en 1910 ?\", \"result\": 1, \"source\": \"string\" } ], \"result\": 5, \"state\": 2 }, \"exploration\": { \"id\": \"EXPLORATION001\", \"date\": \"2021-01-13T17:03:11.964Z\", \"description\": \"Consultez 3 fois Ecolyo\", \"ecogesture_id\": \"\", \"fluid_condition\": [], \"message_success\": \"Vous vous \u00eates connect\u00e9 3 fois \u00e0 Ecolyo\", \"progress\": 0, \"state\": 2, \"target\": 3, \"type\": 2 }, \"startDate\": \"2021-01-04T00:00:00.000Z\", \"state\": 3, \"success\": 0, \"target\": 15, \"title\": \"Nicolas Hublot\" } Quiz Description This doctype is used to store all quiz. Doctype com.grandlyon.ecolyo.quiz Structure Field Type Description _id string quiz id - respect the format QUIZ00X questions QuestionEntity[] Array of questions entities customQuestion CustomQuestionEntity Custom question based on user's consumption Example { \"_id\": \"QUIZ001\", \"questions\": [ { \"questionLabel\": \"Quelle longueur faisait l\u2019aqueduc du Gier pour acheminer l\u2019eau sur Lyon \u00e0 l\u2019\u00e9poque romaine ?\", \"answers\": [ { \"answerLabel\": \"86 km\", \"isTrue\": true }, { \"answerLabel\": \"78 km\", \"isTrue\": false }, { \"answerLabel\": \"56 km\", \"isTrue\": false } ], \"explanation\": \"L\u2019aqueduc du Gier est un des aqueducs antiques de Lyon desservant la ville antique de Lugdunum. Avec ses 86 km il est le plus long des quatre aqueducs ayant aliment\u00e9 la ville en eau, et celui dont les structures sont le mieux conserv\u00e9es. Il doit son nom au fait qu'il puise aux sources du Gier, affluent du Rh\u00f4ne\", \"source\": \"string\" }, { \"questionLabel\": \"Quelle type de pompes \u00e9taient utilis\u00e9es \u00e0 l'usine des eaux de Caluire jusqu'en 1910 ?\", \"answers\": [ { \"answerLabel\": \"Pompe \u00e0 cordes\", \"isTrue\": true }, { \"answerLabel\": \"Pompe de Cornouailles\", \"isTrue\": false }, { \"answerLabel\": \"Pompe \u00e0 air\", \"isTrue\": false } ], \"explanation\": \"Mise en fonctionnement en 1856, 3 pompes \u00e0 vapeur dites de Cornouailles produisent quelque 20 000 m3 d'eau par jour. Ces pompes mesurent 20 m de haut et 13 m de large pour un poids de 200 tonnes. Leur balancier de 35 tonnes s'actionne toutes les 6 secondes, permettant ainsi l'envoi de 600 m3 d'eau par heure.\", \"source\": \"string\" }, { \"questionLabel\": \"Quelle est le nom du principal champ de captage d\u2019eau potable de la M\u00e9tropole ?\", \"answers\": [ { \"answerLabel\": \"Cr\u00e9mieux\", \"isTrue\": false }, { \"answerLabel\": \"Cr\u00e9pieux-Charmy\", \"isTrue\": true }, { \"answerLabel\": \"Charly\", \"isTrue\": false } ], \"explanation\": \"Cr\u00e9pieux-Charmy est le principal champ captant de la M\u00e9tropole de Lyon\", \"source\": \"string\" }, { \"questionLabel\": \"De quoi les nuages sont-ils constitu\u00e9s ?\", \"answers\": [ { \"answerLabel\": \"Vapeur d'eau\", \"isTrue\": false }, { \"answerLabel\": \"Fum\u00e9e\", \"isTrue\": false }, { \"answerLabel\": \"Gouttelettes d'eau et cristaux de glace\", \"isTrue\": true } ], \"explanation\": \"Les nuages sont constitu\u00e9s de gouttelettes d'eau et parfois aussi de cristaux de glace\", \"source\": \"string\" } ], \"customQuestion\": { \"questionLabel\": \"Quel jour ai-je le plus consomm\u00e9 la semaine derni\u00e8re ?\", \"type\": 0, \"timeStep\": 20, \"interval\": 30, \"period\": {} } } Exploration Description This doctype is used to store all explorations. Doctype com.grandlyon.ecolyo.exploration Structure Field Type Description _id string exploration id - respect the format EXPLORATION00X state UserExplorationState State of the exploration UserExplorationState enum - UNLOCKED = 0 - ONGOING = 1 - DONE = 2 description string description of the exploration target number number of stars required to unlock an exploration type UserExplorationType type of the exploration UserExplorationType enum - DECLARATIVE = 0 - ACTION = 1 - CONSUMPTION = 2 - ECOGESTURE = 3 date string or null date of the exploration ecogesture_id string ecogesture's id fluid_condition FluidType[] Array of fluid type on which an exploration can have an impact FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 message_success string message when exploration is done Example { \"_id\": \"EXPLORATION001\", \"description\": \"Consultez l'\u00e9cogeste Chat \u00e9chaud\u00e9\", \"target\": 1, \"type\": 3, \"date\": null, \"ecogesture_id\": \"0032\", \"fluid_condition\": [], \"message_success\": \"Vous avez consult\u00e9 l'\u00e9cogeste Chat \u00e9chaud\u00e9\", \"state\": 0, } Duel Description This doctype is used to store all duels. Doctype com.grandlyon.ecolyo.duel Structure Field Type Description _id string duel id - respect the format DUEL00X title string title of the duel description string description of the duel duration Duration Luxon Duration of the duel Example { \"_id\": \"DUEL001\", \"title\": \"Nicolas Hublot\", \"description\": \"Je parie un ours polaire que vous ne pouvez pas consommer moins que #CONSUMPTION \u20ac en 1 semaine\", \"duration\": { \"days\": 7 } }","title":"DocTypes"},{"location":"ecolyo/project_architecture/doctypes/#timeseries-doctypes","text":"","title":"Timeseries doctypes"},{"location":"ecolyo/project_architecture/doctypes/#description","text":"Each fluid has its own doctype wildcard and one doctype per time step. Each available time step for a fluid depends of the available data from the energy provider. Here are the different time step: half an hour - use com.grandlyon.*.minute doctype week - use com.grandlyon.*.day doctype day - use com.grandlyon.*.day doctype month - use com.grandlyon.*.month doctype year - use com.grandlyon.*.year doctype","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype","text":"Here are the available doctypes: Fluid type Doctype wildcard Doctypes electricity fluid / enedis com.grandlyon.enedis.* com.grandlyon.enedis.minute com.grandlyon.enedis.day com.grandlyon.enedis.month com.grandlyon.enedis.year gaz fluid / grdf com.grandlyon.grdf.* com.grandlyon.grdf.day com.grandlyon.grdf.month com.grandlyon.grdf.year water fluid / eau du grand lyon com.grandlyon.egl.* com.grandlyon.egl.day com.grandlyon.egl.month com.grandlyon.egl.year","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure","text":"Field Type Description load number load (in kWh or L) minute number minute of the date set to 0 except for minute serie hour number hour of the date set to 0 except for minute and hour series day number day of the date set to 1 for month and year series month number month of the date set to 1 for year series year number year of the date","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example","text":"{ \"load\": 770.18, \"minute\": 0, \"hour\": 0, \"day\": 1, \"month\": 1, \"year\": 2020 }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#user-profile","text":"","title":"User profile"},{"location":"ecolyo/project_architecture/doctypes/#description_1","text":"This doctype is used to store all information about the user.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_1","text":"com.grandlyon.ecolyo.profile","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_1","text":"Field Type Description id string Profile id ecogestureHash string Hash used to verify the content of ecogestures challengeHash string Hash used to verify the content of challenges duelHash string Hash used to verify the content of duels quizHash string Hash used to verify the content of quiz explorationHash string Hash used to verify the content of exploration isFirstConnection boolean Boolean used to inform if the user connects for the first time haveSeenFavoriteModal boolean Boolean used to inform if user has seen the favorite modal haveSeenLastReport boolean Boolean used to inform if user has seen the last report haveSeenOldFluidModal Datetime or boolean Used to inform if user has seen the modal display when his data are too old. Its value is false or a DateTime when he saw it sendReportNotification boolean Boolean used to inform if user has seen the report notification monthlyReportDate DateTime Date of the last monthly report","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_1","text":"{ \"id\": \"0e016e853592e18155e87b85ce00a33a\", \"challengeHash\": \"4cbcafe514788757c377534f1a407e022c29e38c\", \"duelHash\": \"48371ffabb2853b0503b882f11e1fa8e730bac76\", \"ecogestureHash\": \"9798a0aaccb47cff906fc4931a2eff5f9371dd8b\", \"haveSeenFavoriteModal\": true, \"haveSeenLastReport\": true, \"haveSeenOldFluidModal\": false, \"isFirstConnection\": false, \"monthlyReportDate\": \"2021-01-03T00:00:00.000+01:00\", \"quizHash\": \"11372a56c03edef1d6656f8a76d5ec457174f2c1\", \"explorationHash\": \"cdbc7a84d041318253a10b3cc0c02f9020c78c0b\", \"sendReportNotification\": false }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#ecogesture","text":"","title":"Ecogesture"},{"location":"ecolyo/project_architecture/doctypes/#description_2","text":"This doctype is used to store ecogestures.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_2","text":"com.grandlyon.ecolyo.ecogesture","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_2","text":"Field Type Description shortName string short name of the ecogesture longName string long name of the ecogesture shortDescription string short description of the ecogesture longDescription string long description of the ecogesture usage string usage of the ecogesture fluidTypes FluidType[] Array of fluid type on which ecogesture can have an impact FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 nwh number negawattheure - impact of the ecogesture from 0 to 10 pack number pack number of the ecogesture (1 pack contain 2 ecogestures) iconName string icon name for ecogesture unlocked boolean (Optional) state for unlocked ecogesture","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_2","text":"{ \"shortName\": \"Contr\u00f4le du nuage\", \"longName\": \"Je r\u00e8gle la temp\u00e9rature de mon eau chaude entre 55 et 60 \u00b0C.\", \"shortDescription\": \"\", \"longDescription\": \"Bien souvent les chauffe-eau sont r\u00e9gl\u00e9s pour une temp\u00e9rature de 70 \u00b0C dans le ballon, ce qui n\u2019est pas \u00e9conomique et peut m\u00eame \u00eatre dangereux !\", \"usage\": \"Eau chaude sanitaire\", \"fluidTypes\": [ 0 ], \"nwh\": 6, \"pack\": 8 }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#challenge","text":"","title":"Challenge"},{"location":"ecolyo/project_architecture/doctypes/#description_3","text":"This doctype is used to store all challenges.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_3","text":"com.grandlyon.ecolyo.challenge","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_3","text":"Field Type Description _id string challenge id - respect the format CHALLENGE000X title string title of the challenge description string description of the challenge target number The number of stars required to unlock the duel relationships any relation to quiz and duel","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_3","text":"{ \"_id\": \"CHALLENGE0001\", \"title\": \"Nicolas Hublot\", \"description\": \"foobar\", \"target\": 15, \"relationships\": { \"quiz\": { \"data\": { \"_id\": \"QUIZ001\", \"_type\": \"com.grandlyon.ecolyo.quiz\" } }, \"exploration\": { \"data\": { \"_id\": \"EXPLORATION001\", \"_type\": \"com.grandlyon.ecolyo.exploration\" } }, \"duel\": { \"data\": { \"_id\": \"DUEL001\", \"_type\": \"com.grandlyon.ecolyo.duel\" } } } }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#user-challenge","text":"","title":"User challenge"},{"location":"ecolyo/project_architecture/doctypes/#description_4","text":"This doctype is used to store all additionnal information about a challenge started or ended by the user.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_4","text":"com.grandlyon.ecolyo.userchallenge","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_4","text":"Field Type Description id string userChallenge id title string userChallenge title state UserChallengeState state of the challenge UserChallengeState enum - LOCKED = 0 - UNLOCKED = 1 - ONGOING = 2 - DUEL = 3 - DONE = 4 target number Number of stars required to unlock the duel progress ChallengeProgress Number of stars earned by the user for each challenge ChallengeProgress enum - quizzProgress: number - explorationProgress: number - actionProgress: number quiz UserQuiz Complete Quiz object with progress exploration UserExploration Complete Exploration object with progress duel UserDuelEntity Complete Duel object with progress included success UserChallengeSuccess Success state of the challenge UserChallengeSuccess enum - ONGOING = 0 - LOST = 1 - WIN = 2 startDate string null starting date of the the challenge endingDate string null ending date of the challenge","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_4","text":"{ \"_id\": \"eae3a79a05d677a739bdd2b46b009936\", \"description\": \"foobar\", \"duel\": { \"description\": \"Je parie un ours polaire que vous ne pouvez pas consommer moins que #CONSUMPTION \u20ac en 1 semaine\", \"duration\": { \"days\": 7 }, \"fluidTypes\": [ 0, 1, 2 ], \"id\": \"DUEL001\", \"startDate\": null, \"state\": 4, \"threshold\": -1, \"title\": \"Nicolas Hublot\", \"userConsumption\": 0 }, \"endingDate\": null, \"id\": \"CHALLENGE0001\", \"progress\": { \"actionProgress\": 0, \"explorationProgress\": 0, \"quizProgress\": 0 }, \"quiz\": { \"customQuestion\": { \"interval\": 30, \"period\": {}, \"questionLabel\": \"Quel jour ai-je le plus consomm\u00e9 la semaine derni\u00e8re ?\", \"result\": 1, \"timeStep\": 20, \"type\": 0 }, \"id\": \"QUIZ001\", \"questions\": [ { \"answers\": [ { \"answerLabel\": \"Vapeur d'eau\", \"isTrue\": false }, { \"answerLabel\": \"Fum\u00e9e\", \"isTrue\": false }, { \"answerLabel\": \"Gouttelettes d'eau et cristaux de glace\", \"isTrue\": true } ], \"explanation\": \"Les nuages sont constitu\u00e9s de gouttelettes d'eau et parfois aussi de cristaux de glace\", \"questionLabel\": \"De quoi les nuages sont-ils constitu\u00e9s ?\", \"result\": 1, \"source\": \"string\" }, { \"answers\": [ { \"answerLabel\": \"86 km\", \"isTrue\": true }, { \"answerLabel\": \"78 km\", \"isTrue\": false }, { \"answerLabel\": \"56 km\", \"isTrue\": false } ], \"explanation\": \"L\u2019aqueduc du Gier est un des aqueducs antiques de Lyon desservant la ville antique de Lugdunum. Avec ses 86 km il est le plus long des quatre aqueducs ayant aliment\u00e9 la ville en eau, et celui dont les structures sont le mieux conserv\u00e9es. Il doit son nom au fait qu'il puise aux sources du Gier, affluent du Rh\u00f4ne\", \"questionLabel\": \"Quelle longueur faisait l\u2019aqueduc du Gier pour acheminer l\u2019eau sur Lyon \u00e0 l\u2019\u00e9poque romaine ?\", \"result\": 1, \"source\": \"string\" }, { \"answers\": [ { \"answerLabel\": \"Cr\u00e9mieux\", \"isTrue\": false }, { \"answerLabel\": \"Cr\u00e9pieux-Charmy\", \"isTrue\": true }, { \"answerLabel\": \"Charly\", \"isTrue\": false } ], \"explanation\": \"Cr\u00e9pieux-Charmy est le principal champ captant de la M\u00e9tropole de Lyon\", \"questionLabel\": \"Quelle est le nom du principal champ de captage d\u2019eau potable de la M\u00e9tropole ?\", \"result\": 1, \"source\": \"string\" }, { \"answers\": [ { \"answerLabel\": \"Pompe \u00e0 air\", \"isTrue\": false }, { \"answerLabel\": \"Pompe \u00e0 cordes\", \"isTrue\": true }, { \"answerLabel\": \"Pompe de Cornouailles\", \"isTrue\": false } ], \"explanation\": \"Mise en fonctionnement en 1856, 3 pompes \u00e0 vapeur dites de Cornouailles produisent quelque 20 000 m3 d'eau par jour. Ces pompes mesurent 20 m de haut et 13 m de large pour un poids de 200 tonnes. Leur balancier de 35 tonnes s'actionne toutes les 6 secondes, permettant ainsi l'envoi de 600 m3 d'eau par heure.\", \"questionLabel\": \"Quelle type de pompes \u00e9taient utilis\u00e9es \u00e0 l'usine des eaux de Caluire jusqu'en 1910 ?\", \"result\": 1, \"source\": \"string\" } ], \"result\": 5, \"state\": 2 }, \"exploration\": { \"id\": \"EXPLORATION001\", \"date\": \"2021-01-13T17:03:11.964Z\", \"description\": \"Consultez 3 fois Ecolyo\", \"ecogesture_id\": \"\", \"fluid_condition\": [], \"message_success\": \"Vous vous \u00eates connect\u00e9 3 fois \u00e0 Ecolyo\", \"progress\": 0, \"state\": 2, \"target\": 3, \"type\": 2 }, \"startDate\": \"2021-01-04T00:00:00.000Z\", \"state\": 3, \"success\": 0, \"target\": 15, \"title\": \"Nicolas Hublot\" }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#quiz","text":"","title":"Quiz"},{"location":"ecolyo/project_architecture/doctypes/#description_5","text":"This doctype is used to store all quiz.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_5","text":"com.grandlyon.ecolyo.quiz","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_5","text":"Field Type Description _id string quiz id - respect the format QUIZ00X questions QuestionEntity[] Array of questions entities customQuestion CustomQuestionEntity Custom question based on user's consumption","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_5","text":"{ \"_id\": \"QUIZ001\", \"questions\": [ { \"questionLabel\": \"Quelle longueur faisait l\u2019aqueduc du Gier pour acheminer l\u2019eau sur Lyon \u00e0 l\u2019\u00e9poque romaine ?\", \"answers\": [ { \"answerLabel\": \"86 km\", \"isTrue\": true }, { \"answerLabel\": \"78 km\", \"isTrue\": false }, { \"answerLabel\": \"56 km\", \"isTrue\": false } ], \"explanation\": \"L\u2019aqueduc du Gier est un des aqueducs antiques de Lyon desservant la ville antique de Lugdunum. Avec ses 86 km il est le plus long des quatre aqueducs ayant aliment\u00e9 la ville en eau, et celui dont les structures sont le mieux conserv\u00e9es. Il doit son nom au fait qu'il puise aux sources du Gier, affluent du Rh\u00f4ne\", \"source\": \"string\" }, { \"questionLabel\": \"Quelle type de pompes \u00e9taient utilis\u00e9es \u00e0 l'usine des eaux de Caluire jusqu'en 1910 ?\", \"answers\": [ { \"answerLabel\": \"Pompe \u00e0 cordes\", \"isTrue\": true }, { \"answerLabel\": \"Pompe de Cornouailles\", \"isTrue\": false }, { \"answerLabel\": \"Pompe \u00e0 air\", \"isTrue\": false } ], \"explanation\": \"Mise en fonctionnement en 1856, 3 pompes \u00e0 vapeur dites de Cornouailles produisent quelque 20 000 m3 d'eau par jour. Ces pompes mesurent 20 m de haut et 13 m de large pour un poids de 200 tonnes. Leur balancier de 35 tonnes s'actionne toutes les 6 secondes, permettant ainsi l'envoi de 600 m3 d'eau par heure.\", \"source\": \"string\" }, { \"questionLabel\": \"Quelle est le nom du principal champ de captage d\u2019eau potable de la M\u00e9tropole ?\", \"answers\": [ { \"answerLabel\": \"Cr\u00e9mieux\", \"isTrue\": false }, { \"answerLabel\": \"Cr\u00e9pieux-Charmy\", \"isTrue\": true }, { \"answerLabel\": \"Charly\", \"isTrue\": false } ], \"explanation\": \"Cr\u00e9pieux-Charmy est le principal champ captant de la M\u00e9tropole de Lyon\", \"source\": \"string\" }, { \"questionLabel\": \"De quoi les nuages sont-ils constitu\u00e9s ?\", \"answers\": [ { \"answerLabel\": \"Vapeur d'eau\", \"isTrue\": false }, { \"answerLabel\": \"Fum\u00e9e\", \"isTrue\": false }, { \"answerLabel\": \"Gouttelettes d'eau et cristaux de glace\", \"isTrue\": true } ], \"explanation\": \"Les nuages sont constitu\u00e9s de gouttelettes d'eau et parfois aussi de cristaux de glace\", \"source\": \"string\" } ], \"customQuestion\": { \"questionLabel\": \"Quel jour ai-je le plus consomm\u00e9 la semaine derni\u00e8re ?\", \"type\": 0, \"timeStep\": 20, \"interval\": 30, \"period\": {} } }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#exploration","text":"","title":"Exploration"},{"location":"ecolyo/project_architecture/doctypes/#description_6","text":"This doctype is used to store all explorations.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_6","text":"com.grandlyon.ecolyo.exploration","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_6","text":"Field Type Description _id string exploration id - respect the format EXPLORATION00X state UserExplorationState State of the exploration UserExplorationState enum - UNLOCKED = 0 - ONGOING = 1 - DONE = 2 description string description of the exploration target number number of stars required to unlock an exploration type UserExplorationType type of the exploration UserExplorationType enum - DECLARATIVE = 0 - ACTION = 1 - CONSUMPTION = 2 - ECOGESTURE = 3 date string or null date of the exploration ecogesture_id string ecogesture's id fluid_condition FluidType[] Array of fluid type on which an exploration can have an impact FluidType enum: - ELECTRICITY = 0 - WATER = 1 - GAS = 2 - MULTIFLUID = 3 message_success string message when exploration is done","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_6","text":"{ \"_id\": \"EXPLORATION001\", \"description\": \"Consultez l'\u00e9cogeste Chat \u00e9chaud\u00e9\", \"target\": 1, \"type\": 3, \"date\": null, \"ecogesture_id\": \"0032\", \"fluid_condition\": [], \"message_success\": \"Vous avez consult\u00e9 l'\u00e9cogeste Chat \u00e9chaud\u00e9\", \"state\": 0, }","title":"Example"},{"location":"ecolyo/project_architecture/doctypes/#duel","text":"","title":"Duel"},{"location":"ecolyo/project_architecture/doctypes/#description_7","text":"This doctype is used to store all duels.","title":"Description"},{"location":"ecolyo/project_architecture/doctypes/#doctype_7","text":"com.grandlyon.ecolyo.duel","title":"Doctype"},{"location":"ecolyo/project_architecture/doctypes/#structure_7","text":"Field Type Description _id string duel id - respect the format DUEL00X title string title of the duel description string description of the duel duration Duration Luxon Duration of the duel","title":"Structure"},{"location":"ecolyo/project_architecture/doctypes/#example_7","text":"{ \"_id\": \"DUEL001\", \"title\": \"Nicolas Hublot\", \"description\": \"Je parie un ours polaire que vous ne pouvez pas consommer moins que #CONSUMPTION \u20ac en 1 semaine\", \"duration\": { \"days\": 7 } }","title":"Example"},{"location":"ecolyo/project_architecture/environments/","text":"Section under Construction","title":"Environments"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/","text":"Pilote is a social application. Section under Construction Repository Global Pilote gitlab repository Repository dedicated project Pilote TS backend - gitlab repository Acces to the application deployed DEV : https://pilote-agent-dev.grandlyon.com/ REC : https://pilote-agent-rec.grandlyon.com/","title":"Index"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/#repository-global","text":"Pilote gitlab repository","title":"Repository Global"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/#repository-dedicated-project","text":"Pilote TS backend - gitlab repository","title":"Repository dedicated project"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/#acces-to-the-application-deployed","text":"DEV : https://pilote-agent-dev.grandlyon.com/ REC : https://pilote-agent-rec.grandlyon.com/","title":"Acces to the application deployed"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/application/deploy/","text":"Section under Construction This section will show you how to deploy your project on different environments. Deployment For each environment, the CI-CD is implemented. Once, you commit on 'dev' branch or 'rec' branch, the pipeline linked is running.","title":"Deploy"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/application/deploy/#deployment","text":"For each environment, the CI-CD is implemented. Once, you commit on 'dev' branch or 'rec' branch, the pipeline linked is running.","title":"Deployment"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/","text":"Section under Construction This section will allow you to launch a proper local environment of the Pilote TS back application Initialisation of the project Clone the project repository Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial-back.git Installation of the projet Start Pilote application To start Pilote application just launch the command in a PowerShell or Windows Powershell tool: yarn docker:dev If the application starts successfully you should obtain two containers running: mps-travailleursocial-back_mps_1 mps-travailleursocial-back_postgres_1 You can access by: http://localhost:3020/api It will be redirect to the Swagger UI. It allow to test the different API defined. Run Jest test To start test defined just run the command in a PowerShell or Windows Powershell tool: yarn test:watch","title":"Launch the application on local"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#initialisation-of-the-project","text":"","title":"Initialisation of the project"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#clone-the-project-repository","text":"Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial-back.git","title":"Clone the project repository"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#installation-of-the-projet","text":"","title":"Installation of the projet"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#start-pilote-application","text":"To start Pilote application just launch the command in a PowerShell or Windows Powershell tool: yarn docker:dev If the application starts successfully you should obtain two containers running: mps-travailleursocial-back_mps_1 mps-travailleursocial-back_postgres_1 You can access by: http://localhost:3020/api It will be redirect to the Swagger UI. It allow to test the different API defined.","title":"Start Pilote application"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/launch_local_application/#run-jest-test","text":"To start test defined just run the command in a PowerShell or Windows Powershell tool: yarn test:watch","title":"Run Jest test"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/","text":"This section will allow you to install a proper local environment step by step for Pilote application using VSCode IDE. VSCode Install VSCode Installation for VSCode can be found here: Installation of VSCode . Extensions Installation of Extention is explained here: Installation of Extensions . Here are the list of important extensions to install: Prettier - Code formatter ES7 React/Redux/GraphQL/React-Native snippets GitLens - Git supercharged Markdown Preview Optional extensions: Bracket Pair Colorizer 2 CSS Peek Auto Rename Tag indent-rainbow TabOut Liveshare (pair programming extension) User settings User settings for Ecolyo are described in this section: LINK TO SECTION TO ADD Git The project is using GitLab, you will need to install Git to checkout the projet. Installation for Git can be found here: Installation of Git . Node Version 12 For now please install node v12, any later version will cause side effects on sass modules! Download node-v12 Node.js\u00ae is a JavaScript runtime built on Chrome's V8 JavaScript engine. Yarn Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is described with this package manager. Installation for yarn can be found here: Installation of Yarn . Docker Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code. Install Docker Installation of Docker can be found here: Installation of Docker . Install Docker-Compose Installation of Docker-Compose (according to your OS) is explained here: Installation of Docker-Compose .","title":"Setup your environment"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#vscode","text":"","title":"VSCode"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#install-vscode","text":"Installation for VSCode can be found here: Installation of VSCode .","title":"Install VSCode"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#extensions","text":"Installation of Extention is explained here: Installation of Extensions . Here are the list of important extensions to install: Prettier - Code formatter ES7 React/Redux/GraphQL/React-Native snippets GitLens - Git supercharged Markdown Preview Optional extensions: Bracket Pair Colorizer 2 CSS Peek Auto Rename Tag indent-rainbow TabOut Liveshare (pair programming extension)","title":"Extensions"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#user-settings","text":"User settings for Ecolyo are described in this section: LINK TO SECTION TO ADD","title":"User settings"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#git","text":"The project is using GitLab, you will need to install Git to checkout the projet. Installation for Git can be found here: Installation of Git .","title":"Git"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#node","text":"Version 12 For now please install node v12, any later version will cause side effects on sass modules! Download node-v12 Node.js\u00ae is a JavaScript runtime built on Chrome's V8 JavaScript engine.","title":"Node"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#yarn","text":"Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is described with this package manager. Installation for yarn can be found here: Installation of Yarn .","title":"Yarn"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#docker","text":"Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.","title":"Docker"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#install-docker","text":"Installation of Docker can be found here: Installation of Docker .","title":"Install Docker"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/getting_started/setup_your_environment/#install-docker-compose","text":"Installation of Docker-Compose (according to your OS) is explained here: Installation of Docker-Compose .","title":"Install Docker-Compose"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/project_architecture/architecture/","text":"Section under Construction Techno used NestJS Jest for th tests Docker PostgreSQL","title":"Project Architecture"},{"location":"pilote/Pilote%20-%20TS%20-%20Back/project_architecture/architecture/#techno-used","text":"NestJS Jest for th tests Docker PostgreSQL","title":"Techno used"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/","text":"Pilote is a social application. Repository Pilote gitlab repository Pilote TS front - gitlab repository","title":"Index"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/#repository","text":"Pilote gitlab repository Pilote TS front - gitlab repository","title":"Repository"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/application/deploy/","text":"Section under Construction This section will show you how to deploy your project on different environments. Deployment For each environment, the CI-CD is implemented. Once, you commit on 'dev' branch or 'rec' branch, the pipeline liked is running.","title":"Deploy"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/application/deploy/#deployment","text":"For each environment, the CI-CD is implemented. Once, you commit on 'dev' branch or 'rec' branch, the pipeline liked is running.","title":"Deployment"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/","text":"Section under Construction This section will allow you to launch a proper local environment of the Pilote TS front application Initialisation of the project Clone the project repository Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial.git Installation of the projet Start Pilote application Before to start Pilote application, you need to run this command in order to install dependencies: yarn install To start Pilote application just launch the command in a PowerShell or Windows Powershell tool: yarn start If the application starts successfully you should access to: http://localhost:3001/","title":"Launch the application on local"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/#initialisation-of-the-project","text":"","title":"Initialisation of the project"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/#clone-the-project-repository","text":"Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-travailleursocial.git","title":"Clone the project repository"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/#installation-of-the-projet","text":"","title":"Installation of the projet"},{"location":"pilote/Pilote%20-%20TS%20-%20Front/getting_started/launch_local_application/#start-pilote-application","text":"Before to start Pilote application, you need to run this command in order to install dependencies: yarn install To start Pilote application just launch the command in a PowerShell or Windows Powershell tool: yarn start If the application starts successfully you should access to: http://localhost:3001/","title":"Start Pilote application"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/","text":"Section under Construction This section will show you how to deploy your project on different environments. Setup First of all you'll need to install MobaXterm in order to connect to the server. Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands. Install WSL First open Powershell as administrator and launch the following command : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart This command will install WSL on your computer. After this, you'll need to reboot . Install your Linux distribution After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : wsl.exe --list --running Now you should see the name of your distribution in the list. Setup your distribution Start Up Updating the packages list by typing : sudo apt update Install the nodejs using the apt package manager sudo apt install To verify the Installation execute the following command : nodejs --version To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : sudo apt install npm To verify the npm Install check using the command : npm --version To Downlaod and Setup Yarn sudo apt install yarn To check the Installed version of Yarn : yarn --version Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands : sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc Now you should be at least in version ^1.22 and ready to go on. Configuration of MobaXterm First open a new session and connect to the distant host 192.168.62.31 . Don't forget to add the path to the private key in the advanced SSH settings. Deploy Pilote Deploy on Alpha Windows First open your Ubuntu terminal, and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : yarn build After this, you can launch the deployment. In order to deploy on pilote-dev-build (development environment) use the command : yarn deploy-dev If you want to deploy on the pilote-build environment, use : yarn deploy To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm. Linux From your current branch, run yarn build then sudo yarn deploy_dev to instantly deploy your working branch on the latest tagged Pilote container registry.","title":"Deploy"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#setup","text":"First of all you'll need to install MobaXterm in order to connect to the server. Then, if your're on Linux you can skip the following section, otherwise if you are on Windows you'll have to install Windows Subsystem for Linux (WSL) since the deployment of the app is not working with windows commands.","title":"Setup"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#install-wsl","text":"First open Powershell as administrator and launch the following command : dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart This command will install WSL on your computer. After this, you'll need to reboot .","title":"Install WSL"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#install-your-linux-distribution","text":"After reboot, open the microsoft store and install the distribution of your choice (for example : Ubuntu 20.04 LTS). Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account. To make sure it's correctly installed and working, you can open Powershell and paste the following command : wsl.exe --list --running Now you should see the name of your distribution in the list.","title":"Install your Linux distribution"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#setup-your-distribution","text":"Start Up Updating the packages list by typing : sudo apt update Install the nodejs using the apt package manager sudo apt install To verify the Installation execute the following command : nodejs --version To be able to download npm package, you need to install the npm, the Node.js package manager. To do so type : sudo apt install npm To verify the npm Install check using the command : npm --version To Downlaod and Setup Yarn sudo apt install yarn To check the Installed version of Yarn : yarn --version Now you'll probably be in version 0.23+git, if so you'll have to upgrade to 1.22 to make everything work properly. In order to achieve this, you'll have to launch several commands : sudo apt-get remove cmdtest sudo apt autoremove sudo apt-get update sudo apt install curl -y curl -o- -L https://yarnpkg.com/install.sh | bash source ~/.bashrc Now you should be at least in version ^1.22 and ready to go on.","title":"Setup your distribution"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#configuration-of-mobaxterm","text":"First open a new session and connect to the distant host 192.168.62.31 . Don't forget to add the path to the private key in the advanced SSH settings.","title":"Configuration of MobaXterm"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#deploy-pilote","text":"","title":"Deploy Pilote"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#deploy-on-alpha","text":"","title":"Deploy on Alpha"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#windows","text":"First open your Ubuntu terminal, and clone the project in the repertory of your choice. Once you've selected the branch of you want to deploy, write the following command : yarn build After this, you can launch the deployment. In order to deploy on pilote-dev-build (development environment) use the command : yarn deploy-dev If you want to deploy on the pilote-build environment, use : yarn deploy To deploy on the llle-build environment, you'll have to drag and drop your build folder directly in llle-build using MobaXterm.","title":"Windows"},{"location":"pilote/Pilote%20-%20Usager/application/deploy/#linux","text":"From your current branch, run yarn build then sudo yarn deploy_dev to instantly deploy your working branch on the latest tagged Pilote container registry.","title":"Linux"},{"location":"pilote/Pilote%20-%20Usager/application/doctypes/","text":"Section under Construction Doctypes Doctypes represent different types of data. Their primary use is for permissions: an app or konnector will request permissions for one or several doctypes and will not be able to access other doctypes. See Doctypes documentation for more information. The following is a full description of the doctypes we use and their fields. Cozy doctypes won't be fully described. Instead, for every used one, we'll include a link to its official documentation. Used Cozy doctypes io.cozy.accounts : Konnector accounts io.cozy.contacts : Contacts io.cozy.contacts.groups : Contacts groups io.cozy.files : Files io.cozy.konnectors : Connectors installed in the cozy io.cozy.permissions : Permissions of the instance io.cozy.todos.item : Todos item io.cozy.todos.list : Todos list io.cozy.triggers : Job triggers Custom doctypes com.grandlyon.mps.notes Represents ... com.grandlyon.mps.notes attributes are: title : {string} The title of the note. content : {string} The content of the note. #### Example json { title: '...', content: '...', } com.grandlyon.mps.profile Represents the tutorial and notifications state. com.grandlyon.mps.profile attributes are: tutorial : {object} contains home , contacts , documents , actions , and notes which are all of type boolean . Each one represents the state of its tutorial. For example, home: true means the home tutorial hasn't been seen yet and will be visible to the user the next time he visits the Home component. notification : {} ... #### Example json { tutorial: { home: true, contacts: false, documents: true, actions: false, notes: true }, notification: ... } } com.grandlyon.mps.appointments ... com.grandlyon.mps.docrules Represents ... com.grandlyon.mps.docrules attributes are: description : {string} Description of the docrule. doctype : {string} ... rule : {object} Contains limit of type number and selector which is an object with the following attributes: 'cozyMetadata.classification' : {string} Classification ... 'cozyMetadata.createdAt' : {object} Creation date. #### Example json { description: '...', doctype: 'io.cozy.files', rule: { limit: 10, selector: { 'cozyMetadata.classification': '...', 'cozyMetadata.createdAt': 'December 23, 2020 03:24:00', } } }","title":"Doctypes"},{"location":"pilote/Pilote%20-%20Usager/application/doctypes/#doctypes","text":"Doctypes represent different types of data. Their primary use is for permissions: an app or konnector will request permissions for one or several doctypes and will not be able to access other doctypes. See Doctypes documentation for more information. The following is a full description of the doctypes we use and their fields. Cozy doctypes won't be fully described. Instead, for every used one, we'll include a link to its official documentation.","title":"Doctypes"},{"location":"pilote/Pilote%20-%20Usager/application/doctypes/#used-cozy-doctypes","text":"io.cozy.accounts : Konnector accounts io.cozy.contacts : Contacts io.cozy.contacts.groups : Contacts groups io.cozy.files : Files io.cozy.konnectors : Connectors installed in the cozy io.cozy.permissions : Permissions of the instance io.cozy.todos.item : Todos item io.cozy.todos.list : Todos list io.cozy.triggers : Job triggers","title":"Used Cozy doctypes"},{"location":"pilote/Pilote%20-%20Usager/application/doctypes/#custom-doctypes","text":"com.grandlyon.mps.notes Represents ... com.grandlyon.mps.notes attributes are: title : {string} The title of the note. content : {string} The content of the note. #### Example json { title: '...', content: '...', } com.grandlyon.mps.profile Represents the tutorial and notifications state. com.grandlyon.mps.profile attributes are: tutorial : {object} contains home , contacts , documents , actions , and notes which are all of type boolean . Each one represents the state of its tutorial. For example, home: true means the home tutorial hasn't been seen yet and will be visible to the user the next time he visits the Home component. notification : {} ... #### Example json { tutorial: { home: true, contacts: false, documents: true, actions: false, notes: true }, notification: ... } } com.grandlyon.mps.appointments ... com.grandlyon.mps.docrules Represents ... com.grandlyon.mps.docrules attributes are: description : {string} Description of the docrule. doctype : {string} ... rule : {object} Contains limit of type number and selector which is an object with the following attributes: 'cozyMetadata.classification' : {string} Classification ... 'cozyMetadata.createdAt' : {object} Creation date. #### Example json { description: '...', doctype: 'io.cozy.files', rule: { limit: 10, selector: { 'cozyMetadata.classification': '...', 'cozyMetadata.createdAt': 'December 23, 2020 03:24:00', } } }","title":"Custom doctypes"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/","text":"Section under Construction Initialize Create a new project in GitLab and take note of its URL Protecting Master Branch On the GitLab page of your project go to Settings/Repository in the Protected Branches section. Select the Master* branch and set allow to merge to Master and *allow to push to No one This will prevent anyone to push on the master branch, the only way to add code to the branch will be merge requests. Setting Development Branch Retrieve the project on your computer, open a command line and execute. git clone https://forge.grandlyon.com/web-et-numerique/llle.git git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-usager.git Create the development branch git checkout -b dev Init your project and then type any time you want to commit changes: git add . git commit -m \"Commit changes\" git push origin dev Start Developing For any other development you should create a branch from the development branch. First make sure to be on the dev branch, type: git branch to see your current branch Conventional Commits A feature branch name should follow this structure: feat/<title_of_the_user_story> You can create the branch by typing: git checkout -b feat/<title_of_the_user_story> Each fix branch should be named as the following fix-\\<title_of_the_fix> . Breaking Change Appends a ! before the title of the commit to notify that a breaking change has happened. Give a solid description of the changes as well. add tag git tag -a 1.0.0 -m \"complementary message\" Gitflow Scheme","title":"Gitflow"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#initialize","text":"Create a new project in GitLab and take note of its URL","title":"Initialize"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#protecting-master-branch","text":"On the GitLab page of your project go to Settings/Repository in the Protected Branches section. Select the Master* branch and set allow to merge to Master and *allow to push to No one This will prevent anyone to push on the master branch, the only way to add code to the branch will be merge requests.","title":"Protecting Master Branch"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#setting-development-branch","text":"Retrieve the project on your computer, open a command line and execute. git clone https://forge.grandlyon.com/web-et-numerique/llle.git git clone https://forge.grandlyon.com/solidarite/monparcourssocial/mps-usager.git Create the development branch git checkout -b dev Init your project and then type any time you want to commit changes: git add . git commit -m \"Commit changes\" git push origin dev","title":"Setting Development Branch"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#start-developing","text":"For any other development you should create a branch from the development branch. First make sure to be on the dev branch, type: git branch to see your current branch","title":"Start Developing"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#conventional-commits","text":"A feature branch name should follow this structure: feat/<title_of_the_user_story> You can create the branch by typing: git checkout -b feat/<title_of_the_user_story> Each fix branch should be named as the following fix-\\<title_of_the_fix> . Breaking Change Appends a ! before the title of the commit to notify that a breaking change has happened. Give a solid description of the changes as well. add tag git tag -a 1.0.0 -m \"complementary message\"","title":"Conventional Commits"},{"location":"pilote/Pilote%20-%20Usager/application/gitflow/#gitflow-scheme","text":"","title":"Gitflow Scheme"},{"location":"pilote/Pilote%20-%20Usager/application/scaffolding/","text":"Section under Construction In this section, you will find information about the project file structure and the purpose of the main folders. Source Files Folder/File Purpose assets The application's assets, contains fonts, svg and png files. docrules doctypes Contains the cozy doctypes, you can see more on Cozy Documentation . helpers Contains helper functions that are used by services. It contains also a test file for each helper file. locales Contains JSON data used by the translation system i18n provided by Cozy-ui . models Contains all our models' Interfaces services Here you'll find all the services. It contains also a test file for each service file. store Redux store. Contains actions, reducers, and store types. styles Styles folder. The base folder under it contains our variables, fonts, breakpoints, animations, and mixins. Whenever you add a style file elsewhere, don't forget to import it in index.scss . targets Contains mobile and browser targets. It also contains a Public target for social workers . types utils In this folder you'll find utilities methods. tests components/App.tsx The root component. Configuration Files Folder/File Purpose .eslintrc.js Config file for ESLint. gitlab-ci.yml Config file used for Gitlab continuous integration. .prettierrc Config file for Prettier extension. jest.config.js Config file used by Jest for testing the application. manifest.webapp Manifest of the application, used by cozy for permissions' management, you can add permissions for doctypes here. tsconfig.json Config file for TypeScript. ...","title":"Scaffolding"},{"location":"pilote/Pilote%20-%20Usager/application/scaffolding/#source-files","text":"Folder/File Purpose assets The application's assets, contains fonts, svg and png files. docrules doctypes Contains the cozy doctypes, you can see more on Cozy Documentation . helpers Contains helper functions that are used by services. It contains also a test file for each helper file. locales Contains JSON data used by the translation system i18n provided by Cozy-ui . models Contains all our models' Interfaces services Here you'll find all the services. It contains also a test file for each service file. store Redux store. Contains actions, reducers, and store types. styles Styles folder. The base folder under it contains our variables, fonts, breakpoints, animations, and mixins. Whenever you add a style file elsewhere, don't forget to import it in index.scss . targets Contains mobile and browser targets. It also contains a Public target for social workers . types utils In this folder you'll find utilities methods. tests components/App.tsx The root component.","title":"Source Files"},{"location":"pilote/Pilote%20-%20Usager/application/scaffolding/#configuration-files","text":"Folder/File Purpose .eslintrc.js Config file for ESLint. gitlab-ci.yml Config file used for Gitlab continuous integration. .prettierrc Config file for Prettier extension. jest.config.js Config file used by Jest for testing the application. manifest.webapp Manifest of the application, used by cozy for permissions' management, you can add permissions for doctypes here. tsconfig.json Config file for TypeScript. ...","title":"Configuration Files"},{"location":"pilote/Pilote%20-%20Usager/application/services/","text":"Section under Construction Profile Service Functions getProfile : Tries fetching the profile if it exists. If not, it creates a new one and returns it. updateProfile : Updates the profile. Note Service Functions findNoteCurrentAppointement : Returns a note from an appointment id. findNoteById : Returns a note by its id. getAllNotes : Returns all notes. findLastNote : Returns the last note by date. createNote : Creates a new note and returns it. updateNote : Updates a note. deleteNoteById : Deletes a note by its id. DocRule Service Functions createDocRule : Creates a new docRule. getDocRuleById : Returns a docRule by its id. getDocRulesByIds : Returns a list of docRules by their ids. getAllDocRules : Returns all docRules. createAllDocRules : Fetches all docRules and creates the missing ones. Document Service Functions getAllDocuments : Returns the list of all documents. getDocumentsByQualification : Returns a document by the 'metadata.qualification.label' . getDocumentsByQualifications : Uses getDocumentsByQualification to return a list of documents by the 'metadata.qualification.label' . getDocumentByID : Returns a document by its id. saveDocument : Creates a new file. editDocumentName : Edits a document's name by its id. deleteDocumentById : Deletes the document by its id. downloadDocument : Downloads a file from its id. viewDocument : Takes a document's id, opens its download link and returns it. Contact Service Functions getCurrentUser : Returns the contact with an existing me field, which represents the current user. getAllContacts : Returns a list of all contacts. findContactById : Returns a contact by its id. createContact : Creates a new contact. updateContact : Updates an existing contact. deleteContactById : Deletes a contact by its id. Group Service Function createMetroGroup : Creates a new group and returns it. getMetroGroup : Returns the group if it exists or creates it if it doesn't. ...","title":"Services"},{"location":"pilote/Pilote%20-%20Usager/application/services/#profile-service","text":"","title":"Profile Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions","text":"getProfile : Tries fetching the profile if it exists. If not, it creates a new one and returns it. updateProfile : Updates the profile.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#note-service","text":"","title":"Note Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions_1","text":"findNoteCurrentAppointement : Returns a note from an appointment id. findNoteById : Returns a note by its id. getAllNotes : Returns all notes. findLastNote : Returns the last note by date. createNote : Creates a new note and returns it. updateNote : Updates a note. deleteNoteById : Deletes a note by its id.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#docrule-service","text":"","title":"DocRule Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions_2","text":"createDocRule : Creates a new docRule. getDocRuleById : Returns a docRule by its id. getDocRulesByIds : Returns a list of docRules by their ids. getAllDocRules : Returns all docRules. createAllDocRules : Fetches all docRules and creates the missing ones.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#document-service","text":"","title":"Document Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions_3","text":"getAllDocuments : Returns the list of all documents. getDocumentsByQualification : Returns a document by the 'metadata.qualification.label' . getDocumentsByQualifications : Uses getDocumentsByQualification to return a list of documents by the 'metadata.qualification.label' . getDocumentByID : Returns a document by its id. saveDocument : Creates a new file. editDocumentName : Edits a document's name by its id. deleteDocumentById : Deletes the document by its id. downloadDocument : Downloads a file from its id. viewDocument : Takes a document's id, opens its download link and returns it.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#contact-service","text":"","title":"Contact Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#functions_4","text":"getCurrentUser : Returns the contact with an existing me field, which represents the current user. getAllContacts : Returns a list of all contacts. findContactById : Returns a contact by its id. createContact : Creates a new contact. updateContact : Updates an existing contact. deleteContactById : Deletes a contact by its id.","title":"Functions"},{"location":"pilote/Pilote%20-%20Usager/application/services/#group-service","text":"","title":"Group Service"},{"location":"pilote/Pilote%20-%20Usager/application/services/#function","text":"createMetroGroup : Creates a new group and returns it. getMetroGroup : Returns the group if it exists or creates it if it doesn't.","title":"Function"},{"location":"pilote/Pilote%20-%20Usager/application/services/#_1","text":"","title":"..."},{"location":"pilote/Pilote%20-%20Usager/application/store/","text":"Redux We are using Redux for our application state management. it maintains the state of the entire application in a single immutable state tree (object), which can't be changed directly. When something changes, a new object is created (using actions and reducers). For more information about Redux, visit The [official documentation][https://redux.js.org/]. Store The following are the existing store entities used by our application: Global : Preserves the global state, which includes isPublic and screenType (Mobile/Tablet/Desktop). UploadDocument : Manages the state of uploaded documents. Profile : Preserves the state of tutorials and notifications. For each reducer file, a test file is associated testing the reducer. All the actions are tested in a separate file with the same actions file name. Used packages react-redux : Official React bindings for Redux . redux-devtools-extension : For debugging application's state changes. @types/react-redux : This package contains type definitions for react-redux.","title":"Store"},{"location":"pilote/Pilote%20-%20Usager/application/store/#redux","text":"We are using Redux for our application state management. it maintains the state of the entire application in a single immutable state tree (object), which can't be changed directly. When something changes, a new object is created (using actions and reducers). For more information about Redux, visit The [official documentation][https://redux.js.org/].","title":"Redux"},{"location":"pilote/Pilote%20-%20Usager/application/store/#store","text":"The following are the existing store entities used by our application: Global : Preserves the global state, which includes isPublic and screenType (Mobile/Tablet/Desktop). UploadDocument : Manages the state of uploaded documents. Profile : Preserves the state of tutorials and notifications. For each reducer file, a test file is associated testing the reducer. All the actions are tested in a separate file with the same actions file name.","title":"Store"},{"location":"pilote/Pilote%20-%20Usager/application/store/#used-packages","text":"react-redux : Official React bindings for Redux . redux-devtools-extension : For debugging application's state changes. @types/react-redux : This package contains type definitions for react-redux.","title":"Used packages"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/","text":"Section under Construction Use cozy-doctype in local In order to be able to use our own cozy-doctype, especialy remote doctype here, we need to use them in local. 1/ clone cozy-doctype repository into your system. Then, push it into your root project. 2/ After that, add your own remote doctype into cozy-doctype folder: - create a new folder ex: org.mps.share - push into this folder request file: request You must declare this doctype into your manifest.webapp file like that : \"share\": { \"description\": \"Required for searching on back-endTS\", \"type\": \"org.mps.share\", \"verbs\": [\"GET\", \"POST\"] }, 3/ In cozy-app-dev-with-app.sh, you need to add another option when you serve the cozy-stack: - cozy-stack serve --allow-root (...) --doctypes /path/to/the/doctype => in this project : - cozy-stack serve (...) --doctypes /data/cozy-doctypes !! Warning !! : You need to build and push the newlest image on the forge registry when the step 3 is done !! Warning !! : You must have all files, into your docker folder, in LF mode of \"End of Line Sequence\" ! For this project: - cd docker - docker build . - docker tag registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes - docker push registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes:latest 4/ The path \"/data/cozy-doctypes\" is link to the volume of the cozy-app-dev image. - in order to mount this volume, you need to add it when you run the 'docker run' command : -v $PWD/cozy-doctypes:/data/cozy-doctypes => for this project : docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/mps -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml -v $PWD/cozy-doctypes:/data/cozy-doctypes registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes How to test your remote doctype ? GET 1/ In the request file created. Specify the methode and the route to your target URL : GET https://pilote-agent-dev.grandlyon.com/api/cozy or with value in query : GET https://pilote-agent-dev.grandlyon.com/api/auth/token/check?token={{token}} 2/ Then, you can test it by : - await client.getStackClient().fetchJSON('GET','/remote/org.mps.share') or with value in query : await client.getStackClient().fetchJSON('GET','/remote/org.mps.share?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNvenlBcGlDaGVjayIsInVzZXJJZCI6IjEiLCJpYXQiOjE2MDU2OTI0NjYsImV4cCI6MTYwNTY5MjUyNn0.HbQh5H-TcVIASUpbjZAD0MY9slRAJOVw-VMKSBu_sQ0' ) POST 1/ In the request file created. Specify the methode and the route to your target URL : POST https://pilote-agent-dev.grandlyon.com/api/auth/token/check Content-Type: application/json {{data}} 2/ Then, you can test it by : const parameters = { data: JSON.stringify({ token: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNvenlBcGlDaGVjayIsInVzZXJJZCI6IjEiLCJpYXQiOjE2MDU2MjYxNzAsImV4cCI6MTYwNTYyNjIzMH0.8m-rEAZkuqb4upAPKY7j8DhvFi8mVbmiCFDitgNYt6Y\" } ) } console.log('call remote ==> ', await client.getStackClient().fetchJSON('POST','/remote/org.mps.share', parameters ))","title":"Launch local doctypes"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/#use-cozy-doctype-in-local","text":"In order to be able to use our own cozy-doctype, especialy remote doctype here, we need to use them in local. 1/ clone cozy-doctype repository into your system. Then, push it into your root project. 2/ After that, add your own remote doctype into cozy-doctype folder: - create a new folder ex: org.mps.share - push into this folder request file: request You must declare this doctype into your manifest.webapp file like that : \"share\": { \"description\": \"Required for searching on back-endTS\", \"type\": \"org.mps.share\", \"verbs\": [\"GET\", \"POST\"] }, 3/ In cozy-app-dev-with-app.sh, you need to add another option when you serve the cozy-stack: - cozy-stack serve --allow-root (...) --doctypes /path/to/the/doctype => in this project : - cozy-stack serve (...) --doctypes /data/cozy-doctypes !! Warning !! : You need to build and push the newlest image on the forge registry when the step 3 is done !! Warning !! : You must have all files, into your docker folder, in LF mode of \"End of Line Sequence\" ! For this project: - cd docker - docker build . - docker tag registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes - docker push registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes:latest 4/ The path \"/data/cozy-doctypes\" is link to the volume of the cozy-app-dev image. - in order to mount this volume, you need to add it when you run the 'docker run' command : -v $PWD/cozy-doctypes:/data/cozy-doctypes => for this project : docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/mps -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml -v $PWD/cozy-doctypes:/data/cozy-doctypes registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes","title":"Use cozy-doctype in local"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/#how-to-test-your-remote-doctype","text":"","title":"How to test your remote doctype ?"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/#get","text":"1/ In the request file created. Specify the methode and the route to your target URL : GET https://pilote-agent-dev.grandlyon.com/api/cozy or with value in query : GET https://pilote-agent-dev.grandlyon.com/api/auth/token/check?token={{token}} 2/ Then, you can test it by : - await client.getStackClient().fetchJSON('GET','/remote/org.mps.share') or with value in query : await client.getStackClient().fetchJSON('GET','/remote/org.mps.share?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNvenlBcGlDaGVjayIsInVzZXJJZCI6IjEiLCJpYXQiOjE2MDU2OTI0NjYsImV4cCI6MTYwNTY5MjUyNn0.HbQh5H-TcVIASUpbjZAD0MY9slRAJOVw-VMKSBu_sQ0' )","title":"GET"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_doctypes/#post","text":"1/ In the request file created. Specify the methode and the route to your target URL : POST https://pilote-agent-dev.grandlyon.com/api/auth/token/check Content-Type: application/json {{data}} 2/ Then, you can test it by : const parameters = { data: JSON.stringify({ token: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNvenlBcGlDaGVjayIsInVzZXJJZCI6IjEiLCJpYXQiOjE2MDU2MjYxNzAsImV4cCI6MTYwNTYyNjIzMH0.8m-rEAZkuqb4upAPKY7j8DhvFi8mVbmiCFDitgNYt6Y\" } ) } console.log('call remote ==> ', await client.getStackClient().fetchJSON('POST','/remote/org.mps.share', parameters ))","title":"POST"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_services/","text":"Section under Construction Use services in local Configure the cozy-stack on local In order to be able to use your sercice, follow these steps: 1/ clone cozy-doctype repository into your system. Then, push it into your root project. 2/ After that, add your own remote doctype into cozy-doctype folder: - create a new folder ex: org.mps.share - push into this folder request file: request You must declare this doctype into your manifest.webapp file like that : \"share\": { \"description\": \"Required for searching on back-endTS\", \"type\": \"org.mps.share\", \"verbs\": [\"GET\", \"POST\"] }, 3/ In cozy-app-dev-with-app.sh, you need to add another option when you serve the cozy-stack: - cozy-stack serve --allow-root (...) --doctypes /path/to/the/doctype => in this project : - cozy-stack serve (...) --doctypes /data/cozy-doctypes 4/ You need to add another option when you install apps in the cozy-stack (go to: docker\\cozy-app-dev-with-app.sh) In do_install_app(): #add symbolic link to mps for sms service ln -s /data/cozy-app/mps /data/cozy-storage/cozy.tools\\:8080/.cozy_apps/mps if [ -d \"data/cozy-app/mps/0.1.1\" ]; then echo \"data/cozy-app/mps/0.1.1 already here!\"; else mkdir /data/cozy-app/mps/0.1.1 cp -a /data/cozy-app/mps/services/ /data/cozy-app/mps/0.1.1/ echo \"data/cozy-app/mps/0.1.1 just create!\"; fi # mkdir /data/cozy-app/mps/0.1.1 # cp -a /data/cozy-app/mps/services/ /data/cozy-app/mps/0.1.1/ echo \"service added\" 5/ Then, add konnector-node-run.sh in docker folder. This file is a script to store the service logs. It should contain: #!/bin/bash rundir=\"${1}\" cd $rundir node index.js | tee /data/cozy-app/mps/services.log Then, add this following row into the Dockerfile: COPY konnector-node-run.sh /etc/cozy/konnector-node-run.sh 6/ Into the disableCSP.yml, you need to add one more configuration: konnectors: cmd: /etc/cozy/konnector-node-run.sh # run connectors with node !! Warning !! : You need to build and push the newlest image on the forge registry when the step 6 is done !! Warning !! : You must have all files, into your docker folder, in LF mode of \"End of Line Sequence\" ! Finaly, you should rebuild the docker image of the cozy-stack: - cd docker - docker build . - docker tag registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes - docker push registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes:latest 7/ The path \"/data/cozy-doctypes\" is link to the volume of the cozy-app-dev image. - in order to mount this volume, you need to add it when you run the 'docker run' command : -v $PWD/cozy-doctypes:/data/cozy-doctypes => for this project : docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/mps -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml -v $PWD/cozy-doctypes:/data/cozy-doctypes registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes How to test your service ? In the manifest.webapp, you need to declare the service: \"services\": { \"smsProcess\": { \"type\": \"node\", \"file\": \"services/smsProcess/pilote.js\" } }, Then, in src\\targets\\services, you can add your service. For this project, we have created a button in Home.component.tsx in order to generate trigger url to run the service: const getTrigger = async () => { const attrs = { type: '@webhook', worker: 'service', message: { name: 'smsProcess', slug: 'pilotedemo', }, } const trigger = await client.getStackClient() .collection('io.cozy.triggers') .create(attrs) console.log('trigger', trigger) } It generate an trigger URL that we can call with our backend application : URL_COZY/job/webhook/{{trigger_id}} URL_COZY represent the cozy-stack url of your environment and not your application URL.","title":"Launch local services"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_services/#use-services-in-local","text":"","title":"Use services in local"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_services/#configure-the-cozy-stack-on-local","text":"In order to be able to use your sercice, follow these steps: 1/ clone cozy-doctype repository into your system. Then, push it into your root project. 2/ After that, add your own remote doctype into cozy-doctype folder: - create a new folder ex: org.mps.share - push into this folder request file: request You must declare this doctype into your manifest.webapp file like that : \"share\": { \"description\": \"Required for searching on back-endTS\", \"type\": \"org.mps.share\", \"verbs\": [\"GET\", \"POST\"] }, 3/ In cozy-app-dev-with-app.sh, you need to add another option when you serve the cozy-stack: - cozy-stack serve --allow-root (...) --doctypes /path/to/the/doctype => in this project : - cozy-stack serve (...) --doctypes /data/cozy-doctypes 4/ You need to add another option when you install apps in the cozy-stack (go to: docker\\cozy-app-dev-with-app.sh) In do_install_app(): #add symbolic link to mps for sms service ln -s /data/cozy-app/mps /data/cozy-storage/cozy.tools\\:8080/.cozy_apps/mps if [ -d \"data/cozy-app/mps/0.1.1\" ]; then echo \"data/cozy-app/mps/0.1.1 already here!\"; else mkdir /data/cozy-app/mps/0.1.1 cp -a /data/cozy-app/mps/services/ /data/cozy-app/mps/0.1.1/ echo \"data/cozy-app/mps/0.1.1 just create!\"; fi # mkdir /data/cozy-app/mps/0.1.1 # cp -a /data/cozy-app/mps/services/ /data/cozy-app/mps/0.1.1/ echo \"service added\" 5/ Then, add konnector-node-run.sh in docker folder. This file is a script to store the service logs. It should contain: #!/bin/bash rundir=\"${1}\" cd $rundir node index.js | tee /data/cozy-app/mps/services.log Then, add this following row into the Dockerfile: COPY konnector-node-run.sh /etc/cozy/konnector-node-run.sh 6/ Into the disableCSP.yml, you need to add one more configuration: konnectors: cmd: /etc/cozy/konnector-node-run.sh # run connectors with node !! Warning !! : You need to build and push the newlest image on the forge registry when the step 6 is done !! Warning !! : You must have all files, into your docker folder, in LF mode of \"End of Line Sequence\" ! Finaly, you should rebuild the docker image of the cozy-stack: - cd docker - docker build . - docker tag registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes - docker push registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes:latest 7/ The path \"/data/cozy-doctypes\" is link to the volume of the cozy-app-dev image. - in order to mount this volume, you need to add it when you run the 'docker run' command : -v $PWD/cozy-doctypes:/data/cozy-doctypes => for this project : docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $PWD/build:/data/cozy-app/mps -v $PWD/data:/usr/local/couchdb/data -v $PWD/docker/disableCSP.yaml:/etc/cozy/cozy.yaml -v $PWD/cozy-doctypes:/data/cozy-doctypes registry.forge.grandlyon.com/solidarite/monparcourssocial/mps-usager/cozy-env-doctypes","title":"Configure the cozy-stack on local"},{"location":"pilote/Pilote%20-%20Usager/getting_started/launch_local_services/#how-to-test-your-service","text":"In the manifest.webapp, you need to declare the service: \"services\": { \"smsProcess\": { \"type\": \"node\", \"file\": \"services/smsProcess/pilote.js\" } }, Then, in src\\targets\\services, you can add your service. For this project, we have created a button in Home.component.tsx in order to generate trigger url to run the service: const getTrigger = async () => { const attrs = { type: '@webhook', worker: 'service', message: { name: 'smsProcess', slug: 'pilotedemo', }, } const trigger = await client.getStackClient() .collection('io.cozy.triggers') .create(attrs) console.log('trigger', trigger) } It generate an trigger URL that we can call with our backend application : URL_COZY/job/webhook/{{trigger_id}} URL_COZY represent the cozy-stack url of your environment and not your application URL.","title":"How to test your service ?"},{"location":"proxy/description/","text":"Section under Construction This section of documentation refers to the Oauth protocols working hand in hand with our custom proxy and the cozy-stack. To fully understand its whereabouts, you should also look at the enedis konnector and grdf konnector documentation. proxy code source Feel free to check the proxy code at all time when reading this documentation. Oauth Dance To access customer data, one must first obtain customer authorization. This authorization is materialized by an access token and it must be obtained by the APIs exposed by each energy providers. These APIs implement Oauth 2.0 protocol, it requires authentication from the customer along with its given consent. See both Enedis and Grdf use cases before going further. Cozy Oauth Protocol cozy oauth flow documentation https://docs.cozy.io/en/cozy-stack/konnectors-workflow/#reminder-oauth-flow Couchdb The couchdb database must hold all informations needed for the konnector authentication to work properly. Auth informations are stored in the secrets/io-cozy-account_types database. You can create manually the document by entering these parameters for each konnector: Name Description _id Name of your konnector, for instance: enedisgrandlyon grant_mode authorization_code client_id Application id given by the API provider client_secret Secret also given by the API provider auth_endpoint Authorize endpoint to request when starting the oauth protocol token_endpoint Token endpoint to request, will be called when the auth endpoint response reaches the stack token_mode get Once the document is created, when launching the konnector from the cozy-home or inside the running application. The oauth flow will start. The cozy-stack will request the authorize endpoint, then call the token endpoint with the code received from the auth step. If the token request is a success. An account/service-name database will be added in couchdb containing all informations needed for authentication and the konnector will be free to work on all endpoints within its scope. Why we Need a Proxy The Oauth dance could be easily wrapped up with the two requests seen above. But since all cozy applications are hosted on different personnal clouds, following this guideline would mean that we need a client_id and a client_secret for each one of all the applications running. To answer this issue, two solutions are possible depending on what the energy supplier is willing to do. Providers could allow wildcard subdomains when registering the callback URI, it would parse the subdomain and adapt its redirection when answering /auth call. Exemple: https//*.cozygrandlyon.cloud/account/redirect -> parse subdomain before .cozy xyz.cozygrandlyon.cloud/account/redirect -> redirect to xyz toto.cozygrandlyon.cloud/account/redirect -> redirect to toto If the provider (Enedis for instance) is not accepting wildcards, then we put a proxy as a middleware to provide a generic endpoint to cater for all Oauth2 redirections. Result With that in mind, the proxy is now the one calling the auth and token provider endpoints. The instance name will be contained in redirect_uri, the stack will insert this parameters by itself in the /auth call. 3 endpoints are created in the proxy for each energy supplier : One for the auth One for the token One for the redirect uri Proxy flow Proxy Code Explained reminder Feel free to check the proxy code at all time when reading this documentation. The proxy is coded in golang. It is composed of six endpoints as seen above. The first endpoint to be called is /auth . auth Originally called from a cozy-stack trying to setup its konnector. The proxy gets these informations from the query: client_id duration redirect_uri (auto inserted by the cozy-stack, except if you specify skip_redirect_uri:true in the couchdb) response_type state (as it was conceived by the cozy-stack) The state will be merged with the instance name, then decomposed again when reaching /redirect. This way the proxy is able to keep track of the cozy instance originally calling. With all these informations, the proxy can contact the provider /auth endpoint to start the oauth dance. Enedis note See that a new composed state is sent to enedis, it is made of the former state conceived by the cozy-stack + the cozyOrigin instance name. This will be usefull when enedis is leading the oauth dance to the next step and we will need the name of the cozy to answer. Once the call is sent, enedis will point to the /redirect endpoint. Grdf To be redacted redirect Retrieve the code , usage_point_id , and state answered by Enedis. Split the customed state that was modified in the /auth process. From this split it creates two variables : state host Finally redirect all these parameters in a query to the cozy-stack (the cozy-stack which is still waiting for an answer from its /auth call). state / instance The state must be recovered without the instance name, otherwise the cozy-stack won't recognized it and the handshake will fail. token Gathering from query or parameters all params. Sends a post request to the provider /token endpoint. The stack will store the response params in a accounts couchdb database. What Happens Next","title":"Description"},{"location":"proxy/description/#oauth-dance","text":"To access customer data, one must first obtain customer authorization. This authorization is materialized by an access token and it must be obtained by the APIs exposed by each energy providers. These APIs implement Oauth 2.0 protocol, it requires authentication from the customer along with its given consent. See both Enedis and Grdf use cases before going further.","title":"Oauth Dance"},{"location":"proxy/description/#cozy-oauth-protocol","text":"cozy oauth flow documentation https://docs.cozy.io/en/cozy-stack/konnectors-workflow/#reminder-oauth-flow","title":"Cozy Oauth Protocol"},{"location":"proxy/description/#couchdb","text":"The couchdb database must hold all informations needed for the konnector authentication to work properly. Auth informations are stored in the secrets/io-cozy-account_types database. You can create manually the document by entering these parameters for each konnector: Name Description _id Name of your konnector, for instance: enedisgrandlyon grant_mode authorization_code client_id Application id given by the API provider client_secret Secret also given by the API provider auth_endpoint Authorize endpoint to request when starting the oauth protocol token_endpoint Token endpoint to request, will be called when the auth endpoint response reaches the stack token_mode get Once the document is created, when launching the konnector from the cozy-home or inside the running application. The oauth flow will start. The cozy-stack will request the authorize endpoint, then call the token endpoint with the code received from the auth step. If the token request is a success. An account/service-name database will be added in couchdb containing all informations needed for authentication and the konnector will be free to work on all endpoints within its scope.","title":"Couchdb"},{"location":"proxy/description/#why-we-need-a-proxy","text":"The Oauth dance could be easily wrapped up with the two requests seen above. But since all cozy applications are hosted on different personnal clouds, following this guideline would mean that we need a client_id and a client_secret for each one of all the applications running. To answer this issue, two solutions are possible depending on what the energy supplier is willing to do. Providers could allow wildcard subdomains when registering the callback URI, it would parse the subdomain and adapt its redirection when answering /auth call. Exemple: https//*.cozygrandlyon.cloud/account/redirect -> parse subdomain before .cozy xyz.cozygrandlyon.cloud/account/redirect -> redirect to xyz toto.cozygrandlyon.cloud/account/redirect -> redirect to toto If the provider (Enedis for instance) is not accepting wildcards, then we put a proxy as a middleware to provide a generic endpoint to cater for all Oauth2 redirections.","title":"Why we Need a Proxy"},{"location":"proxy/description/#result","text":"With that in mind, the proxy is now the one calling the auth and token provider endpoints. The instance name will be contained in redirect_uri, the stack will insert this parameters by itself in the /auth call. 3 endpoints are created in the proxy for each energy supplier : One for the auth One for the token One for the redirect uri","title":"Result"},{"location":"proxy/description/#proxy-flow","text":"","title":"Proxy flow"},{"location":"proxy/description/#proxy-code-explained","text":"reminder Feel free to check the proxy code at all time when reading this documentation. The proxy is coded in golang. It is composed of six endpoints as seen above. The first endpoint to be called is /auth .","title":"Proxy Code Explained"},{"location":"proxy/description/#auth","text":"Originally called from a cozy-stack trying to setup its konnector. The proxy gets these informations from the query: client_id duration redirect_uri (auto inserted by the cozy-stack, except if you specify skip_redirect_uri:true in the couchdb) response_type state (as it was conceived by the cozy-stack) The state will be merged with the instance name, then decomposed again when reaching /redirect. This way the proxy is able to keep track of the cozy instance originally calling. With all these informations, the proxy can contact the provider /auth endpoint to start the oauth dance.","title":"auth"},{"location":"proxy/description/#enedis","text":"note See that a new composed state is sent to enedis, it is made of the former state conceived by the cozy-stack + the cozyOrigin instance name. This will be usefull when enedis is leading the oauth dance to the next step and we will need the name of the cozy to answer. Once the call is sent, enedis will point to the /redirect endpoint.","title":"Enedis"},{"location":"proxy/description/#grdf","text":"To be redacted","title":"Grdf"},{"location":"proxy/description/#redirect","text":"Retrieve the code , usage_point_id , and state answered by Enedis. Split the customed state that was modified in the /auth process. From this split it creates two variables : state host Finally redirect all these parameters in a query to the cozy-stack (the cozy-stack which is still waiting for an answer from its /auth call). state / instance The state must be recovered without the instance name, otherwise the cozy-stack won't recognized it and the handshake will fail.","title":"redirect"},{"location":"proxy/description/#token","text":"Gathering from query or parameters all params. Sends a post request to the provider /token endpoint. The stack will store the response params in a accounts couchdb database.","title":"token"},{"location":"proxy/description/#what-happens-next","text":"","title":"What Happens Next"},{"location":"proxy/monitoring/","text":"All logs printed by the Proxy are read and translated into statistics on a grafana dashboard. Thanks to this monitoring system, the team is able to understand when something goes wrong with a konnector if the konnector is to blame in itself or if an issue was coming from Enedis or Grdf.","title":"Monitoring"},{"location":"proxy/use_cases/enedis/","text":"Enedis Data Connect enedis documentation Create an account on https://datahub-enedis.fr/ to explore all the services exposed by Enedis. Authorize API swagger Regarding Enedis, two endpoints are exposed: Authorize /dataconnect/v1/oauth2/authorize Paramater Description client_id Unique identifier of the Application response_type Authorization scenario requested. It will always be \"code\" as Enedis implemented a code grant authorization state Security parameter allowing to maintain the state between the request and the redirection. ** Maximum length of 100 characters ! ** duration Duration of the consent requested by the application, ISO 8601 format. It cannot exceed 3 years Important The response targets the redirect-uri registered with Enedis (the redirect-uri is our proxy and the response will be explained in details further below when explaining the proxy endpoints mechanics). Token /v1/oauth2/token Paramater Description redirect_uri URI defined when the application was created. Must be secured in https content-type application/json grant_type Authorization type to get an access token. This must be set to \u201cauthorization_code\u201d when using an authorization code, and to \u201crefresh_token\u201d when using a refresh token client_id Unique identifier of the Application client_secret Secret of the client application, associated with its client_id refresh_token Refresh token returned to the previous POST request to the /token endpoint code Authorization code returned to the GET request of /authorize endpoint On success, response will contain access_token or refresh_token , usage_point_id among other things. All informations will be stored by the cozy-stack in a cozy-accounts database. Consent Handling Consent is replaced everytime a new oauth dance is launched (for 6 months, hardcoded in /authorize request). User can revoke its consent from the Enedis website, no external endpoints are available for this purpose. If a consent has been revoked or expired. A 403 error will be thrown saying: No consent can be found for this customer and this usage point . Ecolyo can warn the user that the service is unable to continue and ask to give new consent.","title":"Enedis"},{"location":"proxy/use_cases/enedis/#enedis-data-connect","text":"enedis documentation Create an account on https://datahub-enedis.fr/ to explore all the services exposed by Enedis. Authorize API swagger Regarding Enedis, two endpoints are exposed:","title":"Enedis Data Connect"},{"location":"proxy/use_cases/enedis/#authorize","text":"","title":"Authorize"},{"location":"proxy/use_cases/enedis/#dataconnectv1oauth2authorize","text":"Paramater Description client_id Unique identifier of the Application response_type Authorization scenario requested. It will always be \"code\" as Enedis implemented a code grant authorization state Security parameter allowing to maintain the state between the request and the redirection. ** Maximum length of 100 characters ! ** duration Duration of the consent requested by the application, ISO 8601 format. It cannot exceed 3 years Important The response targets the redirect-uri registered with Enedis (the redirect-uri is our proxy and the response will be explained in details further below when explaining the proxy endpoints mechanics).","title":"/dataconnect/v1/oauth2/authorize"},{"location":"proxy/use_cases/enedis/#token","text":"","title":"Token"},{"location":"proxy/use_cases/enedis/#v1oauth2token","text":"Paramater Description redirect_uri URI defined when the application was created. Must be secured in https content-type application/json grant_type Authorization type to get an access token. This must be set to \u201cauthorization_code\u201d when using an authorization code, and to \u201crefresh_token\u201d when using a refresh token client_id Unique identifier of the Application client_secret Secret of the client application, associated with its client_id refresh_token Refresh token returned to the previous POST request to the /token endpoint code Authorization code returned to the GET request of /authorize endpoint On success, response will contain access_token or refresh_token , usage_point_id among other things. All informations will be stored by the cozy-stack in a cozy-accounts database.","title":"/v1/oauth2/token"},{"location":"proxy/use_cases/enedis/#consent-handling","text":"Consent is replaced everytime a new oauth dance is launched (for 6 months, hardcoded in /authorize request). User can revoke its consent from the Enedis website, no external endpoints are available for this purpose. If a consent has been revoked or expired. A 403 error will be thrown saying: No consent can be found for this customer and this usage point . Ecolyo can warn the user that the service is unable to continue and ask to give new consent.","title":"Consent Handling"},{"location":"proxy/use_cases/grdfadict/","text":"Grdf Adict grdf documentation Visit https://site.grdf.fr/web/grdf-adict/technique to explore all the services exposed by Grdf. Prod endpoints are: https://sofit-sso-oidc.grdf.fr/openam/ Regarding Grdf Adict Oauth connexion, two endpoints are exposed: Oauth connexion still in Beta Grdf Adict Oauth service is called Client Connect and is still in early beta. It is currently lacking a state parameter in the Oauth dance. Authorize /oauth2/realms/externeGrdf/authorize Token /oauth2/realms/externeGrdf/access_token The /access_token endpoint can be called with two different grant_type parameter. authorization_code gives an access token and will also retrieve the consents list given by the user in session. client_credentials gives only the access token allowing us to request the data service. The grdf Konnector would only need to call the client_credentials to get a refresh token. Consent Handling Consent is represented by an access right. This access holds characteristics specific to the consent of the end customer. Optional: Revoke consent from external applications It is possible to cancel a consent that was given from the user to our service (for test or development purpose for instance). api.grdf.fr/adict/v1/droit_acces/{id_accreditation}","title":"Grdf Adict"},{"location":"proxy/use_cases/grdfadict/#grdf-adict","text":"grdf documentation Visit https://site.grdf.fr/web/grdf-adict/technique to explore all the services exposed by Grdf. Prod endpoints are: https://sofit-sso-oidc.grdf.fr/openam/ Regarding Grdf Adict Oauth connexion, two endpoints are exposed: Oauth connexion still in Beta Grdf Adict Oauth service is called Client Connect and is still in early beta. It is currently lacking a state parameter in the Oauth dance.","title":"Grdf Adict"},{"location":"proxy/use_cases/grdfadict/#authorize","text":"","title":"Authorize"},{"location":"proxy/use_cases/grdfadict/#oauth2realmsexternegrdfauthorize","text":"","title":"/oauth2/realms/externeGrdf/authorize"},{"location":"proxy/use_cases/grdfadict/#token","text":"","title":"Token"},{"location":"proxy/use_cases/grdfadict/#oauth2realmsexternegrdfaccess_token","text":"The /access_token endpoint can be called with two different grant_type parameter. authorization_code gives an access token and will also retrieve the consents list given by the user in session. client_credentials gives only the access token allowing us to request the data service. The grdf Konnector would only need to call the client_credentials to get a refresh token.","title":"/oauth2/realms/externeGrdf/access_token"},{"location":"proxy/use_cases/grdfadict/#consent-handling","text":"Consent is represented by an access right. This access holds characteristics specific to the consent of the end customer.","title":"Consent Handling"},{"location":"proxy/use_cases/grdfadict/#optional-revoke-consent-from-external-applications","text":"It is possible to cancel a consent that was given from the user to our service (for test or development purpose for instance). api.grdf.fr/adict/v1/droit_acces/{id_accreditation}","title":"Optional: Revoke consent from external applications"}]} \ No newline at end of file diff --git a/site/sitemap.xml b/site/sitemap.xml index a67656777e1637fdaf60f30a452df92ecbadde28..ebb581199b926ce0e1050f3425b1830a2f2e2e94 100644 --- a/site/sitemap.xml +++ b/site/sitemap.xml @@ -1,83 +1,171 @@ <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url><url> <loc>None</loc> - <lastmod>2021-01-04</lastmod> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> + <changefreq>daily</changefreq> + </url><url> + <loc>None</loc> + <lastmod>2021-03-02</lastmod> <changefreq>daily</changefreq> </url> </urlset> \ No newline at end of file diff --git a/site/sitemap.xml.gz b/site/sitemap.xml.gz index 5e2f9a5698d81db2d7f763ad2b6fa19d08bf695a..72009a8e0fbd239b3b9e581a6bc38fb516c047ec 100644 Binary files a/site/sitemap.xml.gz and b/site/sitemap.xml.gz differ