diff --git a/docs/ecolyo/application/scaffolding.md b/docs/ecolyo/application/scaffolding.md index f4cc03a8a29092db1f8d4d95bb73e38313d7d84e..970304deec2861cac79d3f783ab85d5625016619 100644 --- a/docs/ecolyo/application/scaffolding.md +++ b/docs/ecolyo/application/scaffolding.md @@ -2,34 +2,31 @@ In this section, you will find information about the project file structure and ##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](https://github.com/cozy/cozy-doctypes) -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](https://github.com/cozy/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 +| 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/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](https://github.com/cozy/cozy-doctypes) | +| 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](https://github.com/cozy/cozy-ui) | +| models | This folder contains all models | +| services | Here you'll find 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 -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 - - +| 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 | diff --git a/docs/ecolyo/project_architecture/architecture.md b/docs/ecolyo/project_architecture/architecture.md index 2f4f692dba5c6228a0130fccce621b4c7e2d7452..c7704fb0902bd935492c55c68dcad220fbce07ab 100644 --- a/docs/ecolyo/project_architecture/architecture.md +++ b/docs/ecolyo/project_architecture/architecture.md @@ -1,2 +1,87 @@ !!! info "" - :construction: Section under Construction :construction: \ No newline at end of file +:construction: Section under Construction :construction: + +## Libraries + +For this project, we used 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. diff --git a/docs/ecolyo/project_architecture/doctypes.md b/docs/ecolyo/project_architecture/doctypes.md index 8cc7700a73c8234175010eab5fb4ae9e0d0eb470..bbbf9b7413174a70dc42a331eb3d92292d6a70e1 100644 --- a/docs/ecolyo/project_architecture/doctypes.md +++ b/docs/ecolyo/project_architecture/doctypes.md @@ -425,6 +425,48 @@ This doctype is used to store all quiz. } ``` +## 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<br><br>UserExplorationState enum<br>- _UNLOCKED = 0_<br>- _ONGOING = 1_<br>- _DONE = 2_ | +| description | string | description of the exploration | +| target | number | number of stars required to unlock an exploration | +| type | UserExplorationType | type of the exploration<br><br>UserExplorationType enum<br>- _DECLARATIVE = 0_<br>- _ACTION = 1_<br>- _CONSUMPTION = 2_<br>- _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<br><br>_FluidType enum:_<br>- _ELECTRICITY = 0_<br>- _WATER = 1_<br>- _GAS = 2_<br>- _MULTIFLUID = 3_ | +| priority_by_condition | number | priority order | +| message_success | string | message when exploration is done | + +### Example + +``` + { + "_id": "EXPLORATION001", + "description": "Consultez l'écogeste Chat échaudé", + "target": 1, + "type": 3, + "date": null, + "ecogesture_id": "0032", + "fluid_condition": [], + "priority_by_condition": 1, + "message_success": "Vous avez consulté l'écogeste Chat échaudé", + "state": 0, + } +``` + ## Duel ### Description